Flex promotions
The flex promotion object and the allowed CRUD operations on the related resource endpoint
Last updated
The flex promotion object and the allowed CRUD operations on the related resource endpoint
Flex promotions enable you to cover the most comprehensive range of use cases you may need in your promotion strategy.
Flex promotions leverage our Rules Engine integration with Commerce Layer Core API and, when triggered, are responsible for adding a discount to the orders involved based on the conditions and actions provided in the associated rules.
Please refer to the Rules Engine documentation to learn more about how to set up promotional rules, define conditions and actions, browse the most common use cases, and more.
For performance reasons, rules, rule_outcomes, and resource_payload objects are returned when retrieving a single flex promotion only.
Except for the case where you need them to be associated with a coupon, when using flex promotions you're not required to define any promotion rules, set a currency code, or associate a specific market. Just use the rules JSON object to define how and when the flex promotion should be applied.
The total discount due to flex promotions is calculated and distributed on the matching line items, based on the conditions and actions provided in the associated rules.
Last updated