Skip to main content

Use personalisation in a transactional email

Add placeholders to your template and provide values to personalise your transactional emails.

Gareth Burroughes avatar
Written by Gareth Burroughes
Updated over a week ago

You can add personalisation to your transactional emails using personalisation placeholders. The values for the placeholders are sent by your development team in the SMTP headers or by using an API call.


Before you start

Things you need to know:

  • If you have included a personalisation marker, for example, @ACCOUNTMANAGER@, in your custom reply-to address for the custom from address (CFA) you’re using to send your transactional email, you must include the key-value pair for this marker in the PersonalizationValues array.

    If you don’t, the reply-to address can’t be correctly populated, and any replies are only forwarded to the Unknown mail forward for the CFA, if set.

Learn more in the section The reply address.


1. Add personalisation placeholders to your template

You can add personalisation to your campaign template:

  1. Create or edit your email campaign template.

  2. Add personalisation placeholders in your text where you want dynamic content to appear.

Examples:

  • Hello @FIRSTNAME@

  • We just wanted to let you know that your order (@ORDERREF@) has been dispatched.

  • Your account manager @ACCOUNTMANAGER@ will contact you shortly.

The value for the matching placeholder name is pulled into the campaign when it's sent.

Once you save your transactional email template, you're warned about placeholder names which don't match to contact data field names; this is done automatically by the EasyEditor standard validation process. Select Save anyway to ignore the warning.

2. Include personalisation values in your code

The personalisation values need to be included as an array of data stored in key-value pairs in your code, which are included in the SMTP headers or in the API call parameters.

Example

"PersonalizationValues": [{ Name: "FIRSTNAME" , Value: "John" }, { Name: "ORDEREF" , Value: "01234" }]

Learn more in Sending a transactional email as a triggered campaign in our Developer Hub.

Personalisation values

PersonalizationValues.Value can be a string or JSON. All personalizationValues are also available in the data Liquid collection.

For example, you can access the data Liquid collection in EasyEditor by using the following Liquid:

##{{data.order.items[0].title}} costs

##{{data.order.items[0].price}}


EasyEditor vs transactional email personalisation

EasyEditor personalisation and transactional email personalisation are two different things. You can't use EasyEditor personalisation in a triggered email campaign sent as a transactional email; it won't work.

If you haven't included the personalisation value FULLNAME in your code, your transactional email @FULLNAME@ placeholder won't have any value pulled through for it and will appear as blank in the sent email.

Important for multi-part emails

Transactional email sent as a triggered campaign is a multipart email, meaning it's sent in both plain text and HTML. Any personalisation you add appears in both versions.

When you use transactional email personalisation, the type of personalised content needs to be compatible with the HTML element it's being put into. For example, if the code contains a personalised table, the code needs to go into a table element, not a paragraph. Check with your developers to make sure that your campaign elements are suitable for the personalisation content being used.

Did this answer your question?