You are here:
Attribute-Based Pricing for Summer '23
The Attribute Based Pricing Summer '23 now supports Business Rules Engine, and pricing matrices with more than 50,000 rows. You can also pass values between price plan steps, set attribute values and prices, and use attribute values in the pricing logic.
- Considerations for Attribute-Based Pricing Summer '23
The Attribute-Based Pricing Summer '23 package provides a host of features that makes it easier to implement attribute-based pricing. Before you install the Attribute Based Pricing Summer '23 on your org, please read through these prerequisites and considerations. - Configure Attribute-Based Pricing
The Attribute-Based Pricing package comes with a range of features that makes it easy to implement. - Integrate Business Rules Engine with Attribute-Based Pricing
Business Rules Engine uses decision matrices and expression sets in place of calculation matrices and calculation procedures respectively. Set the decision matrix parameter to true in OmniScript-enabled orgs. - Support Pricing Matrices Larger than 50K rows
Increase the limit on the number of rows in a calculation matrix for your attribute-based pricing implementation. - Map Variables to the Input or Output of Pricing Plan Steps
Add a configuration to the Input JSON of a pricing plan step to model attributes on products which are added to the cart. - Pass Attribute Values into the Pricing Logic
Add a configuration to the Input JSON of a pricing plan step map to attributes to an attribute name that can be used in the pricing logic. - Use a Custom Field for Attribute-Based Pricing
Use custom fields in your attribute-based pricing implementation.
Considerations for Attribute-Based Pricing Summer '23
The Attribute-Based Pricing Summer '23 package provides a host of features that makes it easier to implement attribute-based pricing. Before you install the Attribute Based Pricing Summer '23 on your org, please read through these prerequisites and considerations.
The Attribute Based Pricing Summer'23 DataPack is not installed by default. Go to the Industries CPQ folder of Salesforce Industries Process Library, and download the Attribute Based Pricing datapack. To deploy the AttributeBasedPricing.zip file to your org, follow these steps:
- In Workbench, click Migration, then click Deploy.
- Choose the AttributeBasedPricing.zip file.
- Select Single Package.
- Click Next, then click Deploy.
- In the Results section, click Verify, then click Success:True.
Features of the latest version of Attribute-Based Pricing
-
You can integrate Business Rules Engine objects with Attribute-Based Pricing.
-
You can use pricing matrices that have upto 1 million rows.
-
You can pass attribute values into the pricing logic directly.
-
You can map variables to the input or output of pricing plan steps.
-
You can create custom fields in a product object, and use it in an expression set.
-
When you define an attribute or a variable, you can use it anywhere in the Expression Set. For example, you can use it in a condition, a formula, or an output.
Upgrading to the latest Attribute-Based Pricing version
- You must install Salesforce Communications, Media, and Energy, Summer '23 or later.
- All customization done on the previous attribute-based pricing implementations must be done manually on the new attribute-based pricing.
- Once you upgrade to the new attribute-based pricing version, you cannot revert to previous versions.
- To use Business Rules Engine's decision matrices and expression sets, you must migrate all the calculation matrices and procedures from previous implementations. See: Calculation Matrix and Procedure Migration to Business Rules Engine
Supported Features
Attribute-Based Pricing Summer '23 is supported in the following configurations:
| Feature | LWC CPQ | Decision Matrix | Calculation Matrix | Standard Digital Commerce | OmniStudio Enabled/Disabled |
|---|---|---|---|---|---|
| Matrices larger than 50k rows | Yes | Yes | Yes | Yes | Yes |
| BRE support | Yes | Yes | NA | Yes | Yes |
| Pass values between pricing plan steps | Yes | Yes | Yes | Yes | Yes |
| Use attribute values in pricing logic | Yes | Yes | Yes | Yes | Yes |
| Set attribute values and prices | Yes | Yes | Yes | Yes | Yes |
| Custom fields | Yes | Yes | Yes | Not Supported | Yes |
Configure Attribute-Based Pricing
The Attribute-Based Pricing package comes with a range of features that makes it easy to implement.
First, create a product that is then added to a cart (opportunity, quote or order). You can create custom fields, pricing variables, and pricing variable bindings.
- To create a product, follow these steps:
- In the App Launcher, go to All Items and click Vlocity Product Designer.For more information about creating products in Product Designer, see Create Products in Product Designer.
- From the Vlocity Product Designer, click the dropdown, and select Products.
- Click Create New Product.Enter the values depending on the type of product you want to create.
- In the App Launcher, go to All Items and click Vlocity Product Designer.
- For OmniStudio-Enabled orgs, complete the following steps to integrate Business Rules Engine:
- Migrate all the calculation matrices and procedures from previous Attribute-Based Pricing implementations to use Business Rules Engine's decision matrices and expression sets. See Calculation Matrix and Procedure Migration to Business Rules Engine.
- Enable Business Rules Engine's decision matrices and expression sets instead of calculation matrices and procedures, see Integrate Business Rules Engine with Attribute-Based Pricing.
Note Calculation matrices and procedures are not supported for OmniStudio-Enabled orgs. You must use Business Rules Engine's decision matrices and expression sets instead. - Configure product and pricing designer for your product objects. See Post-Install Steps for CME, Order Management, and Contract Lifecycle Management.To edit pricing plan steps in Vlocity Pricing Designer, you must assign Vlocity EPC Pricing Plan Layout to System Administrator.
Integrate Business Rules Engine with Attribute-Based Pricing
Business Rules Engine uses decision matrices and expression sets in place of calculation matrices and calculation procedures respectively. Set the decision matrix parameter to true in OmniScript-enabled orgs.
Before you begin:
You must have a Business Rules Engine license.
You must migrate all the calculation matrices and procedures from previous implementations to use Business Rules Engine's decision matrices and expression sets. See: Calculation Matrix and Procedure Migration to Business Rules Engine
You must have a Comma Separated Value (CSV) file for the decision matrix you want to integrate into Attribute-Based Pricing.
In the decision matrix, your column names for Input Data must be SourceValueProductName (Text), SourceProductCode (Text), CharacteristicName (Text), CharacteristicValue (Text). The columns for Output Data can be customised.
In the expression set, to set the Output Variable of a calculation step to a standard CPQ price or cost, you must use the pricing variable code.
The decision matrix parameter in a pricing plan controls the use of Business Rules Engine in Attribute-Based Pricing. First, create a custom pricing step in the Default Pricing Plan. Then, set the parameters in the pricing step. For more information about pricing plan step parameters, see Set Up a Custom Pricing Step for Attribute-Based Pricing.
- From the App Launcher, go to Vlocity Pricing Designer.
- Under Pricing Plans, click Default Pricing Plan.
- To create a new step, under Pricing Plan Steps, click New.
-
To enable BRE decision matrices and expression sets, under Parameters, set
DecisionMatrix to true.

