Price and promotions data mapping for OpenAI

Ask about this Page
Copy for LLM
View as Markdown

Understand how price and promotion data maps to OpenAI fields.

If using unit_pricing_measure/base_measure, or pricing_trend, you must create Variant-level Attributes for these fields. The Attribute types must be AttributeTextType.
OpenAI FieldRelated commercetools fieldRequiredMapping Logic
pricevariant.pricesRequiredCombine price.value.centAmount + price.value.fractionDigits (or use price.value.preciseAmount for high precision) and append the price.value.currencyCode. For example: 79.99 USD.
sale_pricevariant.price.discountedRequired, if a discounted price existsCombine price.discounted.value.centAmount + fractionDigits (or preciseAmount for high precision) and append the price.value.currencyCode. For example: 59.99 USD.
sale_price_effective_datevariant.price.discounted.discount.validFrom
variant.price.discounted.discount.validUntil
Required, if sale_price is definedOnly include date values from the commercetools fields, and join with a /. For example, 2025-07-01 / 2025-07-15. If there are no validFrom or validUntil values, this value can be omitted or use a safe fallback.
applicable_taxes_feesUse Reference Expansion on product.taxCategoryRequired, if rates.includedInPrice is falseFind the product.taxCategory.rates by country.
If rates.includedInPrice is false, use taxCategory.rates.amount and append the price.value.currencyCode. For example: 7 USD.
unit_pricing_measure / base_measurevariant.attributes.unitPricingMeasure and
variant.attributes.baseMeasure
OptionalInclude a value to represent unit/base measures. For example: 16 oz / 1 oz.
pricing_trendvariant.attributes.pricingTrendOptionalInclude a value to represent trends. For example: Lowest price in 6 months.