Availability and inventory data mapping for OpenAI

Ask about this Page
Copy for LLM
View as Markdown

Understand how Product availability and inventory maps to OpenAI fields.

All related fields are present within the ProductVariant type.
availability.channels is a key-value pair where the key is the Channel id and the value is a ProductVariantChannelAvailability. If the Channel does not exist, the values on variant.availability are used.
OpenAI FieldRelated commercetools fieldRequiredMapping Logic
availabilityavailability.channels[channelId].isOnStock and
variant.availability.isOnStock
Requiredin_stock if isOnStock is true.
out_of_stock if isOnStock is false and availability.channels[channelId].restockableInDays is undefined.
preorder if isOnStock is false and availability.channels[channelId].restockableInDays is defined. Use out_of_stock if you do not allow preordering.
inventory_quantityavailability.channels[channelId].availableQuantity and
variant.availability.availableQuantity
RecommendedThe amount of available inventory in stock. For example: 25.