-
To provide guest users access to the decision matrices used in a pricing plan
step, set up sharing rules for the decision matrix object:
- From Setup, in the Quick Find box, enter for Sharing Settings, and then click Sharing Settings.
- In Manage sharing settings for, select Decision Matrices.
- Under Sharing Rules, next to Decision Matrix Sharing Rules, click New.
- Enter the label name and rule name.
- For the rule type, select Guest user access, based on criteria.
- Under Criteria, set the fields to include the decision matrices in the pricing plan step. For example, if the names of your decision matrices contains "VEE", for Field, select Name, for Operator, select Contains, and for Value, enter VEE.
- For Share with, select the guest user that you have created for your application.
- For Access Level, select Read Only.
- Save your changes.
Support Pricing Matrices Larger than 50K rows
Increase the limit on the number of rows in a calculation matrix for your attribute-based pricing implementation.
Previous versions of attribute-based pricing implementations could support a maximum of 50,000 rows in a calculation matrix. The latest Attribute-Based Pricing package uses MD5 hash on calculation matrices to increase their limit to 1 million rows.
For more information about pricing plan step parameters, see Set Up a Custom Pricing Step for Attribute-Based Pricing.
-
Create a custom partition. For more information, see Set Up Cache for Calculation Matrices for
Performance.
- Go to Setup, and then in Quick Find, search platform cache.
- Click New Platform Cache Partition.
-
In the Detail section, enter the following
information.
Field Value Description Label AttributePricingPartition The label to be displayed for this partition. Name AttributePricingPartition The name of this partition. This value must be entered in the CPQ Configuration custom setting Default Partition Do not select Description Stores calculation matrices for attribute based pricing. -
In the Capacity section, under Org Cache
Allocation specify the amount of cache for the PricingPlanHelper Apex
class to use.
For a million rows, you can allocate a 2MB capacity.
- Save your changes.
-
To add a new key in CPQ, follow these steps:
- In App Launcher search and select Vlocity CMT Administrator.
- Under Custom Settings, click CPQ Configuration Setup.
- Scroll down and click Add.
- In Name, enter AttrMatrixInfoCachePartition, and in Value enter AttributePricingPartition.
- Save your changes.
-
To enable the large matrix feature for the custom pricing plan step, follow
these steps:
- From the App Launcher, click Vlocity Pricing Designer.
- Under Pricing Plans, click Default Pricing Plan.
-
In Pricing Plan Steps, click the same custom pricing plan step that
uses matrices larger than 50,000 rows.
Make a note of the Sequence number of this step.
-
In Parameters, add LargeMatrix parameter with
the value set to True.

