# Performance and compliance mapping for OpenAI Understand how performance and compliance data maps to OpenAI fields. ## Performance Signals If using `popularity_score` or `return_rate`, you must create Variant-level Attributes for these fields. The Attribute types must be [AttributeNumberType](/urn?urn=ctp%3Aapi%3Atype%3AAttributeNumberType). The values of these Attributes can be calculated based on your business logic, such as [Review](/urn?urn=ctp%3Aapi%3Atype%3AReview) and [Order](/urn?urn=ctp%3Aapi%3Atype%3AOrder) data. | OpenAI Field | Related commercetools field | Required | Mapping Logic | | --- | --- | --- | --- | | `popularity_score` | `variant.attributes["popularity_score"]` | Optional | You can calculate this based on sales data, or use `Product.reviewRatingStatistics.averageRating`. For example, `4.7` | | `return_rate` | `variant.attributes["return_rate"]` | Optional | You can calculate this based on return information of specific products. The result should be a percentage. For example: `2%`. | ## Compliance If using `warning`/`warning_url` or `age_restriction`, you must create Variant-level Attributes for these fields. The `warning`/`warningUrl` field must be an [AttributeTextType](/urn?urn=ctp%3Aapi%3Atype%3AAttributeTextType), and the `ageRestriction` field must be an [AttributeNumberType](/urn?urn=ctp%3Aapi%3Atype%3AAttributeNumberType). | OpenAI Field | Related commercetools field | Required | Mapping Logic | | --- | --- | --- | --- | | `warning` / `warning_url` | `variant.attributes.warning` `variant.attributes.warningUrl` | Optional | Include any product warnings or other necessary information. For example: `Contains lithium battery` or `CA Prop 65 warning`. | | `age_restriction` | `variant.attributes.ageRestriction` | Optional | The minimum age required to purchase the product. For example: `21`. | ## Related pages - [Area overview page with navigation](/agentic-commerce.md)