Loading
Manage Your Quotes with CPQ
Table of Contents
Select Filters

          No results
          No results
          Here are some search tips

          Check the spelling of your keywords.
          Use more general search terms.
          Select fewer filters to broaden your search.

          Search all of Salesforce Help
          Enhance Quotes with Custom Scripts

          Enhance Quotes with Custom Scripts

          Use JavaScript code to add extra functionality to the CPQ quote line editor. Custom scripts are called by the Quote Calculator Plugin. (Salesforce CPQ Managed Package)

          Required Editions

          Available in: Salesforce CPQ Winter ’16 and later

          Salesforce CPQ calculates quotes based on products, schedules, and configurations made in the quote line editor. Calling a custom script in the Quote Calculator Plugin is the only way to change how the quote calculator uses this data to compose the quote. For example, to add an extra discount to designated lines on the quote, use a custom script. Or, use a custom script to change field visibility. Find out more about supported methods and view sample scripts in the Quote Calculator Plugin section of the Salesforce CPQ Plugin Developer Guide.

          Custom scripts can’t be used to create invalid calculation conditions, such as setting up consumption rate tiers that overlap.

          Select the custom scripts object in the app picker to view, create, or edit your custom scripts. You can create multiple scripts, but the Quote Calculator Plugin can only call one script.

          • Call a Custom Script in the Quote Calculator Plugin
            Use custom JavaScript code in CPQ calling custom scripts from the Quote Calculator Plugin. (Salesforce CPQ Managed Package)
          • Custom Scripts for Discounting Consumption Rates
            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)
          • Custom Script Fields
            When using the Quote Calculator Plugin to call a CPQ custom script, it’s important to understand what values to enter in fields. (Salesforce CPQ Managed Package)
           
          Loading
          Salesforce Help | Article