Conditional Logic
Users can create more complex merge templates with Conditional Logic. Conditional Logic allows you to use one or more Fields and Operators to create blocks of text that can be hidden or shown depending if the parent record meets the criteria. This could allow you to make contracts and documentation for clients where different legal language may need to apply depending on the record a user is working with.
- Navigate to the Merge Connect application in Salesforce and select the Merge Templates tab.

- Click New to create a new template.

- Select any of the available file types, then select Next to create a new template using any of the indicated options.
Please Note: To see Google File Types in the New Template modal, you will need to enable Google File Generation in Setup. For more information please see here.

- In the Merge Field Generator tab, click the Type dropdown, and select Functions.

- From the Function dropdown, select Conditional Logic. This will bring up the criteria section.

- In the Field dropdown, select the field you are comparing data against.

- From the Operator dropdown, select an operator.

- In the Value field, enter a value.

- Copy and paste the conditional logic statement into the body of the document.
Please Note: For a PowerPoint Presentation or Excel Spreadsheet, you will need to copy and paste the merge fields into your slide in PowerPoint or Excel. You will then need to re-upload these files to see your newly added merge fields.

- Add any conditional text or merge fields into the designated area. Once completed, click Save.

- Below is an example demonstrating merging conditional logic merge fields.

- Additional supported conditional logic output values are:
- Tables
- Bulleted Lists
- Look-up Merge Fields
- Related List Merge Fields
Please Note: The following are not supported:
- Conditional logic within conditional logic
- Related lists as the conditional logic
- Conditional logic with related lists as the output values when surrounded by text
- Conditional logic in the Generated Name
- Images with text within conditional logic only in a PowerPoint presentation
- Conditional logic in Excel Spreadsheet or Google Sheets