Skip to main content
All CollectionsAutomation Transactional email
Use Liquid in a transactional email
Use Liquid 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.

Add personalisation to your campaign template

You can add personalisation to your campaign template by adding a placeholder in your text, for example, Hello @FIRSTNAME@, or We just wanted to let you know that your order (@ORDERREF@) has been despatched.

The personalisation values then 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.
"PersonalisationValues": [{ Name: "FIRSTNAME" , Value: "John" }, { Name: "ORDEREF" , Value: "01234" }]

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

To learn more about sending transactional email as a triggered campaign, check out the Sending a transactional email as a triggered campaign API article.

EasyEditor vs. transactional email personalisation

EasyEditor personalisation and transactional email personalisation are two different things. This means you can't use EasyEditor personalisation in a triggered email campaign sent as 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.

Transactional email that is sent as a triggered campaign is a multi-part email, which means it is sent in both plain text and HTML versions. Any personalisation you add appears in both versions. However, 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.

Once you save your transactional email template, you are 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.

Personalisation values

PersonalizationValues.Value can be 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}}

Did this answer your question?