Attribute Based Pricing
Info
This simple scenario shows how to migrate OOTB attribute based pricing to performant SFIX implementation.
Configure Pricing Plan
- Click App Launcher and navigate to Vlocity Product Console.
- Search for
Default Pricing Plan
, selectPricing Plan Steps
facet and click onNew Item
to add new pricing plan. - 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
- Click Done and Save.
- Note: If there are any additional custom attribute-based-pricing pricing plan steps, disable them.
- Note: If your matrix name is different, ust that name.
- 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
- Run this batch job from Developer Console or Visual Studio Code
Database.executeBatch( new sfix.AttributeBasedPricingJob('AttributeBasedPricing') );
Configure CPQ Configuration Setup
- Click App Launcher, Navigate to CPQ Configuration Setup
- Click Add to configure
AttrMatrixInfoCachePartition
- Name: AttrMatrixInfoCachePartition
- Setup Value: sfix.ExtendedAttributePartition
- Click Add to configure
SfixCachePartition
- Name: SfixCachePartition
- Setup Value: sfix.ExtendedAttributePartition
- Click Add to configure
CacheEnabled
- Name: CacheEnabled
- Setup Value: True
Configure Cache Partition from Setup
- Navigate to Setup, search
Platform Cache
and clear CPQPartition. - Edit for ExtendedAttributePartition and add value
1
to Organisation underOrg Cache Allocation
. - 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 underOrg Cache Allocation
and click Save button.
Test
- Make sure to use products having attributes which are configured in AttributedBasedPricing pricing matrix.
- 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.
- 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!