Javascript Quote Calculator Plugin
Add extra functionality to the quote line editor in Salesforce CPQ with custom JavaScript code. Seven available methods allow you to change how calculations are performed and manage page-level security such as field visibility.
| Required Editions |
|---|
| Available in: Salesforce CPQ Winter ’16 and later |
JavaScript code is saved in Salesforce CPQ as custom scripts.
- Quote Calculator Plugin Guidelines
Consider these key guidelines when planning scripts for the Javascript Quote Calculator Plugin. - Quote Calculator Plugin Methods
The Quote Calculator Plugin can reference these seven methods. You can export any, all, or none of them to achieve your desired behavior. - Calculating True End Date and Subscription Term
Use JavaScript to make a Quote Line Calculator plugin that calculates values and stores maximum values for the custom quote line fields True Effective End Date and True Effective Term. - Custom Package Total Calculation
The sample JavaScript script can be used in the Quote Line Calculator to calculate the total price for all components in a quote line and then store that value in a custom field. - Find Lookup Records
Use this sample JavaScript script in the Quote Line Calculator to query records within the plugin and to set each quote line’s Description field using fields from those records. - Insert Records
The sample JavaScript script can be used in the Quote Line Calculator to insert records. - Javascript Page Security Plugin
Use Javascript functions to control field visibility and editability on your CPQ quotes. - Legacy Page Security Plugin (Apex)
The Salesforce CPQ Apex page security plugins let developers control field-level visibility or data entry mode in Salesforce CPQ VisualForce pages. - Guidelines for Heroku in Quote Calculator Plugins
Salesforce CPQ quote calculator plugins call Heroku to perform asynchronous calculations. When you write a quote calculator plugin, review important guidelines for working with the Heroku service.