Solved

Woocommerce Code Variables confusion

  • 15 August 2022
  • 4 replies
  • 137 views

Badge +1
  • Contributor I
  • 0 replies

Hey everyone,

 

First time using Woocommerce with Klaviyo and I’m either not seeing the wood for the trees or there’s a tech problem I’ve overlooked….

 

I’m trying to set up a Post Purchase flow (with order confirmation) flow

 

Attempting to add the correct code to ensure all the dynamic variables (product name, quantity, price, order total, etc) are in place to grab the info from the customer orders so the table is populated for each individual customer in the order confirmation email…

 

I’ve tried several different combinations from the preview screen variable list, but the code I copy and paste is slightly ‘off’ and therefore not displaying correctly in the preview email.

 

Apology if you’ve covered this before, any help greatly appreciated :)

 

J

 

icon

Best answer by alex.hong 18 August 2022, 05:39

View original

4 replies

Userlevel 7
Badge +58

Hello @J-Lo,

Welcome to the Community.

Could you clarify what is “off” for the variable list and what is not displaying correctly? A screenshot would be great as well.

 

Thank you!
Alex

Userlevel 7
Badge +58

Hi @eCommetry,

For dynamic tags, you can only pull data from the event that is triggering the flow, so if the customer's total order value is in the event data for the current event, you could use it. Otherwise, you would need to add the customer's total order value as a profile property on the profile, which you could then pull into the flow or a campaign. This guide walks through event data and template tags.
It would have to be a It depends on which value you are looking to pull in, but if you are using the $value, you can typically use the tag:{{ event|lookup:'$value' }}

 

Hope that helped,

Alex

Userlevel 2
Badge +6

Thanks @alex.hong, I managed to figure this out earlier. The {{ event|lookup:’$value’ }} works!

I was surprised that you currently cannot pull the Subtotal variable on WooCommerce, but another user found a workaround.

Userlevel 2
Badge +6

I’m having a slightly different problem in the same area. I can pull most of the data that I need from the event “Placed Order” for my transactional email, but I can’t see total order anywhere in the preview.

Reply