If you are a current Zoho CRM user you are likely aware of the Mail Merge feature which allows you to create and send templated documents prefilled with CRM field data.
Mail Merge is straight forward if you have a standard template that can be used for a variety of scenarios. However if you have more complex requirements you may find multiple templates are required that vary based on the type of document that is needed. For example the fields required in a quote template for a company entity might differ from a quote template for an individual entity.
If you facing this challenge it is worth exploring a more advanced feature within Zoho CRM Mail Merge which is the ability to run conditional statements based on field values.
What is a conditional statement?
A conditional statement is a programming feature which has the ability to perform different actions depending on whether a condition is true.
Example:
Your business prepares quotes. And if the quote is for a company you want to include the company’s address. However if the quote is for an individual you want to include the contacts address. Instead of having two templates for individuals and companies, we can create one template and use a conditional statement to populate the correct address.
How do I add a conditional statement to my mail merge document?
Note – The following steps are completed within Zoho Writer, which the cloud word processing application within the Zoho platform. It is the recommend application for preparing Zoho CRM Mail Merge documents.
1. Open your merge document template in Zoho Writer > Under Automate > Merge template > Advanced Merge Fields > Condition
![](https://cdn.prod.website-files.com/65fb83ec3c8718717035f63b/6621e41c36e74384d847d675_1.png)
2. Populate the Condition
- Choose the field the condition will use (Event Type)
- The condition type (Is)
- The value of the condition
![](https://cdn.prod.website-files.com/65fb83ec3c8718717035f63b/6621e4f3b59f8dc0e6a5fef9_2.png)
3. This is how the condition will function. The blue highlighted text will not appear in the template.
![](https://cdn.prod.website-files.com/65fb83ec3c8718717035f63b/6621e5102b1b4173673489ad_3.png)
4. Populate the sections with the data we want to show based on the condition.
![](https://cdn.prod.website-files.com/65fb83ec3c8718717035f63b/6621e77828f1106e959d37c4_4.png)
5. As we can see here if the event type is ‘corporate function’ we are populating the Account Name, Contact Name and the Account address fields. If the event type is not a ‘corporate function’ we are populating the Contact’s Name and contacts address fields.
6. This is the output for a both Corporate and Private Functions
![](https://cdn.prod.website-files.com/65fb83ec3c8718717035f63b/6621e7b3a1d3fc1d72fa56b5_CororatePrivate.png)
If you would like to learn more about Zoho CRM or Zoho Writer Mail Merge functions please feel free to contact the Ardento team.