Custom scripts can add extra functionality to the quote line editor. Review the sample
script to learn how to use JavaScript to apply discounts to selected consumption rates on a
consumption schedule. (Salesforce CPQ Managed Package)
Required Editions
Available in: Salesforce CPQ Winter ‘19 and later
To create or modify custom scripts, users require the Customize Application permission.
Javascript Quote Calculator plugins don't support custom fields on consumption rates and
consumption schedules.
When a user manually changes a field value that was set by a Quote Calculator
plugin, the system prioritizes the value calculated by the plugin and
overwrites
the value that the user manually entered.
Example
This custom script uses a custom quote field called UbpDiscount__c.
We use three kinds of cookies on our websites: required, functional, and advertising. You can choose whether functional and advertising cookies apply. Click on the different cookie categories to find out more about each category and to change the default settings.
Privacy Statement
Required Cookies
Always Active
Required cookies are necessary for basic website functionality. Some examples include: session cookies needed to transmit the website, authentication cookies, and security cookies.
Functional Cookies
Functional cookies enhance functions, performance, and services on the website. Some examples include: cookies used to analyze site traffic, cookies used for market research, and cookies used to display advertising that is not directed to a particular individual.
Advertising Cookies
Advertising cookies track activity across websites in order to understand a viewer’s interests, and direct them specific marketing. Some examples include: cookies used for remarketing, or interest-based advertising.