Best practices for price rules
Review these best practices for creating price rules so you can learn ways to simplify price rule maintenance and reduce performance impacts.
- 1. Reuse components in your price rules
- 2. Give price rule components meaningful names
- 3. Place conditions that are most likely to be met on the first path in the price rule
- 4. In a price rule with conditions, the path with no conditions must be the bottom path
- 5. Limit the nesting depth for nested price rules
- 6. Limit the number of Condition Branches in a single price rule
- 7. Use the Coordinator Branch wisely and only when necessary
1. Reuse components in your price rules
With careful planning, you can find ways to reuse components in price rules. For example, you can:- Reuse the same price equation in multiple price rules.
- Reuse the same price constant to calculate a new price in more than one price equation.
- Reuse the same price list in multiple price rules.
- Nest price rules that contain a common set of pricing instructions within other price rules.
2. Give price rule components meaningful names
One real advantage of price rules is that they display in a graphical format in the Price Rule Builder. To optimize the readability of your price rules, make sure you assign meaningful names to:- Price rules and price lists
- Paths in branches
- Price equations and constants
The following best practices relate to minimizing performance impacts of price rules. If your site is experiencing performance issues, you can review your price rules based on these best practices and make any necessary adjustments.
3. Place conditions that are most likely to be met on the first path in the price rule
One way you can minimize the performance impact of price rules is by ordering the conditions in the price rule like this:- Place the condition that is most likely to be met on the top path.
- Place the condition that is the second most likely to be met on the second path, and so on.