Requirement
In Edit quote lines screen of Salesforce CQP, we need to add a custom field "Budget" and add a JS script to auto-calculate the additional discount % applicable on all the lines, so that the quote total is equal to the custom field "Budget" amount.
The additional discount % field must be editable to that user can still adjust the discount line by line.
Research done so far
For the budget field, we found that a custom field must be created on Salesforce CPQ Quote object and added to the appropriate field set used by CPQ package, so that it becomes visible on the CPQ quote edit line screen.
It is also understood that the calculation can be achieved by the Javascript quote calculator plugin.
But we are new to CPQ and documentation found so far is not clear enough to answer the questions below but maybe we are missing something.
Call a Custom Script in the Quote Calculator Plugin
Javascript Quote Calculator Plugin
Questions:
- where do we write/save the script to perform the additional discount % calculations in the quote line table ?
- Any pointers to some documentation about how to go about writing such script ?
- What is the procedure to deploy CPQ custom JS script to higher environments (sandbox and production) ?
Any help is appreciated, thanks