Smart content block. Conditional content
Availability: Business* and Enterprise plan
* The feature is available as a paid add-on.
Note:
A user in an Admin or Manager role can set up conditional content in all templates. A user in a Member role can set up conditional content only in their own templates.A smart content block comprises two features:
- Pre-selected content (included in Business Plan). This feature allows you to limit the number of content library items other users on your account can add to a document. You can find out more about pre-selected content here.
- Conditional content (included in Enterprise Plan). This feature is tailored for advanced document automation needs and it allows you to dynamically populate content library items based on pricing table or variable values when a user generates a document from a template.
This article provides a comprehensive guide to understanding and utilizing the Conditional content feature.
Skip to:
Watch an overview video:
Register for our self-paced course on how to setup conditional smart content.
How to set up rules for conditional content
Start by adding a smart content block to your template. Next, click on the block or Properties on the floating panel, then select Conditional content. Continue by selecting Add rule in the properties panel on the right.
Note:
You can't add a Smart Content block to a cover page or an uploaded page.Using variables as a trigger for smart content
In the pop-up, select a variable your rule will be based on — you can choose any variable from the dropdown or enter your CRM variable. Make sure the CRM variable name is the exact same in the rule and the CRM.
Note:
You can set up to 50 conditions per rule, with a maximum of 10 content library items per condition.Rules are based on if/then logic.
In the If section, you’ll need to select an operator ("equal", "not equal", "empty", "not empty", "contains", or "does not contain", and specify a variable value based on which content library items will be auto-populated in the smart content block. Conditional content can be based on a role or system variable (including pricing table variables), or any of your CRM variables.
Note:
It’s crucial that you spell the variable exactly as it’s spelled in the PandaDoc variables tab or your CRM variables list. However, variable values are case-insensitive (example: “USA” is the same as “usa”).In the Then section, specify which content library items should be added if the value of the variable matches the condition. You can add up to 10 content library items per condition.
Once you’ve selected content library items to be added, save your rule by selecting Save rule.
If no conditions are met, you can choose to hide the block on sending or select the default content library items to be inserted.
Note:
When you bundle several templates with smart content blocks into one document, each smart content will be auto-populated with pre-selected content library items if a rule condition is met. If no conditions are met, the smart content block will be either hidden from recipients when you send the document, or default content will be auto-populated.Using a pricing table as a trigger for smart content
Now you can use pricing tables as triggers for smart content. This allows you to dynamically customize documents based on the products or services added in the pricing tables.
- In the conditional rule pop-up, select the pricing table that will activate content to appear in the created document
- Select a trigger column, such as Name or Price
- Choose an operator ("equal" - the default, "not equal", "empty", "not empty", "contains", or "does not contain")
- Specify the column value that will determine which content library items automatically populate in the generated document
- Select the desired content to insert when conditions are met
- Choose the option for when no conditions are met
- Select Save rule
Note:
If your conditional rule is based on a percentage value (e.g., Discount or Tax), include the '%' symbol when specifying the value in the operator row.
How to edit a rule
To make changes to a rule open your template, and select smart content block. Then, select Edit rule on the floating panel, or click the Edit rule pen icon on the rule preview pane in the Properties panel on the right.
PandaDoc role and system variables that can be used to set up rules for conditional content.
- TemplateRoleName.FirstName
- TemplateRoleName.LastName
- TemplateRoleName.Email
- TemplateRoleName.Company
- TemplateRoleName.Phone
- TemplateRoleName.Country
- TemplateRoleName.State
- TemplateRoleName.City
- TemplateRoleName.StreetAddress
- TemplateRoleName.PostalCode
- TemplateRoleName.Title
TemplateRoleName is usually Client and Sender — so, Client.RoleName and Sender.RoleName.
- PricingTableName.Subtotal
- PricingTableName.Discount
- PricingTableName.Tax
- PricingTableName.Lineitemtaxtotal
- PricingTableName.Fee
- PricingTableName.LineItemDiscountTotal
- PricingTableName.TotalQTY
- PricingTableName.Total
Note:
Pricing table variables use data from the pricing table footer in your template. Each row you add to the footer of your pricing table will appear as a variable, as long as it has a value.- Document.CreatedDate
- Document.RefNumber
- Document.SeqNumber
How to create a document from a template with conditional smart content
Creating documents via CRM
Learn more about passing information with variables in HubSpot, Pipedrive, and Salesforce. Here’s an article about specific CRMs.
If your rule is based on a CRM variable or products, open the CRM entity, then select Create a new document in the PandaDoc widget.
Once you choose your template and create a document, your smart content will be auto-populated with pre-selected content library items if a rule condition is met. If no conditions are met, the smart content block will be either hidden from recipients when you send the document, or default content will be auto-populated based on your template rule setup.
Creating documents in Editor
If your rule is based on a PandaDoc role variable, pricing table variable, system variable, custom variable or catalog products, select Use this template at the top of the page to generate a document first. Assign recipients to the roles in your template, then select Continue.
Content library items in your generated document will be auto-populated based on the contact / pricing table / system / product information.
If a mistake appears within a condition and a wrong content library item was populated, you can easily fix it in the generated document.
If your content populates based on variables, go to the Variables tab on the right panel, find the variable your rule is based on, then enter the correct value. The smart content block will then be auto-updated.
If your content auto-populates based on product information in your pricing table, you can manually edit the pricing table to update the smart content block.
Note:
When you bundle several templates with smart content blocks into one document, each smart content will be auto-populated with pre-selected content library items if a rule condition is met. If no conditions are met, the smart content block will be either hidden from recipients when you send the document, or default content will be auto-populated.PandaDoc conditional smart content via API
You can add a smart content block in a template and use our Public API to insert content library items. Learn more about this here.
Functional limitations for CRM and editor
- Users can add a smart content block with conditional rules only on the template level to automate the document generation process.
- Users can create one rule per smart content block.
- Users can create up to 50 conditions per smart content block.
- Users can select up to 10 content library items per condition.
- Users can have as many smart content blocks in the template as necessary.
- Variable values are case-insensitive.
- Version history does not save conditional rules for smart content blocks.
- Conditional rules within the smart content block are saved when you duplicate a block, but not when you duplicate a page containing a smart content block.
- In case of template duplication, all conditional rules within the template will be saved.
- Smart content does not work via bulk send.
- Smart content within shared templates works in view mode in other workspaces if you also share corresponding content library items.
- Our mobile app doesn’t support content library items at this time. As a result, it isn’t possible to interact with smart content blocks on the document level while using the mobile app.
Planned improvements
- Improved adaptability of smart content in our mobile app.
- Advanced logic within rules.