Shopify Tags in Klaviyo

  • 30 August 2023
  • 8 replies

  • Anonymous
  • 0 replies

Greetings, i wondering why i get a error when i set the shopify variables in the klaviyo emial template?


Thanks in advance!





Best answer by Brian Turcotte 28 September 2023, 20:37

View original

8 replies

Userlevel 7
Badge +39

Welcome to the community @mpatsia 

You usually get this error when a tag variable or display logic is misconfigured in your email. Can you provide details of the tags you are using?



Hello and thanks for replay, the variables that i use are the following:


{{ order.createdAt }}

{{ order.discountCode }}

{{ }}

{{ order.customer.displayName }}

{% for lineItems_item in order.lineItems %}
- {{ }} x{{ lineItems_item.quantity }}
{% endfor %}

{{ order.currentSubtotalPriceSet.presentmentMoney.amount }}


Thanks in advance!

Userlevel 7
Badge +39

Hi @mpatsia 

I used these Klaviyo/Shopify tags and they work for me. As you are including placed order events, you’ll need to be using a placed order triggered flow:

{{ event.extra.processed_at }}

{{ event|lookup:'Discount Codes'|default:'' }}

{{ first_name|default:"" }} {{ last_name|default:"" }}

{{ }}

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

For the order items requirement, are you wanting to list the products in the order? I would use a dynamic table for that. If you create a Klaviyo abandoned cart and save the table in that as universal content, you can add it easily to your place order flow.

Hope that helps



Hello again, i have the following workflow setup in the Shopify Flow app, when a shopify admin fulfilled an order then we check if the discount code used in the checkout field was for example “supersalon” or can be anything, if this is true then i want to send an email to the customer with this email. I mean the action i want to be the email send procees, i want to send the email using the klaviyo template BUT and here is the important and confusing part i want the email template to have the order details i have send above. The following image may help.



Thanks in advance for the help.


Badge +4

So why don’t you use the placed holders for the order information you wish to send ?

Userlevel 7
Badge +36

Hi @mpatsia


To add to the other wonderful responses here - the only way to accomplish this use case using the Shopify Flow w/ Klaviyo Connector is to use the track an event feature in the Klaviyo Connector, and then use that event in Klaviyo to trigger a Klaviyo flow. 


You could also technically use the Klaviyo Connector to create a campaign, but for your use case it would be more appropriate to create an event and use that to trigger a Klaviyo flow.



Hello and thanks for reply, i want to send automatically emails to all the users in my customer list when they make an order using a specific discount code, but when i start to set the track an event feature is required to specify name and email for the user but as i said i want to send those email to multiple users.



Userlevel 7
Badge +36

Hi @mpatsia!


May I ask if you’ve considered using a Klaviyo flow for the entire use case instead? For example, you could use the Fulfilled Order metric to trigger the flow, and then you can add a trigger filter that specifies the discount code that was used:


This will cause the flow to be triggered only when the desired discount code is used in the order, eliminating the need to create extra steps in Shopify.