Solved

Add cart items to a plain text email

  • 5 April 2024
  • 2 replies
  • 29 views

Badge

I want to add a custom field to a plain email that shows one of the items that are being checked out to an abandoned cart flow email. Is it possible to do so? thanks!

icon

Best answer by retention 5 April 2024, 18:46

View original

2 replies

Userlevel 7
Badge +58

Hi @euchacon, welcome to the community!

Yes - all “event” variables (and personalization/profile properties) can be used in a Plain Text email as well. If you’re on Shopify, here’s an example code to retrieve the first item and use it in the text email.

Here’s an example of the email I have in a normal Klaviyo Template:

 

When I replace my Klaviyo Template version with a Plain Text email, I can use the Event variables in the text email like this, but only referencing the first item:

 

Hi {{ first_name }},

Did you leave the {{ event.Items.0|default:'' }} behind? 

The Team

 

Where  {{ event.Items.0|default:'' }} is the code for the first item in their cart.

 

See my preview email here:

For documentation on using event variables, this guide might help you:

Hope this helps!

Badge

Hey, thanks! and thank you for the links.

Can you help me understand what is the difference between {{ event.Items.0|default:'' }} and {{ event.extra.line_items.0.product.title }}

if it’s a platform change, I’m using shopify and so the second one is appearing in the resource section so that’s the one i need to use, correct?

Reply