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

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 and Permission Sets for Business Rules Engine.

Download the PricingPlanHelper and CustomPricingPlanStepImpl classes from this zip 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.

    TierImplementation NameMethod Name
    Java core serviceCpqPricingServicegetMatrixPrice
    Apex (VPL)CustomPricingPlanStepImplGetMatrixPrice
  9. In parameters field, specify the parameters depending on your implementation and tier.

    Type of Attribute-Based PricingType of MatrixParameters for Java Core ServiceParameters for Apex (VPL)
    StandardDecisionMatrix + ExpressionSets{"DecisionMatrix":"true","MatrixVersionId":"0lNxx0000000001EAA","ProcedureName":"ABP-Standard"}{"DecisionMatrix":"true","MatrixName":"AttributePricingMatrix","ProcedureName":"ABP-Standard"}
    SourceTarget with Target as variable Path1DecisionMatrix + 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"
    SourceTargetDecisionMatrix + ExpressionSets{"DecisionMatrix":"true","MatrixVersionId":"0lNxx000000001dEAA","ProcedureName":"SourceTargetAttributePricingMatrix"}{"DecisionMatrix":"true","MatrixName":"SourceTargetAttributePricingMatrix","ProcedureName":"SourceTargetAttributePricingProcedure"}
    RangeBasedDecisionMatrix + ExpressionSets{"RangeAttributes":"ATTRIBUTE-ABP-INT","ProcedureName":"RangeAttributePricingProcedure","MatrixVersionId":"0lNxx00000000BJEAY","DecisionMatrix":"true"}{"RangeAttributes":"ATTRIBUTE-ABP-INT","ProcedureName":"RangeAttributePricingProcedure","MatrixName":"RangeAttributePricingMatrix","DecisionMatrix":"true"}
    VolumeBasedDecisionMatrix + ExpressionSets{"RangeFields":"Quantity","ProcedureName":"VolumeBasedPricingProcedure" ,"MatrixVersionId":"<*Active matrix version SF ID*>","DecisionMatrix":"true"}{"RangeFields":"Quantity","ProcedureName":"VolumeBasedPricingProcedure","MatrixName":"VolumeBasedPricingMatrix","DecisionMatrix":"true"}
    StandardCalculationMatrix + CalculationProcedure{"MatrixVersionId":"0lNxx0000000001EAA","ProcedureName":"ABP-Standard"}{"MatrixName":"AttributePricingMatrix","ProcedureName":"ABP-Standard"}
    SourceTarget with Target as variable Path1CalculationMatrix + 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"
    SourceTargetCalculationMatrix + CalculationProcedure{"MatrixVersionId":"0lNxx000000001dEAA","ProcedureName":"SourceTargetAttributePricingMatrix"}{"MatrixName":"SourceTargetAttributePricingMatrix","ProcedureName":"SourceTargetAttributePricingProcedure"}
    RangeBasedCalculationMatrix + CalculationProcedure{"RangeAttributes":"ATTRIBUTE-ABP-INT","ProcedureName":"RangeAttributePricingProcedure","MatrixVersionId":"0lNxx00000000BJEAY"}{"RangeAttributes":"ATTRIBUTE-ABP-INT","ProcedureName":"RangeAttributePricingProcedure","MatrixName":"RangeAttributePricingMatrix"}
    VolumeBasedCalculationMatrix + 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:

  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:
  1. 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.