Download page Customizing CPQ Using Callbacks.
Customizing CPQ Using Callbacks
Callbacks provide you with a mechanism to apply custom logic on different components of CPQ like line items, Cart page, Catalog page at run-time. For example, you can apply custom pricing or validation on the line items in the cart using Pricing Callback Class and Validation Callback Class. Callbacks are implemented using interfaces that are specific to each callback. These interfaces have various methods you can use to achieve your task. You must implement the interface in an Apex class and within that Apex class, you must configure your custom logic using the methods of the interface. Once you implement the interface, register that Apex class in Custom settings to invoke the callback class on run-time.
To register Callback Class in Custom Settings
To use the Callback Class you created in Apex Classes you must register the Callback Class in the Config Custom Classes Custom Settings. Follow the steps below to register the Callback Class
- Go to Setup > Develop > Custom Settings.
- Click Manage next to Config Custom Classes.
Click Edit next to the Config Custom Classes dataset.
Avoid creating multiple datasets. Only create a new dataset if the Config Custom Classes dataset is missing. You must create a new entry with the name Config Custom Classes.
- Enter the name of the custom Apex class next to the Callback you implemented.
- Click Save.
In this section the following Callbacks are described: