Availability: Business Annual* and Enterprise Annual* plans
* The integration with Salesforce is a paid add-on on the Business and Enterprise plans.
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, Quantity, 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.