Installing the Salesforce ServiceNow Quote Experience Integration Package extension
Install the Salesforce ServiceNow Quote Experience Integration Package Extension to enable ServiceNow Quote Experience with Salesforce.
Prerequisites
This guide assumes that your ServiceNow CPQ environment is integrated with a Salesforce org, and that ServiceNow Quote Experience is enabled. If your Salesforce org has no ServiceNow CPQ packages installed, install version 2.7 or later of the ServiceNow CPQ Managed Package. For instructions, see Installation and setup guide for environments linked to Salesforce orgs.
Note: ServiceNow CPQ ServiceNow Quote Experience has no dependencies on Salesforce CPQ. You can ignore any steps or references specific to Salesforce CPQ.
Submit a support ticket requesting ServiceNow Quote Experience is turned on in your ServiceNow CPQ environment.
Note: Create a support case by using the ServiceNow Support portal. For step-by-step instructions, see Create a case on Now Support for CPQ Customers.
About the ServiceNow CPQ ServiceNow Quote Experience extension
The ServiceNow CPQ ServiceNow Quote Experience Extension is a package of components that Salesforce administrators install on their Salesforce environment to facilitate the integration between Salesforce and ServiceNow CPQ ServiceNow Quote Experience.
Contact ServiceNow customer support for information on the latest version and how to access the managed package for installation.
Admins can install the package for admins only, for all users, or for specific profiles. The package includes permission sets for ServiceNow Quote Experience that can be assigned to individuals or replicated on profiles. To view the permissions sets, in Setup, go to Users, and then see the ServiceNow CPQ.ai Full Access option in Permission Sets.
After it is installed, you can view the version of the package in the Installed Packages section of Salesforce Setup.
Salesforce Setup → Installed Packages
Salesforce: Enable custom address fields
The Salesforce environment must have Custom Address Fields enabled. If this feature is not enabled, see this article for more information: Enable Custom Address Fields
Salesforce: Allow security exceptions for ServiceNow CPQ
Add trusted URLs:
- From Salesforce Setup Home, go to Settings > Security > Trusted URLs. Create a new trusted URL.
- Provide an API name.
- Enter the URL of the ServiceNow CPQ environment, as shown below.
Enable Custom Address Fields
- Under CSP Directives, make sure that at least frame-src (iframe content) is enabled, and click Save.
Enable Custom Address Fields
Configure remote site settings:
- From Salesforce Setup Home, go to Settings > Security > Remote Site Settings. Create a new remote site.
- Provide a name.
- Enter the URL of the ServiceNow CPQ environment as shown in image below, and click Save.
Remote settings
Optionally, allow microphone access for Cosmo Converse (currently in beta). Cosmo Converse allows the user to communicate via voice with ServiceNow Quote Experience By default, this feature is not enabled. To use Cosmo Converse, submit a support ticket that describes your use case. To prepare for Cosmo Converse, update Salesforce settings to allow microphone access.
- From Setup Home, go to Settings > Security > Session Settings.
- Under Browser Feature Permissions, make sure that the check box for Include Permissions-Policy HTTP header is disabled.
- If necessary, click Save.
Session settings
ServiceNow CPQ: Set up the runtime client token
The ServiceNow CPQ runtime client token facilitates authentication for communications from Salesforce to ServiceNow CPQ. For steps to create a runtime client token in ServiceNow CPQ, see Set up a runtime client. For this ServiceNow Quote Experience use case, please be sure to enable permissions on this runtime client for TRANSACTION, and add a valid User ID that is recognized by the corresponding Salesforce environment.
Note that in ServiceNow CPQ Admin, the runtime client token must be updated to include TRANSACTION in its permissions and itself as an origin. (For example, the runtime client token for https://test-txn.test02.cpq must have an origin of https://test-txn.test02.cpq.) Also, when a runtime client token includes TRANSACTION, a user must be included. Make sure that the user has permission to perform the Create Transaction event.
Edit runtime client
When you have set up the runtime client token, copy it to your local clipboard for use in the next procedure.
Install the ServiceNow CPQ Transaction Runtime Token in Salesforce
- From the Salesforce App Launcher, search for and open ServiceNow CPQ.io Admin Custom Settings.
- Press the Set button next to the Runtime Client Token field to enable it.
- Paste the token from ServiceNow CPQ into the editable field, and click Save.
Note: The runtime client token isn’t displayed on the Admin Custom Settings page after it’s been saved.
Salesforce: Update the Opportunity layout to Open ServiceNow Quote Experience
- In Salesforce, click the gear icon in the top right corner.
- Navigate to Setup > Object Manager > Opportunity > Page Layouts.
- Select the page layout to edit. (If you have multiple layouts, choose the one associated with the relevant record type or user profiles.)
Page layouts screen
- Scroll down in the layout editor until you see the Related Lists section.
Page layouts screen
- Drag the Transactions object from the list of available related lists on the top palette to the desired position in the Related Lists section.
Transactions screen
- Click the wrench icon for the Transaction object to open the properties for the related list.
Related List Properties
- In the Selected Fields section, select the Edit Transaction field from the Available Fields column. Click Add to move it to the Selected Fields column. Rearrange the fields as needed, and click OK to save the changes. After making the changes, click Save in the top left corner.
Transactions screen
Test the updated layout.
As an end user (on the buyside of Salesforce), navigate to an Opportunity record.
Ensure that the transaction related list appears on the page and that the Edit Transaction link is visible and functional.
Troubleshooting: If the Transaction button is missing
If the transaction button is missing from the buyside opportunity detail page, follow these steps.
- In the top right corner of the page, click the gear icon, and then click Edit Page. This opens the Lightning App Builder for the Opportunity record page.
Edit page option
- Select the Related Lists component of the page. In the Assign Page Layouts section, find the name of the page layout currently assigned. (In the image, the correct layout is indicated with the word "(previewed).")
menu
- Click the previewed layout and repeat steps 4 through 7 in the "Salesforce: Update the Opportunity layout to Open ServiceNow Quote Experience section (above). Next, on the buyside, navigate to an opportunity record. Check the Related Lists section to confirm that the transaction object appears. Click the arrow, and create a new transaction to validate that the Edit Transaction (EditLink__c) field is available.
Troubleshooting
troubleshooting
Salesforce: Set up custom field mappings
When a new ServiceNow CPQ transaction record is initiated in ServiceNow CPQ, it can be helpful to transfer essential data from the Salesforce transaction record. This section sets up field mappings that copy (or "twin") information from a field in Salesforce to a field in ServiceNow CPQ, or visa versa, during the transaction creation flow. As an example, it is common for the administrator to twin the value held in LGK__OpportunityId__c to the corresponding ServiceNow CPQ transaction field, txn.opportunity.id.
- In Salesforce, go to Setup.
- In the Quick Find bar, search for
Custom Metadata Types. - In the search results, under Custom Code, click Custom Metadata.
Home page
- To access the existing field mappings, locate ServiceNow CPQ.io Transaction Field Mapping in the list of custom metadata types, and click the Manage Records link next to it.
Metadata types
Click New, fill out the required details, and then click Save.
Source fields:
Environment: Choose the source of the field value:
Select Salesforce for fields originating in Salesforce.
Select ServiceNow CPQ for fields originating in ServiceNow CPQ.
Object: Enter
Transaction.- Field: Specify the field name.
- For Salesforce fields, include the
__csuffix (for example,CustomField__c). Review the exact field names from Salesforce > Setup > Object Manager > Transaction > Fields and relationships.
- For Salesforce fields, include the
Field relationship
- For ServiceNow CPQ fields, include prefixes such as `txn.` or `txn.line.` to denote the field \(for example, `txn.TotalAmount`\). Be sure to use the exact field variable names from **Admin** > **Transaction** > **Associated Fields**.
Transactions
Target fields:
- Environment: Indicate where the field value should be updated \(Salesforce or ServiceNow CPQ\).
- Field: Enter the field name of the target in the same format \(for example, Salesforce fields with `__c` or ServiceNow CPQ fields with `txn.` prefixes\).
Metadata screen
Note:
- A field mapping record is included as a reference. This cannot be deleted, but its source and target details can be edited. Verify that your custom added field record matches it.
- If you are uninstalling the managed package, any created records for new custom fields must be deleted first.
Salesforce: Activate Transaction Line to Opportunity Line syncing and asset flows
Note: By default, the following flows are active:
- ServiceNow CPQ.ai Copy Transaction
- ServiceNow CPQ.ai Create Transaction (Record Trigger)
ServiceNow CPQ.ai Create Transaction (Screen)
From Salesforce Setup Home, search for "Flows". Click Process Automation > Flows.
Search for the following. You will perform step 3 for each:
- ServiceNow CPQ.io Opportunity Line Sync (Upsert)
- ServiceNow CPQ.io Opportunity Line Sync (Delete)
- ServiceNow CPQ.io Primary Transaction Change
- For each of the three flows identified in step 2, activate one of the following options:
- Option 1: Using the drop-down menu:
- Click the arrow to the right of the flow name.
Details list
- Select **View Details and Versions**.
- Click **Activate** for the most recent version of the flow.
Flow versions
- Option 2: Open the flow:
- Click the flow name to open it in the Flow Builder.
Flowbuilder
- Click **Activate** at the top right of the Flow Builder.
workflow
Make sure all the flows are in active status.
Note: Opportunity line syncing is applied only to the transaction assigned to the Primary Transaction opportunity field.
End-user flow: Launching a ServiceNow CPQ transaction from Salesforce
Create a transaction record in Salesforce
There are several ways for the end user to initiate a ServiceNow CPQ transaction in Salesforce. The most common flow starts on the Opportunity record.
- From an Opportunity record, click the arrow in the transaction's related list, and then click New.
Sales console
2. A new transaction opens with the **Opportunity** field populated. Fill in **Account**, **Primary Contact**, and any optional fields. Click **Save**.
New transaction
3. A record-triggered flow in the managed package creates a new transaction in ServiceNow CPQ. The UUID of the new ServiceNow CPQ transaction record updates in Salesforce \(**LGK\_\_TransactionUUID\_\_c**\). If the transaction ID does not appear immediately, refreshing the browser usually corrects the anomaly.
Transaction details
If the **Transaction Id** field remains unpopulated after a browser refresh, see the Troubleshooting section below.
Edit a transaction
From a Salesforce transaction (or a transaction related list), ServiceNow Quote Experience can be launched using either the Edit Transaction button on the transaction detail page or the link available via the Edit Transaction field. This loads a ServiceNow CPQ transaction based on the Transaction Id field in the Salesforce record.
ServiceNow Quote Experience loads in an iFrame, replacing the current subtab in Salesforce.
Note: Salesforce's classic UI is not supported.
Copy Transaction
By clicking the Clone button on the Salesforce transaction record, users can call a ServiceNow CPQ Copy event to recreate the transaction and lines in ServiceNow Quote Experience. This action is based on the transaction ID on the header record in Salesforce and results in a cloned transaction record.
Note: Cloning a transaction from Salesforce does not automatically make copies of the affiliated line records to the new transactions. To clone the lines to the new transaction, launch the new (cloned) transaction record in ServiceNow Quote Experience, and initiate a Salesforce sync.
Troubleshooting: ServiceNow CPQ fails to launch with a “Transaction with id ‘null’ could not be found” error
Error message
This error occurs when the creation of a new ServiceNow CPQ transaction record is initiated via API call from Salesforce and fails. This failure usually occurs due to one of two reasons:
- The Transaction runtime token is incorrectly set up or has expired. Review the steps in the "ServiceNow CPQ: Set Up the runtime client token" section above.
- The user creating the ServiceNow CPQ transaction record from the Salesforce UI does not have permission to do so.
To troubleshoot permissions errors, follow these steps.
- In Transaction Administration, click Personas.
- In the list of personas, observe which persona is labeled DEFAULT. The screenshot below shows that "Sales Rep" is the default persona. By default, all new users are assigned this persona.
Related List Properties
- Open each persona record. Find your user name. The user you are debugging should only be visible in one persona. Once you find the appropriate persona, note the view that manages this persona’s access. In the example, the user is among the listed user names in the Sales Rep persona. This persona’s access is managed by the "sales" view.
Personas screen
- Open the view that manages the persona’s access. In our example, the view is named "sales". To open the view, in ServiceNow CPQ Transaction Admin Home, go to Views, and then click the managing view.
Transaction details
- On the view detail page, click Access, click Events, and search for
createTransaction. In the initial stage, the create transaction event (varname: createTransaction) must be set to Active.
Sales screen
To sum up: for any given user, the administrator must manage the items in the following table.
| Issue | Correctio |
|---|---|
| User persona assignment | Navigate to Personas in ServiceNow CPQ Transaction Admin, and select a persona record.
|
| Persona view assignment | In ServiceNow CPQ Transaction Admin, go to Views, select a view record, and then click Associated Personas. |
| View: access to each event, per stage | For information about how to perform fine-grained access administration (recommended), see the Events CSV File section in Quote transaction views. To administer access in a less precise way, go to Events in ServiceNow CPQ Transaction Admin, Select the Create Transaction event, Select Edit Event Access, and set the event access to Active. By default, the event is active across all stages and views. |