# Product data mapping for OpenAI Understand how Product information maps to OpenAI fields. Instead of defining these mappings manually, you can use the Smart Data Modeler with agentic channels to analyze a sample of your catalog, generate a platform-ready Product Type, and map and transform your full catalog data to the fields OpenAI requires so you can import it into your Project. For the full workflow, see [Smart Data Modeler - Agentic channels](/merchant-center/ai-agents/sdm-agentic-channels.md). ## Enable search and checkout for a Product The following two fields require Variant-level Attributes called `chatgptEnableSearch` and `chatgptEnableCheckout`. These Attributes must be [AttributeEnumType](/urn?urn=ctp%3Aapi%3Atype%3AAttributeEnumType) with accepted values of `true` or `false`. | OpenAI Field | Related commercetools field | Required | Mapping Logic | | --- | --- | --- | --- | | `enable_search` | `variant.attributes.chatgptEnableSearch` | Required | `"true"` | | `enable_checkout` | `variant.attributes.chatgptEnableCheckout` | Required | `"true"` | ## Product field mapping If using `gtin` or `mpn`, you must create Variant-level Attributes for these fields called `gtin` and `mpn`. These Attributes should be of type [AttributeTextType](/urn?urn=ctp%3Aapi%3Atype%3AAttributeTextType). The `link` field requires you to create a [Custom Field](/api/projects/custom-fields.md) called `storeUrl` on the [Store](/urn?urn=ctp%3Aapi%3Atype%3AStore) type. This Custom Field should be a [CustomFieldStringType](/urn?urn=ctp%3Aapi%3Atype%3ACustomFieldStringType) and contain the storefront URL. Alternatively, you can modify the template to source the base URL from another field or hardcode it. | OpenAI Field | Related commercetools field | Required | Mapping Logic | | --- | --- | --- | --- | | `id` | `variant.sku` | Required | Use the `sku` of the [ProductVariant](/urn?urn=ctp%3Aapi%3Atype%3AProductVariant). | | `gtin` | `variant.attributes.gtin` | Optional | The product identification number. | | `mpn` | `variant.attributes.mpn` | Required, if `gtin` is not defined | The manufacturer part number (if `gtin` is not provided). | | `title` | `productData.name[]` | Required | Use the localized Product name. | | `description` | `productData.description[]` | Required | Use the localized Product description. | | `link` | `store.custom.fields.storeUrl` and `productData.slug[]` | Required in the feed | Provide a direct link to the product page.For example, your storefront URL and Product `slug`: `https://example.com/en/products/{productData.slug[en]}` | ## Product Variant field mapping If using `color`, `size`, `size_system`, or `gender`, you must create Variant-level Attributes for these fields. The Attribute types can vary based on your implementation. For example, [AttributeTextType](/urn?urn=ctp%3Aapi%3Atype%3AAttributeTextType) or [AttributeEnumType](/urn?urn=ctp%3Aapi%3Atype%3AAttributeEnumType). | OpenAI Field | Related commercetools field | Required | Mapping Logic | | --- | --- | --- | --- | | `item_group_id` | `productData.slug.` | Required | Use product slug or product id/key to group Variants. For example: `SHOE123GROUP`. | | `item_group_title` | `productData.name.` | Optional | Use localized product name. For example: `Men's Trail Running Shoes`. | | `color` | `variant.attributes.color` | Optional | Map attribute value to a simple color string. For example: `Blue`. | | `size` | `variant.attributes.size` | Optional | Map attribute value directly. For example: `10`. | | `size_system` | `variant.attributes.sizeSystem` | Optional | Map attribute value. For example: `US`, `EU`. | | `gender` | `variant.attributes.gender` | Optional | Map attribute value. For example: `male`, `female`, `unisex`. | | `offer_id` | Combine `productData.slug[]` with `variant.attributes.color` and `variant.price` | Optional | Create a unique offer id. For example: `SKU12345-Blue-79.99`. | ## Product media field mapping Media mapping uses fields within the [ProductVariant](/urn?urn=ctp%3Aapi%3Atype%3AProductVariant) type. The `video_link` and `model_3d_link` fields require Variant-level Attributes called `videoLink` and `model3dLink`. These Attributes should be of type [AttributeTextType](/urn?urn=ctp%3Aapi%3Atype%3AAttributeTextType). | OpenAI Field | Related commercetools field | Required | Mapping Logic | | --- | --- | --- | --- | | `image_link` | `variant.images[0].url` | Required | Must be a direct HTTPS link to an image file (JPEG/PNG). You can extract the `url` from the first entry in the `images` array of the [ProductVariant](/urn?urn=ctp%3Aapi%3Atype%3AProductVariant). | | `additional_image_link` | `variant.images` | Optional | Loop through the `images` array starting from the second entry (index `1`) and extract the `url` of each image to a comma-separated list. | | `video_link` | `variant.attributes.videoLink` | Optional | This must be a direct link to a publicly accessible video. For example: YouTube or a CDN link. | | `model_3d_link` | `variant.attributes.model3dLink` | Optional | This must be a direct link to a publicly accessible 3D model file. For example: `https://example.com/model.glb`. | ## Related pages - [Area overview page with navigation](/agentic-commerce.md)