HCL Commerce Enterprise

Creating a price equation

You can create price equations to perform mathematical calculations that adjust prices. After you create the price equation, you can use it in one or more price rules by specifying the price equation in a Calculate Price action. You can also use a price equation in a Comparison Condition.

Before you begin

  1. To see example price equations and to understand price constants, read Price equations and constants in price rules.
  2. Create any price lists or price constants that your price equation requires, if they do not already exist.

About this task

You build your price equation using a graphical editor. The following is an example of how you might use the editor to build a price equation that takes a price from the Offer Price price list and reduces the price by 10%:
  • 1 Using the Equation builder, you build the mathematical expression that is your price equation. To do so, you add rows to the Equation builder table; each row contains an item in your mathematical expression, for example, a price list or a math symbol.
  • 2 As you build your price equation, the Equation preview displays a graphical representation of your price equation so that you can check the result. Notice how the rows in the Equation builder table correspond to what you see to the right of the equals sign (=) in the Equation preview.

Price equation builder

Procedure

  1. Open the Catalog Filter and Pricing tool.
  2. From the toolbar, click the arrow on the right side of Add newArrow Create New; then select Price Equation.
  3. In the properties view, set the following properties for the price equation:
    PropertyDescription
    Name Type a name for this price equation, for example, Cost Plus Margin. In a price rule, this name displays beneath the Calculate Price element that uses this price equation.
    DescriptionEnter text that explains what the price equation does.
  4. Build your price equation:
    1. Above the Equation builder table, click the arrow on the right side of Add newArrow Add to Equation; then select the first component in your price equation.
      Your options are:
      Input price Inserts an Input Price icon. This icon indicates that your price equation requires input from previous actions in the price rule flow to perform its calculation.
      Number Inserts a number you specify into your equation.
      Math symbol Inserts a math symbol into your equation. Your choices are:
      • + (for addition)
      • - (for subtraction)
      • * (for multiplication)
      • / (for division)
      ( Starts a parenthetical expression in your equation.
      ) Ends a parenthetical expression in your equation.
      Price list Inserts an existing price list into your equation:
      1. After clicking Price list, use the Find and Add window to search for the price list by its name.
      2. If you get more than one result, drag the correct price list from the utilities view into a row of the Equation builder table.
      Price constant Inserts an existing price constant into your equation:
      1. After clicking Price constant, use the Find and Add window to search for the price constant by its name.
      2. If you get more than one result, drag the correct price constant from the utilities view into a row of the Equation builder table.
    2. Add additional components to the Equation builder table to complete your price equation.
    3. Using the Equation preview display, review your equation.
    4. To edit the equation, use the icons above the Equation builder table. For example, to rearrange the components in your equation, use the yellow arrow icons.
  5. Save and close your price equation.

Results

You can now specify this price equation in a Calculate Price action or a Comparison Condition in a price rule.