Info

This more complex scenario shows how to configure Subsidies, which includes Subsidies Total and Subsidies Rollup to parent QuoteLineItem or OrderItem.

Configure New Custom Fields on ‘QuoteLineItem’ and ‘OrderItem’

  1. Go to Setup and click Object Manager.
  2. Create One Time Subsidy for QuoteLineItem and OrderItem objects.
    • Data Type: Currency
    • Field Label: One Time Subsidy
    • Field Name: OneTimeSubsidy
    • Length: 16 and Decimal Places: 2
  3. Configure Field Level Security and Page Layout and click save.
  4. Create One Time Subsidy Total for QuoteLineItem and OrderItem objects.
    • Data Type: Currency
    • Field Label: One Time Subsidy Total
    • Field Name: OneTimeSubsidyTotal
    • Length: 16 and Decimal Places: 2
  5. Configure Field Level Security and Page Layout and click save.

Configure New Pricing Variables

  1. Click App Launcher and navigate to Vlocity Product Console.
  2. Create One Time Charge Subsidy pricing variable with following required values:
    • General Properties Facet
      • Name: One Time Charge Subsidy
      • Code: OT_SUBSIDY
      • Active: True
      • Charge Type: One-time
      • Sub-Type: Standard
      • Type: Price
      • Value Type: Pricing Element
      • Scope: Line
      • Aggregation: Unit
    • Pricing Variable Bindings for QuoteLineItem
      • Name: One Time Charge Subsidy - QuoteLineItem
      • Destination SObject Type: QuoteLineItem
      • Destination Field API Name: OneTimeSubsidy__c
    • Pricing Variable Bindings for OrderItem
      • Click New Pricing Variable Binding
      • Name: One Time Charge Subsidy - OrderItem
      • Destination SObject Type: OrderItem
      • Destination Field API Name: OneTimeSubsidy__c
  3. Create One Time Charge Subsidy Total pricing variable with following required values:
    • General Properties
      • Name: One Time Charge Subsidy Total
      • Code: OT_SUBSIDY_TOTAL
      • Active: True
      • Charge Type: One-time
      • Sub-Type: Standard
      • Type: Price
      • Value Type: Calculated
    • Pricing Variable Bindings for QuoteLineItem
      • Name: One Time Charge Subsidy - QuoteLineItem
      • Destination SObject Type: QuoteLineItem
      • Destination Field API Name: OneTimeSubsidyTotal__c
    • Pricing Variable Bindings for OrderItem
      • Click New Pricing Variable Binding
      • Name: One Time Charge Subsidy - OrderItem
      • Destination SObject Type: OrderItem
      • Destination Field API Name: OneTimeSubsidyTotal__c
  4. Create Rollup One Time Charge Subsidy Total pricing variable with following required values:
    • General Properties
      • Name: Rollup One Time Charge Subsidy Total
      • Code: ROLLUP_OT_SUBSIDY_TOTAL
      • Active: True
      • Charge Type: One-time
      • Sub-Type: Standard
      • Type: Price
      • Value Type: Calculated
      • Scope: Rollup
      • Applies To Variable: One Time Charge Subsidy Total

CPQ Configuration/Settings

  1. Click App Launcher, Navigate to ‘Interface Implementations’.
    • Add a new Interface Implementation
      • Interface Name: ‘DefaultPricingVariableCalcImplementaInterface’
      • Active Implementation Class: ‘sfix.RollupPricingVariableImplementation’
      • Description: ’SFIX’
      • Save
    • Click New to add ‘Interface Implementations Details’ in the Related tab
      • Available Implementation: ‘sfix.RollupPricingVariableImplementation’
      • Interface Name: ‘DefaultPricingVariableCalcImplementaInterface’
      • Active: true
      • Default: true
  2. Click App Launcher, Navigate to ‘Vlocity CMT Administration’.
    • Add a key value pair in CPQ Configuration Setup.
      • Name: PricingVariablesAutoRollup and Setup Value: OT_SUBSIDY
      • Name: SfixCachePartition and Setup Value: sfix.ExtendedAttributePartition

Configure Pricing Elements

  1. Click the App Launcher and navigate to the Vlocity Product Console.
  2. Look up the price list, navigate to the ‘Pricing Element’ facet, select the ‘Charges’ tab, and then ‘New’.
  3. Configure ‘Subsidy’ Charge Pricing Element with the following details:
    • Charge Type: One-time
    • Sub Type: Standard
    • Search & select a Pricing Variable: One Time Charge Subsidy
    • Name: SUBSIDY_10.00-USD (Follow any naming convention with the charge you want to assign.)
    • Code: PE_SUBSIDY_10.00-USD (Follow any naming convention with the charge you want to assign.)
    • Display Text: $10.00
    • Charge: 10
    • Currency Code: USD (Select your own currency code.)
    • Effective From: 1/1/2021 (should be a past date)
    • Active: true
    • Click Save

Configure Product

  1. Click the App Launcher and navigate to the Vlocity Product Console.
  2. Look up the product for which you wish to see the subsidy feature.
  3. Go to Pricing Facet, then to ‘Charges’ tab and click ‘New’.
  4. Under ‘Price List Entry’ configure the following details:
    • Price List: {Search and select the price list for which you have configured the above pricing elements. }
    • Display Text: $10.00
    • Charge Type: One-time
    • Sub-Type: Standard
    • Selected Pricing Variable: One Time Charge Subsidy
    • Select a Pricing Element: SUBSIDY_10.00-USD
    • Effective From: 1/1/2021 (should be a past date)
    • Active: true
    • Click Save

Test

  1. 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.
  2. Using Developer Console or Salesforce Inspector to check repriced line items - if you can see RegularRecurringCharge__c and OneTimeSubsidyTotal__c with correct data populated - congratulations, you have successfully configured quite complex feature using SFIX!