Merge fields can be used to personalise a mailing by including address data in the mail, for example a name. This page describes how you can use merge fields, shortened links and system links in your mailings.
You can have up to 10 custom mergefields. In this example we'll show you how to use a "Name" and "City" merge field.
{
"Name": "Demo",
"MergeFieldHeading1": "Name",
"MergeFieldHeading2": "City",
}
{
"EmailAddress": "[email protected]",
"MergeFieldValue1": "John Doe",
"MergeFieldValue2": "Breda"
}
Merge field name | Tag used |
---|---|
Name | {{ Recipient.Name }} |
City | {{ Recipient.City }} |
{
"Name": "Recipient.Name",
"Value": "{{ Recipient.Name }}",
"Mapping": "Recipient.MergeFieldValue1"
},
{
"Name": "Recipient.City",
"Value": "{{ Recipient.City }}",
"Mapping": "Recipient.MergeFieldValue2"
}
The following default mergetags can be used in your mail.
Description | Placeholder in body | Merge tag object |
---|---|---|
Sender email address | {{ Sender.EmailAddress }} |
{
"Name": "Sender.EmailAddress",
"Value": "{{ Sender.EmailAddress }}",
"Mapping": "Sender.EmailAddress"
}
|
Recipient email address | {{ Recipient.EmailAddress }} |
{
"Name": "Recipient.EmailAddress",
"Value": "{{ Recipient.EmailAddress }}",
"Mapping": "Recipient.EmailAddress"
}
|
You need to create links as special link in the mergefields object in order to be able to see the number of clicks of your link later on. Links provided as special link will automatically be shortened. In this example we will use https://www.cm.com as the url that we want to trak in our mailing.
{
"Type": "link",
"Label": "CM",
"Link": "[[ SpecialLink.link1 ]]",
"Mapping": "https://www.cm.com",
"Tag": "Website"
}
We have some default system links that you can use in your mailings.
Description | Placeholder in body | Special link object |
---|---|---|
Unsubscribe link, this will allow users to unsubscribe for your mailings. They won't get mails when you try to send to them again. |
[[ SpecialLink.Unsubscribe ]] |
{
"Type": "system",
"Label": "Unsubscribe",
"Link": "[[ SpecialLink.Unsubscribe ]]",
"Mapping": "SpecialLink.Unsubscribe",
"Tag": null
}
|
View in browser, this will allow users to view your mailing in the browser. | [[ SpecialLink.ViewInBrowser ]] |
{
"Type": "system",
"Label": "View in browser",
"Link": "[[ SpecialLink.ViewInBrowser ]]",
"Mapping": "SpecialLink.ViewInBrowser",
"Tag": null
}
|
Pixel, this will allow you to track if a user has opened your mail. This one should only be included in the html body and not in the text body. |
[[ SpecialLink.Pixel ]] |
{
"Type": "system",
"Label": "Viewed",
"Link": "[[ SpecialLink.Pixel ]]",
"Mapping": "SpecialLink.Pixel",
"Tag": null
}
|
Address list:
{
"Name": "Demo",
"MergeFieldHeading1": "Name",
"MergeFieldHeading2": "City",
}
Address:
{
"EmailAddress": "[email protected]",
"MergeFieldValue1": "John Doe",
"MergeFieldValue2": "Breda"
}
Mailing template textbody:
Hello {{ Recipient.Name }}
According to our data your email address is {{ Recipient.EmailAddress }} and you live in {{ Recipient.City }}.
You can see our new and improved website on [[ SpecialLink.link1 ]]
Kind regards,
Team CM
If you don't want to receive our mails anymore you can unsubscribe here: [[ SpecialLink.Unsubscribe ]]
If your mail isn't looking correctly, you can view it in the browser here: [[ SpecialLink.ViewInBrowser ]]
Mailing template mergefields:
{
"MergeTags": [
{
"Name": "Recipient.Name",
"Value": "{{ Recipient.Name }}",
"Mapping": "Recipient.MergeFieldValue1"
},
{
"Name": "Recipient.City",
"Value": "{{ Recipient.City }}",
"Mapping": "Recipient.MergeFieldValue2"
},
{
"Name": "Recipient.EmailAddress",
"Value": "{{ Recipient.EmailAddress }}",
"Mapping": "Recipient.EmailAddress"
}
],
"SpecialLinks": [
{
"Type": "system",
"Label": "Unsubscribe",
"Link": "[[ SpecialLink.Unsubscribe ]]",
"Mapping": "SpecialLink.Unsubscribe",
"Tag": null
},
{
"Type": "system",
"Label": "View in browser",
"Link": "[[ SpecialLink.ViewInBrowser ]]",
"Mapping": "SpecialLink.ViewInBrowser",
"Tag": null
},
{
"Type": "link",
"Label": "CM",
"Link": "[[ SpecialLink.link1 ]]",
"Mapping": "https://www.cm.com",
"Tag": "Website"
}
]
}