You can create personalized campaigns with External event data as well.
External event data is sent to Emarsys through the API, and is used only once. You can use it only for transactional use cases.
For example, this is how External event data looks like:
{{event.petname}}
Once you trigger a transactional campaign through the API, you can send data as well in JSON format. For example:
{“petname”:”Harvey”}
How do you create a personalized campaign with External event data?
To use External event data in a campaign for personalization, you need to create an External data token in ESL.
This is how an External event data token looks like in ESL:
{{event.first.second.third.name}}
{ “first”: { “second”: { “third”: { “name”: “Harvey” } } } }
Tip: You can reach the data in the JSON structure based on the path after the event token name in the example above.
You can also send an array as follows:
{
“first”: {
“second”: [1,2,3]
}
}
After sending an array, you can apply a foreach
tag to it as follows:
{% foreach item in event.first.second %}
For further details, see Triggering external data for transactional emails.