Solved

PRODUCT NAME AND PRICE IN THE FLOW CAMPAIGN

  • 16 March 2023
  • 2 replies
  • 146 views

Badge

Hello, community :) Im contacting you because Im editing my flow campaigns and I have a doubt regarding the NL design.

 

I would like to include the name and price of the product that the costumer has added to his cart.

 

I have succeeded in including the name of the product but I can’t manage to include the price.

 

For the name, I have used: {{ item.product.title }}

 

But, for the price I have not found how to put it…

 

Could you help me with this “code”?

 

Thank you :) 

icon

Best answer by stephen.trumble 17 March 2023, 10:10

View original

2 replies

Userlevel 7
Badge +60

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.

The event data modal from Klaviyo's flow email editor


For example:

A comparitive chart, with a message as it appears in the template editor (with variable tags), and as it appears once sent (variable tags are replaced by a customer's event data)

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?
Badge

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!!

 

Reply