Use case: Configuration line item to quote line flow
Summarize
Summary of Use case: Configuration line item to quote line flow
This guidance applies to the ServiceNow CPQ Extension for Salesforce CPQ package version 1.8 or later. It enables ServiceNow customers to efficiently parse extended configuration line item data and map it directly to custom fields on both configuration line items and their corresponding quote lines without writing a Quote Calculator Plugin (QCP) script. This simplifies integration and customization by leveraging an existing flow template included with the CPQ Extension.
Show less
For customers using versions earlier than 1.8, a different approach involving the Salesforce Quote Calculator plugin is necessary.
Key Features
- Extended Info Mapping: Extended information added to configuration line items via ProductList.extended can be parsed and mapped to custom fields (e.g., SGFreight) on both configuration line items and quote lines.
- Custom Field Setup: Customers must create corresponding custom fields on both configuration line item and quote line objects (e.g., SGFreightc). Using Schema Builder is recommended for faster creation. Proper field-level security and accessibility settings are required to allow flow modification.
- Flow Adjustment: The “Configuration Line Item to Quote Line” flow in Salesforce Setup > Process Automation > Flows can be modified to add and map these custom fields. This involves editing the “Update Fields” element to include the new field mapping.
- Flow Management: It is recommended to save changes as a new flow rather than overwriting the original template, preserving a fallback option.
- User Interface: Custom fields should be added to the configuration line item and quote line page layouts to display the mapped values clearly to users.
Key Outcomes
- Customers can eliminate the need for custom QCP scripting by using flow configuration to handle extended info mapping.
- Improved maintainability and easier updates to the mapping process via declarative flow changes.
- Clear visibility of extended information on configuration line items and quote lines within Salesforce interfaces.
- Streamlined integration between ServiceNow CPQ and Salesforce CPQ, enhancing quoting accuracy and operational efficiency.
By making a few adjustments to a flow template includes with the CPQ Extension package version 1.8 or later, you can parse the extended information from a configuration and map it to custom fields without using a QCP script.
By default, if you add any extended info to a line item (using ProductList.extended), it will be added as a JSON to the corresponding configuration line item object created as the following:
Before this flow was created, the only way to parse the individual keys and map them to custom fields on the configuration line items or their corresponding Quote Lines was to write a QCP script to do so. This guide will show you how to achieve the same result by making a few adjustments to a flow template included with our CPQ Extension package starting versions 1.8 or later.
Letʼs take the case of the first custom field in the screenshot above. A product is added using an advanced product rule and the freight information is entered as extended info, for this example we will be using SG_Freight so adjust as necessary for your extended info name:
ProductList.extended = {};
ProductList.extended.SG_Freight = cfg.sRFreight;
You must create a SG_Freight_c field on the configuration line item and Quote Line objects (if you just enter “SG_Freight,” SFDC will automatically add the _c). It is recommended to do so with the Schema Builder since
itʼs much faster. If you do choose to add them through the Object Manager, make sure to check the Field Accessibility settings for the created fields so that the flows are able to modify them. Be sure to set the field-level security
on the custom field to be visible for any profile that will be using them.
Next, in SFDC, go to Setup > Process Automation > Flows. Look for the “Configuration Line Item to Quote Line” flow and click it. It should look like this:
Select the Update Fields flow element and click Edit Element. This will open a popup window:
Click + Add Field, and then in the Field column, enter the SFDC field name as below (autocomplete should help you type it in):
If the data is entered correctly, you should see the value for the created field change to the same format as the value above it:
Save the flow and activate. Itʼs recommended to save the flow as a a new flow instead of as a new version, so that youʼll always have the original template to go back to if needed.
Add your fields to the configuration line item and quote line layouts in order to see these values where they belong: