- 27 Apr 2023
- 13 Minutes to read
- Print
- DarkLight
Configure Salesforce CPQ Connector
- Updated on 27 Apr 2023
- 13 Minutes to read
- Print
- DarkLight
Use the steps in this topic to set up CPQ Connector in your Salesforce org.
Step 1: Install CPQ Connector
In your Salesforce org, install the Zilliant CPQ Connector managed package. Contact your Zilliant representative for the latest CPQ Connector package.
Step 2: Configure CPQ Connector as a plugin
- From Setup, navigate to Apps > Packaging > Installed Packages.
- Find Salesforce CPQ on the list of packages, then select Configure.
- In the dialog that appears, select the Plugins tab.
- In the Quote Calculator Plugin field, enter
ZilliantDiscountLookupScript
. - Select Save.
Step 3: Locate your domain name
Locate your environment's domain name.
- From Setup, navigate to My Domain.
- Save the value of My Domain Name. You will use this value in Step 4.
Step 4: Create an authentication provider
Create an authentication provider for Zilliant IQ Interface web services.
- From Setup, navigate to Identity > Auth. Providers.
- Create an authentication provider. Use the values shown in the following table.
Item | Value |
---|---|
Provider Type | ZilliantSalesforceAuthProvider |
Name | ZPQAuthProvider |
URL Suffix | ZPQAuthProvider |
Authorization URL | https://login.salesforce.com/services/oauth2/authorize |
Connected App Consumer Key | Unique value provided by your Zilliant representative |
Connected App Consumer Secret | Unique value provided by your Zilliant representative |
Redirect URI | https://{MyDomainName}.my.salesforce.com/services/authcallback/ZPQAuthProvider |
Token URL | https://login.salesforce.com/services/oauth2/token |
Execute Registration As | Specify an admin or DevOps user proxy for running the CPQ Connector services. This user must have the Manage Users permission and have all ZPQ packaged Custom Metadata Type enabled. |
Step 5: Create a remote site
Create a remote site for the API URL to your customer-specific web services host for Zilliant IQ Interface.
- From Setup, navigate to Security > Remote Site Settings.
- Create a remote site with the values shown in the following table.
Item | Value |
---|---|
Remote Site Name | Z_API_Service |
Remote Site URL | Unique value provided by your Zilliant representative |
Active checkbox | Select this option |
Step 6: Create a named credential
- From Setup, select Security > Named Credentials.
- Create a named credential with the values shown in the following table.
Item | Value |
---|---|
Label | Zilliant CPQ API |
Name | ZilliantCPQ |
URL | Enter the same value you used for Remote Site URL |
Identity Type | Named Principal |
Authentication Protocol | OAuth 2.0 |
Authentication Provider | ZPQAuthProvider |
Select the Start Authentication Flow on Save checkbox.
Clear the Generate Authorization Header checkbox.
Select the Allow Merge Fields in HTTP Header checkbox.
Select Save. A Salesforce login screen appears.
Sign in with the identity provider credentials provided by your Zilliant representative.
Step 7: Verify ID values
CPQ Connector passes the following values from your Salesforce CPQ quotes to a Zilliant web service API:
- Account ID
- Product ID (SKU)
- Quote ID
- Quote line ID
The ID values from your Salesforce objects must exactly match the ID values used in the various data entities built from the data that you periodically upload to Zilliant.
Review your input/output specification for Zilliant products. Make sure you are uploading values for account, product, quote, and quote line ID parameters that match the ID values used in the corresponding Salesforce CPQ-related objects and fields. Contact your Zilliant representative for assistance.
For more information, read the Salesforce documentation for Configure Price Quote (CPQ).
Step 8: Configure metadata
Configure a set of specific custom metadata types installed by the Zilliant CPQ Connector managed package.
The Zilliant CPQ Connector package installs six custom metadata types in your Salesforce org. You must define them with some unique configuration values provided by your Zilliant representative. These provide mappings to your unique Zilliant web services API formulas that provide integrated product pricing from Zilliant IQ Platform, Price IQ, and Deal Manager, as well as to the input parameters from Salesforce CPQ that are needed by those API formulas.
Formula configuration
Values provided by your Zilliant representative may differ from the examples in the following steps. For example, Result values must match the contents of the JSON return from the formula call.
- From Setup, select Custom Code > Custom Metadata Types.
- Edit the Formula Configuration entry. Select Manage Records, then define the values shown in the following table:
Item | Value |
---|---|
Label | Provided by yourZilliant representative. |
Formula Configuration Name | Provided by your Zilliant representative |
Formula Name | Provided by your Zilliant representative |
Formula Evaluation Service Path | /v1/FormulaEvaluation |
Quantity Breaks Result | CPQQuantityBreaks |
Default Discount Result | CPQGuidance |
- Repeat these steps for all formula configurations specified by your Zilliant representative. Your environment might use only one formula configuration or several. Each formula configuration is uniquely identified by its Label value, and each formula parameter mapping in the next step will be linked to one of these formula configurations by specifying the configuration's Label in the Formula Configuration field of each parameter mapping.
- Optionally select the Debug Mode Enabled option to allow formula debug information to be submitted to the developer console when you invoke the CPQ Quote Calculator plugin. Your Zilliant representative might ask you to enable this option if they need to troubleshoot the formula configuration.
Map Formula Parameter Account fields
Your Zilliant representative will provide you with a list of fields from your Salesforce Account object that must be mapped as input parameters.
- From Setup, select Custom Code > Custom Metadata Types.
- Select Manage Records and edit the Formula Parameter Account Field Mapping entry.
- Repeat the following steps for each Account field you are mapping as an input parameter:
- Select New, then define the following with values provided by your Zilliant representative:
- Label
- Formula Configuration
- Formula Parameter Account Field Mapping Name
- Account Field Name
- Formula Parameter Name
- Select New, then define the following with values provided by your Zilliant representative:
- Make sure that Protected Component is not selected.
- Select Save.
Map Formula Parameter Product fields
Your Zilliant representative will provide you with a list of fields from your Salesforce Product object that must be mapped as input parameters.
- From Setup, select Custom Code > Custom Metadata Types.
- Select Manage Records to edit the Formula Parameter Product Field Mapping entry.
- Repeat the following steps for each Product field you are mapping as an input parameter:
- Select New, then define the following with values provided by your Zilliant representative:
- Label
- Formula Configuration
- Formula Parameter Account Field Mapping Name
- Product Field Name
- Formula Parameter Name
- Make sure that that Protected Component is not selected.
- Select Save.
- Select New, then define the following with values provided by your Zilliant representative:
Map Formula Parameter Quote fields
Your Zilliant representative will provide you with a list of fields from your Salesforce Quote object that must be mapped as input parameters.
- From Setup, select Custom Code > Custom Metadata Types.
- Select Manage Records to edit the Formula Parameter Quote Field Mapping entry.
- Repeat the following steps for each Quote field you are mapping as an input parameter:
- Select New, then define the following with values provided by your Zilliant representative:
- Label
- Formula Configuration
- Formula Parameter Quote Field Mapping Name
- Quote Field Name
- Formula Parameter Name
- Make sure that Protected Component is not selected.
- Select Save.
- Select New, then define the following with values provided by your Zilliant representative:
Map Formula Param Quote Line fields
Your Zilliant representative will provide you with a list of fields from your Salesforce Quote Line object that must be mapped as input parameters.
- From Setup, select Custom Code > Custom Metadata Types.
- Select Manage Records to edit the Formula Param Quote Line Field Mapping entry.
- Repeat the following steps for each Quote Line field you are mapping as an input parameter:
- Select New, then define the following with values provided by your Zilliant representative:
- Label
- Formula Configuration
- Formula Parameter Quote Line Field Mapping Name
- Quote Line Field Name
- Formula Parameter Name
- Make sure that Protected Component is not selected.
- Select Save.
- Select New, then define the following with values provided by your Zilliant representative:
Map Formula Result Quote Line fields
- From Setup, select Custom Code > Custom Metadata Types.
- Select Manage Records to edit the Formula Result Quote Line Field Mapping entry.
- Repeat the following steps for each Formula Result you are mapping as an input parameter:
- Select New, then define the following with values provided by your Zilliant representative:
Label
Formula Configuration
Formula Result Quote Line Field Mapping Name
Formula Result Name
Quote Line Field Name - Make sure that Protected Component is not selected.
- Select Save.
- Select New, then define the following with values provided by your Zilliant representative:
Step 9: Configure the CPQ Connector custom script
Configure the CPQ Connector custom script named ZilliantDiscountLookupScript
to list all Salesforce object fields that were used in formula parameter mappings from Step 8.
This step is important for maximizing the default performance when sales reps request Zilliant pricing guidance for a quote. When properly configured, the script ensures that pricing guidance recalculation is performed only for the quote lines that have been updated since the most recent request for pricing guidance.
You can also configure a real-time override of this default behavior. See Step 10.
- From the Lightning App Launcher, open the Custom Scripts app.
- From the list of custom scripts, ensure that you're viewing all records, then select ZilliantDiscountLookupScript.
- Scroll until you find the Quote Fields, Quote Line Fields, Quote Line Group Fields sections, then select Edit.
- In the list that appears, specify every Salesforce object field that was used in the formula parameter mappings from [Step 8].
For example, if a formula API call uses mydom__Shipping__c
as a parameter, specify this parameter in the list of fields. Make sure that the list also includes zpq__GuidanceParameterHash__c
. If it does not, add it.
This list must include all of the Salesforce fields used in the formula parameter mappings. Don't specify fields that aren't used in CPQ Connector formula parameter mappings, because this could negatively impact performance.
- Select Save.
Step 10 (optional): Configure the Quote Line Editor page
Optionally configure the Quote Line Editor page in Salesforce CPQ to display an Update All Lines with Guidance option. This option enables sales reps to override the default behavior to update all or only changed quote lines with Zilliant pricing guidance.
For best default performance, CPQ Connector recalculates Zilliant pricing guidance only for those quote lines that have been updated since the most recent request for Zilliant pricing guidance.
This optional step reveals an Update All Lines With Guidance option in the Salesforce CPQ Quote Line Editor. Selecting this option enables your sales reps to temporarily override the default behavior. It requests Zilliant pricing guidance for all quote lines, regardless of whether the lines have been updated since the most recent request for Zilliant guidance. This enables sales reps to update an entire quote with the most recent Zilliant pricing guidance, even if only some lines have been updated since the last time they requested pricing guidance.
- From Setup, select Object Manager.
- Look for the Salesforce Quote object with the
SBQQ__Quote__c
API name. This is the CPQ Connector-specific Quote object. - Select the object label, then select Field Sets.
- From the list of field sets that appears, select Line Editor.
- From the toolbox in the top bar, drag the Update All Lines with Guidance field into the desired position in the list of fields.
The fields in this set are the Quote Fields that appear above the table of Quote Lines in the Quote Line Editor page. After you add the Update All Lines with Guidance field to the set, the Update All Lines with Guidance option appears in the Quote Line Editor view.
Step 11 (optional): Configure custom action buttons
You can configure your Salesforce CPQ quote lines to display action buttons that launch analytics from Tableau workbooks for your Zilliant products. These action buttons are not enabled by default in CPQ Connector. Salesforce CPQ supports a maximum of five custom actions for the Quote Line Editor.
Your Zilliant representative can provide additional configuration information about your Tableau workbooks to configure this feature.
The custom action buttons will not perform correctly in the CPQ Quote Line Editor unless you first save all in-progress quote lines (for example, by selecting Quicksave.) If you enable this feature, be sure to let your Salesforce CPQ users know this is required.
Prerequisites
To configure the feature, you need the following information from your Zilliant representative:
- Customer-specific API endpoint URLs for the Zilliant Analytics service.
- If not already embedded in the API endpoints, the exact names of the Tableau workbooks and worksheets you will call with these custom action buttons.
- The exact names of the Tableau parameters used within the Tableau worksheets.
In this procedure you'll work with the Custom Actions feature of Salesforce CPQ. For more information about this feature, read Custom Actions in Salesforce CPQ help.
- From the Lightning App Launcher, select Custom Actions.
- On the Custom Actions page, select New.
- Define the following values on the Details tab of the new custom
action:- Name—ViewAnalytics (or something similar). The name must be a single string with no spaces or special punctuation.
- Display Order—Select the order in which the action should appear in the UI.
- Type—Select Button.
- Active—Select this option.
- URL Target—Select Popup.
- URL—Skip this value for now. You'll specify this after you create an Analytics Service Configuration in a later step.
- Page—Select Quote Line Editor.
- Location—Select Line.
- Icon—Select Chart.
- Label—Select a label for the action button. The name should imply the type of analytics worksheet that will appear. If an existing label does not work, your Salesforce CPQ Administrator may add a new picklist value to this field on the Custom Action object.
- In Custom Action editor, select the Related subtab to view additional configuration sections for the custom action.
- In the Analytics Service Configurations section, select New.
The Analytics Service Configurations related list may need to be added to the Custom Actions page layout by your Salesforce CPQ Administrator.
- Define the following values on the Details subtab:
- Analytics Service Configuration Name—Specify a unique name to describe this predefined call to the Analytics service of the Zilliant web services API. The value must be a single string with no spaces or special punctuation.
- Service Endpoint—Customer-specific API endpoint for the Zilliant Analytics service, provided by your Zilliant representative. The endpoint might specify a target workbook, or a target workbook and worksheet. If so, the next two fields are optional.
- Tableau Workbook—Name of a Zilliant-managed Tableau Server workbook provided by your Zilliant representative. This value is required if the Service Endpoint does not specify a target workbook.
- Tableau View—Name of a specific worksheet in the workbook provided by your Zilliant representative. If this value is omitted, then the entire workbook appears, enabling users to browse all workbook sheets.
- Custom Action—Enter the value you specified for Name.
- X-Forwarded Host—Enter your Zilliant tenant specific API URL provided by your Zilliant representative.
- Select Save to return to the Custom Action editor.
- Select the Analytics Service Configuration record you created.
- In Analytics Service Configuration editor, select the Related subtab to view additional configuration sections for the analytics service configuration.
- In the Tableau Parameters section, select New.
- Edit the Tableau Parameters entry, then define the values shown in the following table:
Field | Value |
---|---|
Tableau Parameters Name | Id |
Analytics Service Configuration | Enter the value you specified for Analytics Service Configuration Name |
Source Relationship | Id |
Select Save to exit the Tableau Parameters editor. Repeat Steps 7-9 for all Tableau parameters specified by your analytic. Your embedded analytic might use only one Tableau parameter or several.
- Tableau Parameters Name—Specify the Tableau parameter used in the worksheet. Tableau Parameter names are case sensitive.
- Analytics Service Configuration—Enter the value you specified for Analytics Service Configuration Name.
- Source Relationship—Specify the Salesforce CPQ API field name that stores the value to be passed into the Tableau parameter, such as
SBQQ__ProductCode__c
orSBQQ__Quote__r.Ship_To__c
.
(optional) Configure Tableau Options to optionally pass rendering parameters to the viewport that renders the Tableau workbook. Tableau option names (URL parameter names for iframe tags) are case sensitive. For more information, refer to the Tableau documentation about URL parameters for iframe tags.
On the Details subtab, select Custom Action.
In the Custom Action editor, specify the URL value. Construct this value as shown in the following table:
Segment | Description |
---|---|
/apex/zpq__AnalyticsRenderer?endpoint= | Use this string |
AnalyticsServiceConfigurationName | Name you defined previously |
&recordId={!Id} | Use this string |
For example:
/apex/zpq__AnalyticsRenderer?endpoint=myAnalyticsServiceConfig&recordId={!Id}
- Select Save to exit the Custom Action editor.