(Enterprise)

Price rules: An overview

A price rule is a set of instructions you create to generate prices on the storefront. Each time a customer views a store page that displays prices, WebSphere Commerce follows the instructions in the price rule to set a price for each catalog entry. The price rule is also used during checkout so that the customer is charged the correct price, before taxes, discounts and shipping charges. Using price rules for the store is optional; however, price rules provide a flexible, feature-rich alternative to using static price lists.


Simple examples of price rules

Price rules are represented as flow diagrams. The instructions in the price rule are represented by icons on the flow path; each instruction is called an action. Price rules use price lists for pricing data. If required, we can add actions to the price rule to adjust price list prices.

Example 1

The simplest example of a price rule is one that gets a price from a price list as is, without adjusting it. In this case, the price rule might have a single action:

Example 2 Another simple example of a price rule is one that performs calculations to adjust the price list price. In this case, the actions in the price rule might be:

  1. Get the price from the Offer Price list

  2. Mark down the price by 10%

  3. Round up the price to the nearest ".99"

When a price rule like the previous example has multiple actions, the actions are applied from left to right. After all actions on a given path are applied, the price rule outputs a price. In the previous example, if the price list price for a catalog entry is $50, the price output by the price rule is $45.99.

Example 3 Price rules can also include conditions for setting prices. Here is an example:

In the previous example, notice the Catalog Condition on the top path. This icon sets the conditions for the top path. Any catalog entry that is not a shirt is priced using the bottom path, which does not contain any condition.

These three simple examples demonstrate only the basic functions of a price rule. Your price rules can be much more complex and take advantage of many additional features.


Price rule features

To make pricing more flexible and easier to manage, price rules support the following features:

Feature Example
Use any price list in a price rule to set pricing on your storefront. With price rules, we are not limited to the two WebSphere Commerce default price lists, Offer Price and List Price. Create a "Cost" price list and then use a price rule to dynamically mark up costs.
Use the same price rule for multiple B2B contracts, or for more than one extended site store. You do not need to create a new price rule for each contract or store if the pricing is the same. Create a price rule called "Offer Minus 10%" and assign it to any B2B contracts that are entitled to these prices.
Perform simple and complex calculations to adjust prices in price lists. Perform the following calculation (called a price equation) in a price rule:

Output Price = (Cost Price List) * (1 + Margin)

Create a constant to represent a number, a percentage, or a price that you intend to use repeatedly in price calculations or comparisons. If you change the value of the constant, our changes automatically apply everywhere you used the constant, saving you time. Create a price constant to represent the Margin value in the equation example in the previous row.
Build conditions into price rules. This way, a single price rule can set pricing differently, depending on certain conditions you define, for example:

  • The category or brand of the catalog entry

  • The member group or organization that the customer belongs to

Create a price rule that marks down Brand A catalog entries by 10%, Brand B catalog entries by 20%, and all other catalog entries by 5%.
Reuse components of price rules in other price rules so that a set of price rules is easier to maintain. For example, we can:

  • Reuse the same price equation in multiple price rules

  • Reuse the same price list in multiple price rules

  • Nest a price rule in another price rule

Create a price equation that calculates distribution costs. Then use that price equation in any price rule that must add distribution costs to prices.
Round up prices that the price rule calculates so that the price displayed on the storefront looks more attractive to customers. Round up prices so they end with ".99"


Price rules and business models

Price rules provide the most value for the following business models:

Single B2C stores can also benefit from price rules if you have a business need to dynamically adjust the prices in price lists or use price lists other than the two default lists, Offer Price and List Price.


Price rule customization

To provide business users with more options for price rules, we can develop new conditions and actions. For example, you could create a custom condition that checks when a customer registered and then sets pricing differently based on their registration date. Detailed instructions and code samples are provided in this information center.


Integration with IBM WebSphere ILOG JRules, an external business rule management system

If the price rule functions in WebSphere Commerce are not sufficient for the site, consider integration with the IBM WebSphere ILOG JRules BRMS. With WebSphere ILOG JRules BRMS, we can develop pricing rules that use multiple variables, decision tables, and decision trees. WebSphere ILOG JRules BRMS provides a powerful business rule management solution (BRMS) with a comprehensive rule authoring environment for rule-based applications, for both business and IT users. WebSphere ILOG JRules BRMS offers individual rule governance, separate rule testing and simulation, and centralized external pricing rules for multichannel solutions. After integration, we can use pricing rulesets created in the ILOG JRules for pricing on WebSphere Commerce stores.


Price rules and WebSphere Commerce search (Solr)

The default price mode for WebSphere Commerce search is the indexed price mode. The indexed price mode returns a summary where all prices are retrieved from the search index. To use price adjustments from price rules or contracts, you need to use either the computed or the mixed price mode.


Price rule limitations

The following WebSphere Commerce features do not support price rules:


Related tasks
Planning a price rule
Creating a price rule