HCL Commerce Enterprise

Price rules: An overview

A price rule is a set of instructions you create to generate prices on your storefront. Each time a customer views a store page that displays prices, HCL 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 your 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, you 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:

  • Get the price from the Offer Price list.

Price rule with 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"

A price rule with more than one action

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:
  • Condition: If the price is for catalog entries from the Shirts category:
    1. Get the price from the Shirt Prices list.
    2. Mark up the price by 10%.
    3. Round up the price to the nearest ".99"
  • If the price is for any other catalog entry in the catalog:
    • Get the price from the Offer Price list.

A price rule with conditions

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, you are not limited to the two HCL 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, your 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, you 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:
  • B2B stores: You can create a series of price rules, and then assign a specific price rule to each customer contract. Customers shopping under a specific contract see the prices they are entitled to.
  • Extended site stores: You can create a price rule for each extended site to differentiate pricing across the stores. Customers shopping on a specific extended site store see prices according to the price rule assigned to the site's default contract.

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, you 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 HCL Commerce are not sufficient for your site, consider integration with the IBM WebSphere ILOG JRules BRMS. With WebSphere ILOG JRules BRMS, you 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, you can use pricing rulesets created in the ILOG JRules for pricing on HCL Commerce stores.

Price rules and HCL Commerce search (Solr)

The default price mode for HCL 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 rules and HCL Commerce search (Elasticsearch)

Price modes (computed, mixed) are no longer supported with the HCL Commerce based on Elasticsearch. You cannot use these price modes to use the price adjustments from price rules. The price mode that is supported is the indexed price mode wherein all prices (list, offer, contract) are retrieved from the search index. The Ingest service copies into the product index all these prices from the price index. Once the price rule is assigned to the contract, you need to manually build the contract price index so that Ingest service can copy this into the product index and reflect the prices appropriately at the storefront. List and offer prices are indexed directly from the database tables.

Price rule limitations

The following HCL Commerce features do not support price rules:
  • Price range search facets in HCL Commerce starter stores:

    Your store might allow customers to narrow search results by specifying a price range. For example, the customer might see the following list of options on the search results page:

    Search facets for price

    If so, the set of catalog entries in each range (shown in parentheses) is determined by the price in the default Offer Price list, not the price rule price; however, the prices the customer actually sees for the catalog entry come from the price rule. Therefore, the only impact of this limitation is a potential mismatch between the range the customer chooses and the catalog entries displayed for that range. The search facets are programmed this way intentionally to avoid the potential performance impact of updating the number in parentheses for each customer according to the price rule. Pricing using price rules is dynamic, and the price can be different for each customer.

  • Workspaces:

    The Catalog Filter and Pricing tool does not support the workspace feature. When workspaces are enabled, the Catalog Filter and Pricing tool is not available.