Info

Method name: PricingVariableCalculation

This step is designed to perform calculations. Here is a simple example of storing prices calculated by the cpq engine in custom pricing variables (before the prices will be manually overriden):

Pricing Variable Calculation Params

Make sure you put this step after Initialize Pricing Variables step. Before that step all variables are null.

Params

As parameters put codes of pricing variables - the result is always stored in pricing variable, but as source you can put expressions containing pricing variables, fields and attributes. null, true, false constants are also properly evaluated.

Pricing Variable Calculation Advanced Params

Above is more advanced example of adding custom populated field value to one time charge, and conditionally setting recurring monthly charge to 0.

Performance

Complex formulas computations can be optimized by enabling caching - create CPQ configuration PricingPlanStepCache and populate it with name of existing local cache partiton, eg. local.AttributePricingPartition. Do not use any other manage package cache partition (like vlocity_cmt.CPQPartition).

Supported syntax

You can use pricing variable codes, line item fieds, string constants ('this is a string constant') and decimals (1.23).

  • Math operators: +, -, /, *, ^
  • Comparison operators: ==, !=,<, >, <=, >=
  • Logical operators: &&, ||
  • Function: IF(condition, value-if-true, value-if-false)