Item data mapping for OpenAI

Ask about this Page
Copy for LLM
View as Markdown

Understand how item data maps to OpenAI fields.

All related fields are present within the ProductVariant type.
All of these fields, except product_category, require Variant-level Attributes.
OpenAI FieldRelated commercetools fieldRequiredMapping Logic
conditionattributes.conditionRequired, if not newThis Attribute must be an enum type which accepts new, refurbished, or used. If this Attribute does not exist, the value defaults to new.
product_categoryUse Reference Expansion on productData.categories[0] and join productData.categories[0].obj.ancestors.obj.name[<locale>]RequiredSelect the deepest (most specific) Category assigned to the product.
Recursively traverse the selected Category's parent path using the Category list.
Join the localized names with >. For example, [Root Category] > [Parent Category] > [Child Category] becomes Apparel & Accessories > Shoes > Running Shoes.
brandattributes.brandRequiredThis Attribute must be a string value that does not exceed 70 characters.
materialattributes.materialRequiredContains important information for advanced product filtering. For example: vegan leather bags or 100% cotton shirts. If this Attribute is a Set, you must join the values with and or a , . The total length of the string must not exceed 100 characters.
dimensionsattributes.length x attributes.width x attributes.heightOptionalUsed for filtering products based on size (for example, Find a backpack that fits under an airplane seat). These Attributes must be numbers. Combine the length, width, and height numerical Attribute values using x as a separator, and then append the unit. For example, 45x30x20 cm.
lengthattributes.lengthOptionalThis Attribute must be a number with the unit (cm or in) appended. For example: 45 cm. The unit must match the units for width and height if they are defined.
widthattributes.widthOptionalThis Attribute must be a number with the unit (cm or in) appended. For example: 30 cm. Only include if you are providing the individual length and height fields as well. Must include the unit.
heightattributes.heightOptionalThis Attribute must be a number with the unit (cm or in) appended. For example: 20 cm. Only include if also providing length and width. Essential for shipping and fit comparisons.
weightattributes.weightRequiredUsed for filtering and to apply shipping costs. Extract the numerical weight value and concatenate it with the unit code. For example: 1.2 kg.
age_groupattributes.ageGroupOptionalThis Attribute must be an enum type which accepts newborn, infant, toddler, kids, or adult. If this Attribute does not exist, the value defaults to adult.