Annual Pricing Variable

A custom field with a defined pricing variable alone isn't sufficient for annual prices. Rollups are needed for both the line items and the order header. The order total must incorporate the annual prices, and these prices must be capable of handling adjustments, discounts, and other modifications.

Annual pricing variable enables users to specify an annual price for products within the Enterprise Product Catalog (EPC). This pricing detail can then be utilized in both the Industries Configure, Price, Quote (CPQ) Cart and the Standard Digital Commerce API.

Field LabelField NameData TypePurpose
Annual ChargeAnnualCharge__cCurrency(16, 2)Store base annual price from PLE or ABP
Annual Calculated PriceAnnualCalculatedPrice__cCurrency(16, 2)Net price, if discount is present
Annual Effective TotalAnnualEffectiveTotal__cCurrency(16, 2)Annual total for root items (Bundle Total)
Annual Manual DiscountAnnualManualDiscount__cPercent(2, 2)Discount percentage field
Annual TotalAnnualTotal__cCurrency(16, 2)Total for calculated price and rollup with quantity
Field LabelField NameData TypeFormula
Total: Annual ChargesAnnualTotal__cRoll-Up Summary (Annual Total)-
Effective Total: AnnualAnnualEffectiveTotal__cRoll-Up Summary (Annual Effective Total)-
Order TotalOrderTotal2__cFormulavlocity_cmt__OneTimeTotal__c + vlocity_cmt__Tax__c +( vlocity_cmt__RecurringTotal__c * vlocity_cmt__NumberOfContractedMonths__c )+(AnnualTotal__C*(vlocity_cmt__NumberOfContractedMonths__c/12))
Effective Order TotalEffectiveOrderTotal2__cFormulavlocity_cmt__EffectiveOneTimeTotal__c + vlocity_cmt__Tax__c +( vlocity_cmt__EffectiveRecurringTotal__c * vlocity_cmt__NumberOfContractedMonths__c ) + (AnnualEffectiveTotal__c * (vlocity_cmt__NumberOfContractedMonths__c) / 12)

The total formulas use the vlocity_cmt__NumberOfContractedMonths__c field to prorate Annual totals. This can be adjusted or changed independently without affecting the rest of the configuration.

Pricing Variable NameCodeAggregationCharge TypeFrequencyScopeApplies To VariablePricing Variable Binding NameObjectFieldTypeSub-TypeValueType
Annual Charge Adjustment AbsoluteANNUAL_CHARGE_ADJ_ABSUnitAdjustmentYearlyLineAnnual Std PricePriceStandardPricing Element
Annual Charge Adjustment PercentANNUAL_CHARGE_ADJ_PERCUnitAdjustmentYearlyLineAnnual Std PricePriceStandardPricing Element
Annual Std PriceANNUAL_CHARGEUnitRecurringYearlyLineAnnual Std Price - OrderItemOrderItemAnnualCharge__cPriceStandardPricing Element
Annual Std Price CalculatedANNUAL_STD_PRC_CALCUnitRecurringYearlyLineAnnual Std Price Calculated - OrderItemOrderItemAnnualCalculatedPrice__cPriceStandardCalculated
Annual Std Price Discount Pct ManualANNUAL_STD_PRC_DISC_PCT_MANUnitAdjustmentYearlyLineAnnual Std PricePriceStandardCalculated
Annual Std Price TotalANNUAL_STD_PRC_TOTALQuantityRecurringYearlyLineAnnual Std Price Total - OrderItemOrderItemAnnualTotal__cPriceStandardCalculated
Effective Annual Std Price TotalEFF_ANNUAL_STD_PRC_TOTALQuantityRecurringYearlyLineEffective Annual Std Price Total - OrderItemOrderItemAnnualEffectiveTotal__cPriceStandardCalculated
Group Rollup Annual Std Price TotalGROUP_ROLLUP_ANNUAL_STD_PRC_TOTALQuantityRecurringYearlyGroup RollupParent Rollup Annual Std Price TotalPriceStandardCalculated
Parent Rollup Annual Std Price TotalPARENT_ROLLUP_ANNUAL_STD_PRC_TOTALQuantityRecurringParent Rollup Annual Std Price Total - OrderOrderItemAnnualEffectiveTotal__cPriceStandardCalculated
Rollup Annual Std Price TotalROLLUP_ANNUAL_STD_PRC_TOTALQuantityRecurringRollupAnnual Std Price TotalPriceStandardCalculated

Here's the sample code for creating a custom pricing hook.

First, create the interface. Then, associate the Active Implementation Class from the Interface Implementation Detail related list. The Active Implementation Class field will be automatically populated once the implementation record is created.

  • Interface Name: CpqPricingVariableCalcHook
  • Active Implementation Class: PricingVariableMapHookImplementation

You need to enable standard digital commerce. See Enable Standard Digital Commerce.

NameDestination Field nameDestination SObject TypeSource Field NameSource SObject TypeSource Field Type
OrderItem>CPQCartDocumentItem101AnnualChargeCpqCartDocumentItemAnnualChargeOrderItemstring
OrderItem>CPQCartDocumentItem102AnnualCalculatedPriceCpqCartDocumentItemAnnualCalculatedPriceOrderItemstring
OrderItem>CPQCartDocumentItem103AnnualEffectiveTotalCpqCartDocumentItemAnnualEffectiveTotalOrderItemstring
OrderItem>CPQCartDocumentItem104AnnualManualDiscountCpqCartDocumentItemAnnualManualDiscountOrderItemstring
OrderItem>CPQCartDocumentItem105AnnualTotalCpqCartDocumentItemAnnualTotalOrderItemstring

You need to add fields to the basket. See Add Fields to the Basket.