Price lists
How to use the Rules Engine in conjunction with price lists and set up price rules
Last updated
How to use the Rules Engine in conjunction with price lists and set up price rules
Last updated
The Rule Engine enables you to manage discounts and more also a the price list level (e.g. changing the standard prices of a price list based on certain conditions), using the proper price rules.
To make the Rule Engine work in conjunction with , you need to do is a new (or an existing) price list and specify the price rules that you want to be implemented in the rules
object. The discount defined by the related actions will be automatically applied to the price list's prices that match the given conditions.
The following request updates the price list identified by the ID vLrWRCDzBE
so that all the prices with an amount greater than 10000 cents will be discounted by 10%:
The following action types are enabled on the flex promotions endpoint:
Checking if a price rule has been correctly applied is pretty straightforward. Once you've applied the desired rules at the time of the price list's creation or update as shown in the example above, you can simply:
Fetch all the price list's prices and verify that only the desired ones have been discounted.
Fetch a single price that should have been discounted and check if it's been correctly updated. This way you can also have access to the detailed rules outcomes.
The following request retrieves the price identified by the ID aGqWUrMGEA
(matching price):
The following request retrieves the price identified by the ID pVOMUMyNvA
(non-matching price):
If you need to check more examples of price lists based on the Rule Engine, feel free to explore the related section of this documentation:
To see the matching prices' amounts updated in the response remember to use a token with the market to which the price list belongs to .
The following request retrieves all the prices belonging to the price list identified by the ID vLrWRCDzBE
(for better readability we requested only ):