Product data mapping for OpenAI

Ask about this Page
Copy for LLM
View as Markdown

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.

Enable search and checkout for a Product

The following two fields require Variant-level Attributes called chatgptEnableSearch and chatgptEnableCheckout. These Attributes must be AttributeEnumType with accepted values of true or false.
OpenAI FieldRelated commercetools fieldRequiredMapping Logic
enable_searchvariant.attributes.chatgptEnableSearchRequired"true"
enable_checkoutvariant.attributes.chatgptEnableCheckoutRequired"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.
The link field requires you to create a Custom Field called storeUrl on the Store type. This Custom Field should be a CustomFieldStringType and contain the storefront URL. Alternatively, you can modify the template to source the base URL from another field or hardcode it.
OpenAI FieldRelated commercetools fieldRequiredMapping Logic
idvariant.skuRequiredUse the sku of the ProductVariant.
gtinvariant.attributes.gtinOptionalThe product identification number.
mpnvariant.attributes.mpnRequired, if gtin is not definedThe manufacturer part number (if gtin is not provided).
titleproductData.name[<locale>]RequiredUse the localized Product name.
descriptionproductData.description[<locale>]RequiredUse the localized Product description.
linkstore.custom.fields.storeUrl and productData.slug[<locale>]Required in the feedProvide 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 or AttributeEnumType.
OpenAI FieldRelated commercetools fieldRequiredMapping Logic
item_group_idproductData.slug.<locale>RequiredUse product slug or product id/key to group Variants. For example: SHOE123GROUP.
item_group_titleproductData.name.<locale>OptionalUse localized product name. For example: Men's Trail Running Shoes.
colorvariant.attributes.colorOptionalMap attribute value to a simple color string. For example: Blue.
sizevariant.attributes.sizeOptionalMap attribute value directly. For example: 10.
size_systemvariant.attributes.sizeSystemOptionalMap attribute value. For example: US, EU.
gendervariant.attributes.genderOptionalMap attribute value. For example: male, female, unisex.
offer_idCombine productData.slug[<locale>] with variant.attributes.color and variant.priceOptionalCreate a unique offer id. For example: SKU12345-Blue-79.99.

Product media field mapping

Media mapping uses fields within the ProductVariant type.
The video_link and model_3d_link fields require Variant-level Attributes called videoLink and model3dLink. These Attributes should be of type AttributeTextType.
OpenAI FieldRelated commercetools fieldRequiredMapping Logic
image_linkvariant.images[0].urlRequiredMust 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.
additional_image_linkvariant.imagesOptionalLoop through the images array starting from the second entry (index 1) and extract the url of each image to a comma-separated list.
video_linkvariant.attributes.videoLinkOptionalThis must be a direct link to a publicly accessible video. For example: YouTube or a CDN link.
model_3d_linkvariant.attributes.model3dLinkOptionalThis must be a direct link to a publicly accessible 3D model file. For example: https://example.com/model.glb.