Shopify Variables

  • 2 February 2022
  • 2 replies

Userlevel 1
Badge +3

Hi, I’m setting up a Replenishment flow and I’d like to include the size of the item because the size of the item purchased informs the customer of how frequently they should repurchase (we offer 1oz, 2oz and 4oz bottles).

I thought the variable for item size would be {{ item.line.title }} but when I previewed the email, the value was blank.



Does anyone know what the “size” variable for variants is?


Thank you!


Best answer by Dov 2 February 2022, 20:07

View original

2 replies

Userlevel 7
Badge +61

Hi @bill_wishgarden,

Thank you for sharing this question with the Klaviyo community.

The short answer to this is to clone your existing replenishment flow and select “Ordered Product” as the new trigger (set the old flow emails to draft and the new cloned flow emails to live after you’re done setting up all the tags and design for the new flow) and use the following tag in the email:

{{ event|lookup:'Variant Option: Title' }}

but let me explain the important rationale below :)

The size of the product ordered isn’t a variable that is brought into Klaviyo via the Placed Order metric. You can always verify which event variables are pulled through for any given metric by clicking “Preview” on the left-hand side within the template editor and clicking on the name of the event i.e. title, price etc. which will produce a tag. I have an in-depth response on using event variables in Klaviyo flows, I recommend you check that out as well, linking that below: 

Akin to Viewed Product or Added to Cart, Ordered Product is an event that only contains one item per event. This is important for a couple of reasons. For one, you can simply click on the event name in the email preview and paste it into your email to reliably populate the variable for each item ordered, say the price of the item, size etc. This is not the same for other events (as I explain in the linked thread above) which requires taking an extra step to “loop” over a certain variable (say, if you have 5 items in the cart for a Checkout Started event). The tag could not simply be copied and pasted in this case. Secondly, a flow triggered off of Ordered Product will trigger for each discrete item in the order. So you’ll likely want to set up conditional splits in your flow using item size with varying time delays before each email dispatches to ensure people are getting timely replenishment emails.

I hope that is helpful.

Userlevel 1
Badge +3

Thank you!