Info

This simple scenario shows how to migrate OOTB attribute based pricing to performant SFIX implementation.

Configure Pricing Plan

  1. Click App Launcher and navigate to Vlocity Product Console.
  2. Search for Default Pricing Plan, select Pricing Plan Steps facet and click on New Item to add new pricing plan.
  3. Configure Attribute Based Pricing pricing plan step with following details:
    • Name: Attribute Based Pricing
    • Implementation Name: SfixWrapper
    • Method Name: AttributeBasedPricing
    • Sequence: {set sequence less than 10}
    • Active: True
    • Parameters: Add the following values for standard matrix - AttributePricingMatrix:
      • MatrixName: AttributePricingMatrix
      • Source Product Code: PricebookEntry.Product2.ProductCode
      • Source Product Name: PricebookEntry.Product2.Name
      • NRC: OT_STD_PRC
      • MRC: REC_MNTH_STD_PRC
  4. Click Done and Save.
  5. Note: If there are any additional custom attribute-based-pricing pricing plan steps, disable them.
  6. Note: If your matrix name is different, ust that name.
  7. Note: Calculation procedure name does not matter, it will not be used by SFIX, it would only slow pricing down.

Execute Batch Job to populate pricing variables

  1. Run this batch job from Developer Console or Visual Studio Code
    • Database.executeBatch( new sfix.AttributeBasedPricingJob('AttributeBasedPricing') );

Configure CPQ Configuration Setup

  1. Click App Launcher, Navigate to CPQ Configuration Setup
  2. Click Add to configure AttrMatrixInfoCachePartition
    • Name: AttrMatrixInfoCachePartition
    • Setup Value: sfix.ExtendedAttributePartition
  3. Click Add to configure SfixCachePartition
    • Name: SfixCachePartition
    • Setup Value: sfix.ExtendedAttributePartition
  4. Click Add to configure CacheEnabled
    • Name: CacheEnabled
    • Setup Value: True

Configure Cache Partition from Setup

  1. Navigate to Setup, search Platform Cache and clear CPQPartition.
  2. Edit for ExtendedAttributePartition and add value 1 to Organisation under Org Cache Allocation.
  3. To create New Platform Cache Partition and click New Platform Cache Partition button and add following details:
    • Label: AttributePricingPartition
    • Name: AttributePricingPartition
    • Add value 1 to Organisation under Org Cache Allocation and click Save button.

Test

  1. Make sure to use products having attributes which are configured in AttributedBasedPricing pricing matrix.
  2. Open CPQ cart and run pricing (eg. add to cart or change Quantity) - please note that refreshing the screen does not run pricing and your new field would not be populated.
  3. Now try adding values to those attributes which are configured in AttributedBasedPricing pricing matrix - if you can see the changes in the cart pricing as per the pricing matrix - congratulations, you have successfully configured your another new feature using SFIX!