Personalization Tokens are placeholders for data fields coming from various data resources.
The Emarsys Platform allows you to use tokens in your campaigns on all channels. Tokens are reusable in all your campaigns. You have to set them up only once, afterwards you can simply drag and drop them into your emails.
When your contacts receive your email, they see their own personalized information replacing the token.
When you insert a token in an email template, that placeholder will be populated automatically with the content of the certain data field it triggers.
For example:
Here you can see a First Name Token that was added to the email template from the available predefined token list.
Here you can see the exact same First Name Token written in ESL code.
And this is how the contact will see it in their inbox.
Creating tokens
Creating tokens is the same process for all token types in the SAP Emarsys system. Navigate to Content → Personalization and click Create Token. In the pop-up window you can choose the type of token to create.
Read more about how to create Personalization tokens in the UI.
When you have created a Personalization token, you can check the corresponding ESL code of the token in the UI.
If you copy-paste this ESL code into any other campaign, it will work exactly the same way as if you dragged and dropped the token from the UI.
Tokens via ESL
1. Contact Data tokens
To create a contact data based Personalization token with ESL, use the following format:
{{ contact.X }}
Where contact
refers to the SAP Emarsys Contact Database (where all your contact details are stored), X
refers to the contact field from where you’d like to retrieve data.
Single and multi choice contact fields can be found here and here.
2. External Data tokens
To create an External Data Personalization token with ESL, use the following format:
{{ event.test.name }}
event
- this is the type of the token.test.name
- This is the chosen part of the event data you can use to populate through the token.
This is how the External Data tokens written in ESL look.
And this is how the contact will see them in their inbox.
Learn more about External Data Tokens.
3. Relational Data tokens
To create a Relational Data Personalization token with ESL, use the following format:
{{ rds.rds_retail_demo1.avcwiseTable(myemail@example.com)[0].PetName }}
rds
- type of tokenConnection_name
- Relational Data connectionavcwiseTable
- Relational Data Table from where we will be using datamyemail@example.com
- The actual data you want to reference(0)
- The row number of the data in the tablePetName
- Which column of the row you want to reference
If there is no connection specified in the token, Emarsys will use the default connection to RD.
This is how the Relational Data tokens written in ESL look like.
This is what a contact will see when they receive the email:
Learn more about Relational Data and Relational Data tokens.
4. External Content tokens
To create an External Content Personalization token with ESL, use the following format:
{{ external_content.dummy('Birthday Coupon', 'korte')[0].title }}
- Dummy - webhook connection (through which content is received)
- All the details in the () are the parameters of the webhook connection.
(0)
- the row number of the data in the tabletitle
- which column of the row you want to reference
Learn more about External Content and External Content Tokens.
5. Voucher tokens
To create a Voucher Personalization token with ESL use the following format:
{{ voucher.31461 }}
Where voucher
refers to the type of token and 31461
refers to the voucher pool from which the codes will be assigned to contacts.
This is how a Voucher token written in ESL looks like in an email template:
This is what a contact will see when they receive the email:
Learn more about Omnichannel Voucher Management and Omnichannel Voucher Tokens.