Skip to main content

How do I use merge tags in an email?

Merge tags let you insert per-recipient data into your email body, subject line, and preview text. When the campaign sends, each tag is replaced with the value from that recipient's contact record.

Available merge tags

| Tag | What it inserts | |-----|----------------| | {prefix} | Honorific (Dr., Mr., etc.) | | {firstName} | First name | | {lastName} | Last name | | {nickNameOrFirstName} | Nickname if set, otherwise first name | | {fullName} | First and last name | | {totalUnfulfilledPledgesAmount} | Total dollar amount of open pledges (e.g. $1000) | | {lastUnfulfilledPledgeAmount} | Dollar amount of the most recent open pledge (e.g. $500) | | {lastDonationAmount} | Dollar amount of the most recent donation (e.g. $500) | | {lastDonationDate} | Date of the most recent donation in MM/DD/YYYY format | | {askAmount} | Current ask amount from the contact record | | {unsubscribeLink} | A linked "Unsubscribe" anchor tag (required for compliance) |

Fallback behavior when a value is missing

If a contact does not have a value for a given field, the tag is replaced with an empty string rather than the literal tag text. The one exception is {nickNameOrFirstName}, which falls back to first name before returning empty.

For {prefix}, a trailing space written as {prefix} (with a space after the closing brace) is handled specially: if the contact has no prefix, the entire {prefix} including the space is removed, so you do not get a double space before the name that follows.

Dollar-amount tags ({totalUnfulfilledPledgesAmount}, {lastUnfulfilledPledgeAmount}, {askAmount}, {lastDonationAmount}) insert an empty string when the amount is zero or absent, so the currency symbol does not appear alone.

Inserting merge tags in the email body (design mode)

  1. Open the email campaign and go to the Body step.

  2. In the Unlayer drag-and-drop editor, click inside a text block to place your cursor.

  3. Click the Merge Tags button in the Unlayer toolbar (it appears when a text block is selected).

  4. Select the tag you want. Unlayer inserts the tag token (e.g. {firstName}) at the cursor position.

Inserting merge tags in the subject line and preview text

The subject line and preview text fields support merge tags as well. Those fields show a Merge Tags picker inline. Click the picker, choose a tag, and it is inserted at the cursor position in the field.

Only the tags listed in the table above are supported in the subject and preview text pickers. The {unsubscribeLink} tag produces an HTML anchor, so it is not useful in plain-text fields like the subject line; use it only in the body.

Sending a test email

Use the Send Test button before scheduling. The test email replaces merge tags with sample values: your own first and last name for name fields, "Champ" for {nickNameOrFirstName}, $45 for {totalUnfulfilledPledgesAmount}, $15 for {lastUnfulfilledPledgeAmount}, $1000 for {askAmount}, and $500 on 01/15/2024 for the last-donation fields. This lets you confirm layout and copy without needing a real recipient record.

Did this answer your question?