Hey @irenebylia22
For flows triggered by an event (Checkout Started, Placed Order, etc.), you can use this event information within the email template.
For example, when a flow is triggered by the Placed Order event, you can thank someone for their purchase and reference the specific item they bought. Klaviyo automatically stores detailed event information for you so that you can use the appropriate variable to add dynamic event content. The information captured is specific to each metric.
When you preview a flow email, you will see all the available properties for that event in the event dialog window that pops up.
If you click on a line of data in the preview window, a small bar will appear at the bottom of the window. This bar will populate with the variable tag that corresponds with the line of data you clicked. You can copy and paste this tag directly into your template. If you are interested in looping through several values for a property (for example, populating a list of all items in a purchase), consider using the block repeat feature.
For example:
If you're sending events to Klaviyo via the API, all of the properties for a given event are available through the event variable and lookup filter.
Thanks for your purchase of ${{ event|lookup:'total_price' }} . | Thanks for your purchase of $29.00. |
How do you like your new {{ event|lookup:'Items Purchased' }} ? | How do you like your new blue suede shoes? |
Hello! I found a “codes” that worked. However, the price shown on the examples previous emails is the same on each product and certainly, the price is different.
I used:
{{ event.extra.line_items.0.line_price }} {{ event|lookup:'$currency_code' }}
Then, now I don't know if the price is the same because it is a test or if certainly, the code will show that all the products have the same price (error).
Thank you for your help!!