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
Hi there,
Thanks for sharing with the Community! Is this flow triggered by an event? If so, what is the event?
Best,
Caroline
Hi Carole.
Thank you for your reply. It is set when someone placed an order.
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
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:
- Name of the product (I have variable)
- Quantity ( I do not have variable. Only 1,2,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
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
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
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
Hey Caroline. Yep, that is what I am looking for.
The store is on Shopify.
But hey, don’t bother over it anymore. 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
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
Thank you,
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:
Hey
Reply
Log in to the Community
Use your Klaviyo credentials
Log in with Klaviyo
Use your Klaviyo credentials
Log in with KlaviyoEnter your E-mail address. We'll send you an e-mail with instructions to reset your password.