# Mail merge terms

## Overview

A **mail merge term** is simply a placeholder text within asterisks (*e.g., \*FIRSTNAME\** ) that is replaced with dynamic content when the email is sent.

{% hint style="info" %}
Remember that adding mail merge terms to the email template mail merge terms list or to the email template content is not enough for them to work, you have to add the logic in the correspondent [backend workflow](https://docs.airdev.co/canvas/6.0/canvas-functionality/emails-and-alerts/..#create-a-template-workflow).
{% endhint %}

If the following sections of this page you are going to learn:

* [How to add mail merge terms to the email template content](#how-to-add-mail-merge-terms-to-the-email-template-content)
* [How to add mail merge terms to the email template mail merge terms list](#add-mail-merge-terms-to-the-email-template-mail-merge-terms-list)

## How to add mail merge terms to the email template content

To add mail merge terms to the email template content is as easy as typing them between asterisks (*e.g., \*FIRSTNAME\** ).

But Canvas has now a new system to help you add them without even having to type them.

{% hint style="warning" %}
This method is present in Canvas templates from version 4.1.0 and onwards&#x20;
{% endhint %}

Now you can just type an asterisk and Canvas is going to show you all the mail merge terms that have been already added to the email template mail merge list. You just have to click on the desired term and it will be added to the content automatically.

![Add mail merge terms to the email content](https://content.gitbook.com/content/Bhlvy44frcfaqAPdOVlG/blobs/uVaCL1acFv8G3cIEfd7S/Add%20mail%20merge%20terms%20to%20the%20content.gif)

{% hint style="info" %}
And don't forget that you still have to [add the logic in the backend](https://docs.airdev.co/canvas/6.0/canvas-functionality/emails-and-alerts/..#create-a-template-workflow) for this mail merge term to work.
{% endhint %}

Keep reading to learn how to add mail merge terms to the email template list.

## How to add mail merge terms to the email template mail merge terms list

{% hint style="info" %}
You should add the mail merge terms to this list so you can keep track of the terms you are using in each template and to be able to add them later to the email content in a semi-automatic manner.
{% endhint %}

There are two methods to add mail merge terms to the email template mail merge terms list:

1. Add them in the EMAIL SETTING tab
2. Add them when editing the email template content (only in Developer mode)

### 1. Add them in the EMAIL SETTING tab

In the edit email template popup -> EMAIL SETTING tab, click on 'Edit terms'

![Edit email template popup](https://content.gitbook.com/content/Bhlvy44frcfaqAPdOVlG/blobs/hAxmHdCrkRrZ0wvD0NTg/email2.png)

Then, in the Edit mail merge terms popup you can add or delete them. Don't forget to click on Save terms to make the changes permanent.

![Edit mail merge terms popup](https://content.gitbook.com/content/Bhlvy44frcfaqAPdOVlG/blobs/Q5aSs3nDacDbM2UNKPwQ/email3.png)

### 2. Add them when editing the email template content (only with Developer mode enabled)

{% hint style="warning" %}
This method is enabled only when the [Developer mode](https://docs.airdev.co/canvas/6.0/whats-new#developer-mode) is on and for Canvas templates from version 4.1.0 and onwards&#x20;
{% endhint %}

In the edit email template popup -> EMAIL CONTENT tab:

1. Start by entering content in any of the available inputs: subject, body, button (optional) or signature.
2. When you add a placeholder text within asterisks (*e.g., \*FIRSTNAME\** ) and after you leave the input (e.g., click in another one) Canvas will recognize the new term and will show you the new term/s available to be added to the email template mail merge list
3. Click on the term you want to be added to the list and an alert will confirm that the term has been added to the list
4. Done! This new mail merge term will be available to you to be added to the content when you type '\*'.

![Add mail merge terms to the list from the content](https://content.gitbook.com/content/Bhlvy44frcfaqAPdOVlG/blobs/H6qK1S5yyykXnrMc5TBU/Add%20mail%20merge%20terms%20to%20the%20list.gif)

{% hint style="info" %}
And don't forget that you still have to [add the logic in the backend](https://docs.airdev.co/canvas/6.0/canvas-functionality/emails-and-alerts/..#create-a-template-workflow) for this mail merge term to work.
{% endhint %}
