Solved

Variable for 2+ items in "Thank you" flow


Userlevel 1
Badge

Hi everybody.

I’ve been creating  a thank you flow and I can’t seem to get the variable for more than one product - There is a default Klaviyo variable but it doesn’t work - {{ item.quantity|floatformat:0 }} and I don’t want to guess how many items someone bought.

TIA friends!

~Aleksandra

icon

Best answer by caroline 3 March 2021, 17:23

Hi there,

I took a look at some Shopify accounts to see if there is usually a product quantity variable passed in the Placed Order event data. It looks like some merchants pass a “fulfillable quantity” variable as well as a “quantity” variable for the product. I would recommend touching base with your client to dig into their Shopify account to make sure that the properties you wish to reference within Klaviyo are associated with the order’s line items. Klaviyo should automatically pick up those variables.

Hope this helps!

Best,

Caroline

View original

12 replies

Userlevel 4
Badge +4

Hi there,

I took a look at some Shopify accounts to see if there is usually a product quantity variable passed in the Placed Order event data. It looks like some merchants pass a “fulfillable quantity” variable as well as a “quantity” variable for the product. I would recommend touching base with your client to dig into their Shopify account to make sure that the properties you wish to reference within Klaviyo are associated with the order’s line items. Klaviyo should automatically pick up those variables.

Hope this helps!

Best,

Caroline

Userlevel 6
Badge +4

@mogwaicoad - I think you need to add the table’s row → data source to alias event.extra.line_items to item, and then use the {{ item.quantity }} variable in your text block.  This will loop through all the item(s), and then show the quantity of that specific item for each item.    

See here: 

 

Userlevel 4
Badge +4

Hi there,

I would recommend following the instructions in this Help Center article (About Using Event Variables to Personalize Flows) to preview your Flow data -- once you find the field that you want to reference within the email template (in this case, the field which indicates the number of products that the customer has purchased -- the specific name of the field will vary based on which e-commerce platform you’re using), if you click on that field, the syntax will show at the bottom of the preview. You can then copy and paste that syntax into your template.

Best,

Caroline

Userlevel 1
Badge

Hey Caroline!
I understand how events work but I do not know how to have “quantity” for more than 1.
For example, someone buys 3 same umbrellas. I want to show that customer:

  1. Name of the product (I have variable)
  2. Quantity ( I do not have variable. Only 1,2,3)
  3. Total cost (I have variable)

So the quantity should say 3 and I am looking for a variable that can have all the items counted because someone will buy 6 umbrellas and I can’t guess how many will the customer buy.

{{ event.extra.line_items.0.quantity }}  doesn’t work.

I hope I explained it better. My English is not my first language so I apologize if I wasn’t clear.

~ Aleksandra

Userlevel 1
Badge

Hi Caroline. I really appreciate you helping me. I attached 2 images. One is what I want to have in the block and the other is 2 orders.

Best,
Aleksandra

 

Userlevel 4
Badge +4

Hi there,

So in order to display the quantity of a specific product, you would need to have a field in the event data which represents this value. Can you clarify which e-commerce platform you’re using (or if this is a custom integration)?

It looks like you could use “Item Count”, but as I understand it, you are looking for the quantity of each specific SKU, not the overall item count, correct?

Best,

Caroline

Userlevel 1
Badge

Hey @retention. Thank you! I will definitely try that!

Userlevel 4
Badge +4

Hi there,

Thanks for sharing with the Community! Is this flow triggered by an event? If so, what is the event?

Best,

Caroline

Userlevel 1
Badge

Hi Carole.
Thank you for your reply. It is set when someone placed an order.

Userlevel 4
Badge +4

Hi there,

Could you post a screenshot of the flow event data (please blur out any sensitive data)?

What e-commerce platform are you using?

Best,

Caroline

Userlevel 1
Badge

Hey Caroline. Yep, that is what I am looking for.
The store is on Shopify.

But hey, don’t bother over it anymore. :slight_smile: I am taking too much of your time. I will explain to the client I can’t make it work and maybe he will understand and I can create a different looking product block.

Best,
Aleksandra

Userlevel 1
Badge

Thank you, @caroline. I will get the client to give me access to his store. Something is not right and I can’t figure out what exactly.

Reply