Introduction
This tutorial addresses an often-asked question about how to use event data to personalize the content of emails within your campaign in Customer.io.
Problem
At times, you might want to add a personalized touch to the emails in your campaign using information from your event trigger. This guide is meant for you if you don’t know how to achieve this using event data.
Solution
To personalize the email content in your event-triggered campaign using event data, you will want to use the 'event' scope. This would look like this:
{{event.event_data}}
For instance, if you have a purchased event with this data:
"purchase" { price: "14.50", product: "journal" },
where price and product are event data, you can pull this into your email using this Liquid code like so:
Hi there, you just purchased a {{event.product}} for {{event.price}} USD.
This will render: "Hi there, you just purchased a journal for 14.50 USD".
Resources
For more details on how to leverage the 'event' scope or use Liquid code in your email automation journey, please refer to this Liquid guide.