Accelerator Salesforce CPQ Plugin for Pricing - Source
Configuration
The following example shows how to obtain the net unit price from the external system using the Accelerator Salesforce Experience API. The endpoint takes ProductId
, CustomerId
, AdditionalDiscount
, and Quantity
as Input, sends NetUnitPrice
as the response, and updates the NetUnitPrice
in the Salesforce CPQ Quote Line Items.
Prerequisite setup
- Create an APEX class to make a POST call to the Salesforce Experience API.
- In order for the APEX classes to make requests to the Accelerator Salesforce Experience API, you must first grant access in Salesforce. To do this from the Setup section, search for 'Remote Site Settings'. Click 'New Remote Site' and then configure the following:
The remote site URL should look something like 'https://accel-salesforce-exp-api-v2-dev.ca-c1.cloudhub.io/api/products/prices'.Remote Site Name: CPQB_ExtPricing Remote Site URL: (set the base remote URL of the API here) Active: <Checked>
- In order for the APEX classes to make requests to the Accelerator Salesforce Experience API, you must first grant access in Salesforce. To do this from the Setup section, search for 'Remote Site Settings'. Click 'New Remote Site' and then configure the following:
- Create a new Custom Script (SBQQCustomScriptc sObject) in Salesforce.
- Name the new Custom Script.
- Copy the QCP javascript code into the Code field on the Custom Script.
- Save the Custom Script.
- Copy the name of the custom script.
- In Salesforce, navigate to Setup -> Installed Packages -> Salesforce CPQ and click configure.
- Go to the Plugins tab in Salesforce CPQ settings and add the new Custom Script name into the Quote Calculator Plugin field.