---
schema_version: "1"
id: bd5c008058fbbe20b761ffb340dab60f6e3be32241e4d4e87c88b2a5f3f69137
title: Set up Attribute-Based Pricing
collection: developer
version: current
locale: en-us
portal_url: https://docs.salesforce.com/developer/current/en-us/industries/cme/guides/comms-set-up-attribute-based-pricing-cart.md
canonical_url: https://developer.salesforce.com/docs/industries/cme/guide/comms-set-up-attribute-based-pricing-cart.html
source_site: developer.salesforce.com
content_type: documentation
content_hash: 3b855e7851e9374243cf09b9d43847b3a2f2de91071c191fe01d9975190abf58
products:
  - Communications, Media, Energy and Utilities APIs (Managed Package)
  - Industries Developer Documentation
---
# Set up Attribute-Based Pricing

Set up attribute-based pricing for standard cart APIs. In Spring '23 and later, only the DefaultPricingPlan is supported.
For more information, see [Attribute-Based Pricing](https://help.salesforce.com/s/articleView?id=ind.comms_Attribute-Based_Pricing_for_Summer_23.htm&type=5)

**Before you Begin**

To use attribute-based pricing that uses decision matrices with expression sets, assign Business Rule Engine permission sets, Rules Engine Runtime Community Runtime, Rules Engine Designer, and Rules Engine Runtime. For more information, see [Decision Matrices](https://help.salesforce.com/s/articleView?id=sf.decision_matrices.htm&type=5) and [Permission Sets for Business Rules Engine](https://help.salesforce.com/s/articleView?id=sf.permission_sets.htm&type=5).

Download the PricingPlanHelper and CustomPricingPlanStepImpl classes from this [zip](https://github.com/Salesforce-Industries-Process-Library/Industries-CPQ) file.

1.  From the App Launcher, find and select **Vlocity Product Console**.

2.  Under the Pricing section, click the search icon next to Pricing Plan.

3.  Search for `Standard Pricing Plan`.

4.  Edit the Standard Pricing Plan.

5.  Click **Pricing Plan Steps**.

6.  Edit the **Get Matrix Price** step.

7.  Activate this pricing plan step by selecting Active.

8.  Update the Implementation Name and Method Name based on the implementation of attribute-based pricing that you want to use.
    | Tier | Implementation Name | Method Name |
    | ----------------- | ------------------------- | -------------- |
    | Java core service | CpqPricingService | getMatrixPrice |
    | Apex (VPL) | CustomPricingPlanStepImpl | GetMatrixPrice |

9.  In parameters field, specify the parameters depending on your implementation and tier.<br>
    **NOTE:** Prices must not be interger value in the matrix for standard cart APIs. When the users create their AttributePricingMatrix, the prices must be in double. For example, if the price is 329, then use 329.00 in the matrix.

    | Type of Attribute-Based Pricing            | Type of Matrix                           | Parameters for Java Core Service                                                                                                                                                         | Parameters for Apex (VPL)                                                                                                                                                                              |
    | ------------------------------------------ | ---------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
    | Standard                                   | DecisionMatrix + ExpressionSets          | `{"DecisionMatrix":"true","MatrixVersionId":"0lNxx0000000001EAA","ProcedureName":"ABP-Standard"}`                                                                                        | `{"DecisionMatrix":"true","MatrixName":"AttributePricingMatrix","ProcedureName":"ABP-Standard"}`                                                                                                       |
    | SourceTarget with Target as variable Path1 | DecisionMatrix + ExpressionSets          | `{"DecisionMatrix":"true","MatrixVersionId":"0lNxx000000001dEAA","ProcedureName":"SourceTargetAttributePricingMatrix", "Path1":"PRODUCT-ABP-ROOT<PRODUCT-ABP-CHILD1<PRODUCT-ABP-GCHILD"` | `{"DecisionMatrix":"true","MatrixName":"SourceTargetAttributePricingMatrix","ProcedureName":"SourceTargetAttributePricingProcedure", "Path1":"PRODUCT-ABP-ROOT<PRODUCT-ABP-CHILD1<PRODUCT-ABP-GCHILD"` |
    | SourceTarget                               | DecisionMatrix + ExpressionSets          | `{"DecisionMatrix":"true","MatrixVersionId":"0lNxx000000001dEAA","ProcedureName":"SourceTargetAttributePricingMatrix"}`                                                                  | `{"DecisionMatrix":"true","MatrixName":"SourceTargetAttributePricingMatrix","ProcedureName":"SourceTargetAttributePricingProcedure"}`                                                                  |
    | RangeBased                                 | DecisionMatrix + ExpressionSets          | `{"RangeAttributes":"ATTRIBUTE-ABP-INT","ProcedureName":"RangeAttributePricingProcedure","MatrixVersionId":"0lNxx00000000BJEAY","DecisionMatrix":"true"}`                                | `{"RangeAttributes":"ATTRIBUTE-ABP-INT","ProcedureName":"RangeAttributePricingProcedure","MatrixName":"RangeAttributePricingMatrix","DecisionMatrix":"true"}`                                          |
    | VolumeBased                                | DecisionMatrix + ExpressionSets          | `{"RangeFields":"Quantity","ProcedureName":"VolumeBasedPricingProcedure" ,"MatrixVersionId":"<*Active matrix version SF ID*>","DecisionMatrix":"true"}`                                  | `{"RangeFields":"Quantity","ProcedureName":"VolumeBasedPricingProcedure","MatrixName":"VolumeBasedPricingMatrix","DecisionMatrix":"true"}`                                                             |
    | Standard                                   | CalculationMatrix + CalculationProcedure | `{"MatrixVersionId":"0lNxx0000000001EAA","ProcedureName":"ABP-Standard"}`                                                                                                                | `{"MatrixName":"AttributePricingMatrix","ProcedureName":"ABP-Standard"}`                                                                                                                               |
    | SourceTarget with Target as variable Path1 | CalculationMatrix + CalculationProcedure | `{"MatrixVersionId":"0lNxx000000001dEAA","ProcedureName":"SourceTargetAttributePricingMatrix", "Path1":"PRODUCT-ABP-ROOT<PRODUCT-ABP-CHILD1<PRODUCT-ABP-GCHILD"`                         | `{"MatrixName":"SourceTargetAttributePricingMatrix","ProcedureName":"SourceTargetAttributePricingProcedure", "Path1":"PRODUCT-ABP-ROOT<PRODUCT-ABP-CHILD1<PRODUCT-ABP-GCHILD"`                         |
    | SourceTarget                               | CalculationMatrix + CalculationProcedure | `{"MatrixVersionId":"0lNxx000000001dEAA","ProcedureName":"SourceTargetAttributePricingMatrix"}`                                                                                          | `{"MatrixName":"SourceTargetAttributePricingMatrix","ProcedureName":"SourceTargetAttributePricingProcedure"}`                                                                                          |
    | RangeBased                                 | CalculationMatrix + CalculationProcedure | `{"RangeAttributes":"ATTRIBUTE-ABP-INT","ProcedureName":"RangeAttributePricingProcedure","MatrixVersionId":"0lNxx00000000BJEAY"}`                                                        | `{"RangeAttributes":"ATTRIBUTE-ABP-INT","ProcedureName":"RangeAttributePricingProcedure","MatrixName":"RangeAttributePricingMatrix"}`                                                                  |
    | VolumeBased                                | CalculationMatrix + CalculationProcedure | `{"RangeFields":"Quantity","ProcedureName":"VolumeBasedPricingProcedure","MatrixVersionId":"0lNxx00000000BJEAY"}`                                                                        | `{"RangeFields":"Quantity","ProcedureName":"VolumeBasedPricingProcedure","MatrixName":"VolumeBasedPricingMatrix"}`                                                                                     |

10. **Save** the Get Matrix Price step.

After updating attribute-based pricing in the pricing plan, run the Cache Catalog Product Definition Jobs in Vlocity CMT Administration.

If you're using the Java implementation of attribute-based pricing:

Generate its compile data by running this code in an anonymous window of the developer console:

```
 new vlocity_cmt.TelcoAdminConsoleController().invokeMethod('createConfigurationSnapshot', new Map<String, String>{'startDateTime'=>Datetime.now().format(), 'endDateTime'=>Datetime.now().addDays(30).format()});
```

1.  In Vlocity CMT Administration, run the Generate Compile Matrix Data EPC job.
2.  Activate the configuration snapshot by executing following in an anonymous window of the developer console:

```
 new vlocity_cmt.TelcoAdminConsoleController().invokeMethod('activateConfigurationSnapshot', new Map<String, String>());
```

3. If you want to use a new matrix version, update the pricing plan step for attribute-based pricing with the ID of the new matrix version.
