# Availability and inventory data mapping for OpenAI Understand how Product availability and inventory maps to OpenAI fields. All related fields are present within the [ProductVariant](/urn?urn=ctp%3Aapi%3Atype%3AProductVariant) type. `availability.channels` is a key-value pair where the key is the [Channel](/urn?urn=ctp%3Aapi%3Atype%3AChannel) `id` and the value is a [ProductVariantChannelAvailability](/urn?urn=ctp%3Aapi%3Atype%3AProductVariantChannelAvailability). If the Channel does not exist, the values on `variant.availability` are used. | OpenAI Field | Related commercetools field | Required | Mapping Logic | | --- | --- | --- | --- | | `availability` | `availability.channels[channelId].isOnStock` and `variant.availability.isOnStock` | Required | `in_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_quantity` | `availability.channels[channelId].availableQuantity` and `variant.availability.availableQuantity` | Recommended | The amount of available inventory in stock. For example: `25`. | ## Related pages - [Area overview page with navigation](/agentic-commerce.md)