Solved

can we import product variants into event variables?

  • 9 May 2023
  • 2 replies
  • 238 views

Badge +2

I have a product in my Shopify store Room Spray - Spring Collection, and it has different scents as its variants. I am setting up my Product Review / Cross-Sell - Standard (Email & SMS) flow, and the event variable {{ event.Items.0|default:'' }} only uses the product name.

 

I am wondering if it is possible to bring in the product’s variant name as part of the event variables as well, so when the text is sent to my customer it specifies the scent they purchased.

icon

Best answer by stephen.trumble 10 May 2023, 17:27

View original

2 replies

Userlevel 7
Badge +60

Hey @LG_JBP 

Welcome to the community and congrats on your first post!

You can find more information about this in our guide How to Build Dynamic Blocks in a Flow email.
 

You'll want to note that there are two arrays that store item information:

  • Items
    A top-level array containing a simple list of each item’s name
  • line_items,
    An array nested within the extra array containing more detail, including each item’s title, price, SKU, and image URL

 
?name=Screen+Shot+2022-03-20+at+11.08.42+AM.png

You’ll want to use the more detailed array, line_items, since it contains the detailed information needed to display in the repeating table block, including variant title.

Hope this helps. Thanks again for being part of the Klaviyo community, hope to see you again soon!

Badge +2

Thank you @stephen.trumble! I was not seeing where this is possible with SMS, but tried the event properties available from line item array that is available in email view, placed them in the SMS editor, and they work just fine here as well.

Reply