-
To execute the matrix cache batch job, follow these steps:
- Open the Developer Console.
- Click .
-
Paste the following code block:
Map<String, Object> input = new Map<String, Object>(); input.put('PricingPlanCode','DEFAULT_PRICING_PLAN'); input.put('PricingPlanStepSequenceNumbers',' <Custom_Pricing_Plan_Step_Number>'); AttributeMatrixInfoCacheBatch batch = new AttributeMatrixInfoCacheBatch(input); Database.executeBatch(batch,2000); -
In the code block, replace
<Custom_Pricing_Plan_Step_Number>with the Sequence number of the custom step that uses matrices larger than 50,000 rows. - Execute the code and wait for the batch job to complete.
-
To refresh the cache after running these jobs, follow these
steps:
- In App Launcher, search and select Vlocity CMT Administrator.
- Under Admin Console, click Maintenance Jobs.
-
Run the following jobs:
Clear Managed Platform Cache
Product Hierarchy Maintenance. : Select Delete Old Data
Refresh Platform Cache
Map Variables to the Input or Output of Pricing Plan Steps
Add a configuration to the Input JSON of a pricing plan step to model attributes on products which are added to the cart.
First, create a variable that should be used in the Input/Output Variable Map. The variable name must be the same as the Input Attribute name defined in a pricing plan step.
- For an Expression Set in Business Rules Engine, follow these steps:
- Click App Launcher , and then find and select Business Rules Engine.
- Click the app navigation menu, and then select Expression Sets.
- Select an expression set in the list.
- On the record page for your new expression set, on the Related tab, click for the expression set version, and then select Open in Expression Set Builder.
- Create variables and constants for the expression set.

- Click Resource Manager.
- Click Add Resource, and then create a variable.
- Alternatively, for Calculation Procedures, follow these steps:
- In the App Launcher, click Vlocity Calculation Procedures.
- On the Vlocity Calculation Procedure page, in the Vlocity Calculation Procedure Versions related list, click the calculation procedure name.
- In the Variables section of the Pricing Calculation editor, create a variable.
- Go to Vlocity Product Console.
- In the Dashboard in the Pricing area, click the search icon next to Pricing Plan, and press Enter.
- The Default Pricing Plan is displayed.Click Default Pricing Plan.
- In the sidebar, click Pricing Plan Steps.
- Select a step for which you want to map variables.
- To map the output to a variable, in Parameters, in OutputVariableMap, set a variable that you can pass to another step.For example, you can set BoilerOutputFactor = BoilerOutputFactorVar.Note Note: OutputVariableMap is an array of key-value pairs that map an output from the Expression Set (or Calculation Procedure if your org does not use BRE) to a variable name. The variable name and value are available to Pricing Plan steps through the InputVariableMap.

- To map the input to a variable, in Parameters, in InputVariableMap, enter the variable from another step. For example, you can set BoilerOutputFactorVar = BoilerOutputFactorNote InputVariableMap is an array of key-value pairs that map an OutputVariable name to a variable in the Expression Set (or Calculation Procedure if your org does not use BRE).

Pass Attribute Values into the Pricing Logic
Add a configuration to the Input JSON of a pricing plan step map to attributes to an attribute name that can be used in the pricing logic.
For more information about pricing plan step parameters, see Set Up a Custom Pricing Step for Attribute-Based Pricing.
- From the App Launcher, click Vlocity Pricing Designer.
- Under Pricing Plans, click Default Pricing Plan.
- In Pricing Plan Steps, select a step for which you want to map attributes.
-
To map the output to an attribute, in Parameters, in OutputAttributeMap, set an
attribute name that you want to use in the pricing logic.
For example, you can set RiskRatingFactor = Risk Rating FactorNote OutputAttributeMap is an array of key-value pairs that map an OutputAttribute name from an Expression Set response to an attribute name.

Use a Custom Field for Attribute-Based Pricing
Use custom fields in your attribute-based pricing implementation.
To create and use a custom field, you must first determine which objects require the field. You must use the API Name of the custom field in the Destination Field API Name of the Pricing Variable Binding. You must use the Code of the pricing variable in the Output Variable of a calculation step in an expression set.
- To add a custom field in the product, follow these steps:
- Go to Setup.
- Click Object Manager.
- Click the product where you want to add the custom field.
- Click Fields & Relationships.
- Click New, then add the details of the new field.
- To bind the custom field to a pricing variable, follow these steps:
- Create a pricing variable in Pricing Designer. Enter a pricing variable code that can be used in the expression set. For example, enter a code TAX_SALES_ITEM. For more information, see Create a Pricing Variable in Pricing Designer.
- To bind this variable to the custom field, see Pricing Variable Bindings. In the Destination Field API Name, add the API Name of the custom field.
- Create a pricing variable in Pricing Designer. Enter a pricing variable code that can be used in the expression set. For example, enter a code TAX_SALES_ITEM.
- To use a custom field in an expression set, follow these steps:
- From the App Launcher, go to Expression Sets.
- Select an expression set from the list.
- From the dropdown, click Open in Expression Set Builder.
- In a calculation step, enter the code of the pricing variable that is bound to the custom field in Output Variable.The formula sets the value of this custom field.

