Related Pricing Callback Class
Related Pricing Callback allows you to apply custom logic to calculate the related pricing. This callback is invoked while CPQ is calculating related pricing after the main pricing is calculated.
To use the Related Pricing Callback you must create a custom Apex class that implements the Apttus_Config2.CustomClass.IRelatedPricingCallback interface and register the custom apex class with Related Pricing Callback Class. You must write your custom logic in the custom apex class.
The following methods are available in the Apttus_Config2.CustomClass.IRelatedPricingCallback interface:
Method | Signature | Description |
---|---|---|
computeBasePrice() | Apttus_Config2.CustomClass.RelatedPriceResult computeBasePrice(Apttus_Config2.ProductConfiguration, Apttus_Config2.LineItem, List) | You can use this method to apply custom logic for related pricing calculation and override the default CPQ related pricing logic. |
If you have defined Pricing Callback class, Related Pricing Callback is always invoked after the Pricing Callback is executed.
Example
In the following sample code, Related Pricing Callback to calculates the price on related line items.