Info

This simple scenario shows how to configure saving regular price in a dedicated field, ie. before applying discounts or manual overrides

Configure New Custom Fields on QuoteLineItem and OrderItem

  1. Go to Setup and click Object Manager.
  2. Create Regular Recurring Charge for QuoteLineItem and ‘OrderItem’ objects.
    • Data Type: Currency
    • Field Label: Regular Recurring Charge
    • Field Name: RegularRecurringCharge
    • Length: 16 and Decimal Places: 2
  3. 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 Recurring Monthly Regular Price pricing variable with following required values:
    • General Properties Facet
      • Name: Monthly Recurring Regular Price
      • Code: REC_MNTH_REG_PRC
      • Active: True
      • Charge Type: One-time
      • Sub-Type: Standard
      • Type: Price
      • Value Type: Pricing Element
      • Scope: Line
      • Aggregation: Unit
      • Click Save
    • Pricing Variable Bindings for QuoteLineItem
      • Name: Recurring Monthly Regular Price - QuoteLineItem
      • Destination SObject Type: QuoteLineItem
      • Destination Field API Name: RegularRecurringCharge__c
    • Pricing Variable Bindings for OrderItem
      • Click New Pricing Variable Binding
      • Name: Recurring Monthly Regular Price - OrderItem
      • Destination SObject Type: OrderItem
      • Destination Field API Name: RegularRecurringCharge__c
    • Click Save

Configure Pricing Plan

  1. Add new Pricing plan step to populate REC_MNTH_REG_PRC pricing variable, make sure it fires after Initialize Pricing Variables and before Apply Context Discounts (32 for out of the box pricing plan) or any other pricing plan step which affects the price
    • Implementation Name: SfixWrapper
    • Method Name: PricingVariableCalculation
    • Sequence: 32
  2. Go to Vlocity CMT Administration > Maintenance Jobs and clean CPQ cache by clicking Start for CLEAR MANAGED PLATFORM CACHE

Test

  1. Open CPQ cart and run pricing (eg. add to cart) - 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 populated - congratulations, you have successfully configured your frist new feature using SFIX!