elena14
5 months agoPractitioner
Personalization with Liquid using purchase events on order level
Hello, I am trying to personalize an email based on purchase event on order level.
Here it says that event properties schema could not be generated for purchase events, but that the nested data is supported by purchase events. Is nested objects even supported for purchase events on order level?
This is the event that I am using:
{
"purchases": [
{
"external_id": "2023_new",
"product_id": "Completed Order",
"currency": "USD",
"price": 219.98,
"properties": {
"products": [
{
"name": "Monitor",
"category": "Gaming",
"product_amount": 19.99
},
{
"name": "Gaming Keyboard",
"category": "Gaming ",
"product_amount": 199.99
}
]
},
"time": "2024-06-20T13:59:30+01:00"
}
]
}
So can you please clarify how can we add liquid tag in order to display the name of the first product - "Monitor"?
Looking forward for your reply!
Many thanks
Hi inespais , it finally worked with this piece of code in the email template.
{{event_properties.${products}[0].name}} {{canvas_entry_properties.${products}[0].name}}