Salesforce product mapping
Note:
This guide covers the functionality of the latest version of the PandaDoc <> Salesforce integration.Availability: Business Annual* and Enterprise Annual* plans
* The integration with Salesforce is a paid add-on on the Business and Enterprise plans.
Skip to:
- Enable product merging rules
- Product merging rules overview
- Merge products into specific sections
- Merge products into specific pricing tables
- Sending multiple related lists to the PandaDoc pricing table or quote builder
- Pushing products from different related lists to different sections of a pricing table or quote builder block
All products from your opportunity can now be mapped to specific pricing tables or pricing table sections. No more dragging-and-dropping products to designated sections after they’ve been pulled from Salesforce — now you can have products sorted to sections and pricing tables automatically.
Enable product merging rules
The rules for merging products must be pre-set on a template you’ll use to create documents from Salesforce. Open the Templates section in PandaDoc, then either open the template you’re using for your Salesforce integration or create a new one.
Add a pricing table or find an existing one, then click on the pricing table properties. On the right, click Set up data merge. Alternately, click on Products under the pricing table, then select Set up data merge. You can also right-click on any section header and select Set up data merge from CRM/API.
In the pop-up, select Merge rules > Add rule.
From there, you can set rules to define how products will populate pricing tables.
Product merging rules overview
Here are a couple important notes on merging rules:
- A product can be added to a pricing table only once. If the product fits more than one merge rule in your pricing table, it will follow the first rule only. However, the same product can be added to more than one pricing table in the document.
- If a pricing table doesn’t have any rules set, but data merge is turned on, all products listed in your opportunity will be added to this pricing table
- If a pricing table has at least one rule set, only the products that fit this rule will be added to this pricing table
Rules details and naming conventions
The merging rules are based on if/then logic.
In the If section, you must specify a field name based on the product that will be added to the pricing table or pricing table section.
The field name can be one of the default opportunity product field names — Name, Description, Price, SKU, QTY, Discount, Tax, Tax1 — and it’s crucial that you spell the name exactly as it’s spelled here. The field name can also be any other opportunity product field — if so, it’s important you enter the correct name in the If part. Here’s how:
- Go to Salesforce and open PandaDoc setup
- Find the Configure tokens button, then click on it
- At the top, select Opportunity product. You’ll find the correct field highlighted in yellow on the right. Make sure you use it without the square brackets.
Next, you can specify how PandaDoc should parse the field value and the field value itself.
You can add as many field value conditions as you like.
In the Then section, specify whether or not the product should go to a specific section. You can also simply leave it as Pricing table, no section if you want to filter only the products so that they are added to this specific pricing table.
Merge products into specific sections
In your pricing table, add sections you’ll need to merge products into. In this example, we’ll add a Subscription section and a Services section.
Next, access the merging rules by clicking Products > Set up data merge from CRM/API, or by clicking on pricing table properties > Set up data merge on the right-hand side.
Click Merge rules > Add rule. Specify the conditions for which the products will be filtered, then select the section of the pricing table where you’d like them placed. In this example, we’re filtering based on the Name field, and the Name field must contain “Subscription plan.” Lastly, save the rule.
We’ve done the same for the other section (Services), setting it to filter products based on the Name field. The value should contain “Services.”
When you create a document from Salesforce using this template, products will be filtered based on the merge rules into their respective pricing table sections.
Merge products into specific pricing tables
On your template, add a pricing table and access the merging rules by clicking Products > Set up data merge from CRM/API, or by clicking on pricing table properties > Set up data merge on the right-hand side.
Click Merge rules > Add rule. Specify the conditions for which the products will be filtered. In the Then section, select Pricing table, no section, then save the rule. If the pricing table is empty, products will be added to the top of the pricing table; if you have some products pre-set in the template, new products will be added after the existing ones.
Finally, close the pop-up.
Repeat these steps for each pricing table in the template if you have more than one and want to set rules for each of them. When you create a document from Salesforce using this template, products will be filtered based on the merge rules into respective pricing tables.
Sending multiple related lists to the PandaDoc pricing table or quote builder
Note:
Make sure to update your PadaDoc package in Salesforce to the latest version for this functionality to become available.This functionality works across all Salesforce objects (Opportunities, Leads, Contacts, Accounts, Quotes, and custom object) and allows:
- Sending a combined array of up to 5 related lists to PandaDoc pricing tables or quote builder blocks.
- Sort pricing items from different related lists by merge rules based on unique related list’s field. Can be applied to a single quote builder block (section assignment) and to different quote builder blocks on the same or different templates.
- Send additional property “sObjectType” in the item’s “custom_fields” object, containing the API name of the source object (e.g. OpportunityLineItem).
To configure multiple related lists for your Salesforce object:
- Open the Salesforce object you want to configure multiple related lists for.
- Click on the gear icon on the top of the PandaDoc widget, and select the ‘Configure related objects’ option.
- In the ‘Pricing items related list(s)’ section, choose objects that will be used as pricing items for your object.
- ‘Save’ your configuration.
Pushing products from different related lists to different sections of a pricing table or quote builder block
Column mapping needs to be configured on a template level. By default, data merge for column mapping is enabled for all newly added quote builder blocks in your templates. You can easily verify this by looking at the top-left corner of the quote builder block, where you will find a label 'Data merge is on' if it is enabled.
If data merge is disabled for a quote builder block in the template you're using to create documents from Salesforce:
- Select a quote builder you’d like to set column mapping for, or add a new one.
- Select Properties on the floating panel.
- On the right, select Set up data merge.
- Next, access the data merge in quote builder settings on the right and click Enable.
In the pop-up, select Merge rules > Add rule.
Use ‘sObjectType’ Salesforce field to filter pricing items of different related objects to separate quote builder sections.
When you create a document from your object with multiple related lists, pricing items from the related objects will be distributed into different sections of your quote builder block:
Important to know:
- If you choose 'OpportunityLineItems' and some other related list as pricing items, and have the “Update Opportunity Products” trigger enabled, only opportunity products will be updated. Trigger will not create or update opportunity products from pricing items of other types of objects configured as related lists.
- If you choose multiple relations, items from all objects will be sent as pricing items to PandaDoc pricing table or quote if you have pricing item mappings for all of them.
If mapping is not configured for some of the pricing items, a warning message appears on the setup page, and items from that relationship won’t be sent to PandaDoc. Other relationships with mappings will be sent.