Solved

Total price is not accurate. Subtotal, qty and total

  • 5 July 2021
  • 1 reply
  • 1211 views

Userlevel 1
Badge +2

Hello everyone, here’s the thing:

I am creating order confirmation (post purchase) flow and I need to add product name, subtotal (price for that product), discount, quantity and total price. I am using Shopify.

I have everything working fine but the total price is not correct for some reason. It doesn’t calculate the price:

{{ event.Items.0 }}

Subtotal: {{ event.extra.line_items.0.line_price }}
Discount: {{ event|lookup:'Total Discounts' }}
Quantity: {{ event|lookup:'Item Count' }}
Total: £ {{ event.extra.customer.total_spent }}


It reads like this:

Subtotal: £ 29.0
Discount: 8.80
Quantity: 2
Total: £ 79.20

What am I doing wrong? I’ve read all order confirmation articles on Klaviyo and I used variables for Shopify. I was thinking the subtotal variable is not maybe correct variable, but I am not sure.

Thanks

icon

Best answer by Dov 6 July 2021, 18:13

View original

1 reply

Userlevel 7
Badge +61

Hello @mogwaicoad,

Thanks for sharing your question with the Klaviyo Community.

We have a default Order Confirmation flow template you can use that has the correct tag for total value (amongst other tags you may find helpful to include in this email).

The tag is:

 {{ event|lookup:'$value' }}

The flows library containing this flow and all associated tags can be found here

For more inforamation on using event variables in Klaviyo emails, I recommend checking out the post below and the hyperlinked post in that reply (also included below)

Thanks and have a wonderful day.

Reply