Availability: Business and Enterprise plans
Merge rules allow you to pull products from your HubSpot deal to specific quote sections and/or specific quote blocks in your documents.
Skip to:
Enable product merging rules
Merge rules must be set up at the template level. Here's how to enable merge rules:
Open the template you’re using for your HubSpot integration, or create a new one.
In the workflow builder, add the Pull data from integration step. Connect your template to the HubSpot object that you will be creating your document from.
Note: Technically, you can skip this step. However, if it is enabled at the template level, the system will automatically pull field names and product information from the selected object to your template. If you skip this step, you will need to manually enter field names when configuring merge rules.Add a Quote block or find an existing one, then select the Quote block Options (gear icon) in the top right.
From the list, select Set up data merge.
Data merge is enabled by default, but if it is not, click Enable.
Product merging rules overview
A few important notes on merging rules:
A product can be added to a quote block only once. If the product fits more than one merge rule in your quote block, it will follow only the first rule. However, the same product can be added to more than one quote block in the document.
If a quote block doesn’t have any rules set, but data merge is turned on, all products listed in your deal will be added to this quote block.
If a quote has at least one rule set, only the products that fit this rule will be added to this quote block.
Rules details and naming conventions
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 quote or quote section.
The field name can be one of the default deal product field names (Name, Description, Price, Quantity, Discount) or a custom one. If you added the 'Pull data from integration' step to your template workflow, the system will pull the product fields from HubSpot into a dropdown menu for you to choose from. If you enter the product field name manually, it is crucial that you spell it exactly as shown here: Name, Description, Price, Quantity, Discount.
Next, you can specify how PandaDoc should parse the field value and the field value itself.
Important notes:
When you choose Discount as a field name in the If section, only “Contains” and “Doesn’t contain” can be selected as its value. With “Equals” and ”Doesn’t equal” values, products won’t be passed to the quote block.
If you choose Quantity as a field name in the If section, and the quantity of your product in HubSpot is blank, the value should be set as “0” under Merge rules so the products will be pulled.
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. If your section has no name, you will see the 'Section without name' option.
Merge products into specific sections
In your quote block, add sections you’ll need to merge products into. To add a section click +Section under the quote; if necessary, you can rename your section. In this example, we’ll add a Subscription section and a Services section.
Next, click on your quote block and select Options (gear icon) in the top right. Select Set up merge rules from the dropdown. In the data merge window, switch to the Merge rules tab.
Next, select Merge rules, then click Add rule. Specify the conditions for which the products will be filtered, then select the section of the quote where you’d like them placed. In this example, we’ve filtered based on the Name field — the Name field must contain “Plan.” Lastly, add 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 HubSpot using this template, products will be filtered into their respective quote sections, based on the merge rules.
Merge products into specific quotes
On your template, add a quote block and access the merge rules by clicking Options (gear icon) on the top right. Then select Set up data merge.
Select Merge rules > Add rule. Specify the conditions for which the products will be filtered. In the Then section, select "Section without name" then save the rule. If the quote is empty, products will be added to the top of the quote block; if you have certain 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 quote block in the template if you have more than one and want to set rules for each of them. When you create a document from a HubSpot deal using this template, products will be filtered into their respective quote blocks based on the merge rules.














