Lets discuss about the custom apex code to handle some more complex pricing scenarios using Pricing Call Back class.
What is Pricing Call Back class:
This is an Apex class provided by Apttus itself to define our own custom logic to handle the scenarios which are not possible by Apttus OOB configurable features.
It executes when:
- When we land on the Cart.
- When we make any change in Price or Quantity or any kind of adjustment in cart and hit the ‘Reprice’ button.
- Different modes of execution, which would be discussed in detail later.
Apex code executes and performs the actions as defined.
From where it is being called or executed?
Is it called from any Trigger or any Process Builder or from a Visualforce Page or from a Lightning component?
No, Actually not from any of the above.
We need to set the class name in one of the ‘Custom Setting’.
From Custom setting, Apttus Pricing Engine read this class and executes the code, Apttus take care of it by itself. You just need to define logic in the given class.
Which Custom Setting?
Navigate to custom settings and find the below custom setting.
‘Config Custom Classes’
Here is the class name (‘APTS_PricingCallBack’) you need to define.
Note: Some time if your cart is not behaving properly or showing some error, just remove this class from custom setting. There may be a chance of bug in this class if it is not written properly.
There are some standards that we need to follow when we write this class’s code, otherwise there would be a chance that it will not handle bulk data or bulk line items processing.
If you have any question or query related to this post, feel free to contact on +918574715370 or email@example.com
***All rights of contents and logo are reserved to APTTUS Corporation.