# Price and promotions data mapping for OpenAI 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](/urn?urn=ctp%3Aapi%3Atype%3AAttributeTextType). | OpenAI Field | Related commercetools field | Required | Mapping Logic | | --- | --- | --- | --- | | `price` | `variant.prices` | Required | Combine `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_price` | `variant.price.discounted` | Required, if a discounted price exists | Combine `price.discounted.value.centAmount` + `fractionDigits` (or `preciseAmount` for high precision) and append the `price.value.currencyCode`. For example: `59.99 USD`. | | `sale_price_effective_date` | `variant.price.discounted.discount.validFrom``variant.price.discounted.discount.validUntil` | Required, if `sale_price` is defined | Only 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_fees` | Use [Reference Expansion](/api/general-concepts.md#reference-expansion) on `product.taxCategory` | Required, if `rates.includedInPrice` is `false` | Find 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_measure` | `variant.attributes.unitPricingMeasure` and `variant.attributes.baseMeasure` | Optional | Include a value to represent unit/base measures. For example: `16 oz / 1 oz`. | | `pricing_trend` | `variant.attributes.pricingTrend` | Optional | Include a value to represent trends. For example: `Lowest price in 6 months`. | ## Related pages - [Area overview page with navigation](/agentic-commerce.md)