Skip to main content
Problem Solver I
Feb 23, 2022 8:47 PM UTC
Solved

Access Shopify {{ gift_card }} object

Is there any way to access Shopify’s gift_card object in Klaviyo? eg. {{ gift_card.url }} or {{ gift_card.code }}

https://shopify.dev/api/liquid/objects/gift-card

 

I’m wanting to create a gift card flow in Klaviyo rather using Shopify’s Gift Card Created notification email.

alex.hong
alex.hongAnswer
Klaviyo Alum
Feb 25, 2022 9:16 PM UTC

Hi there @TheSuburbs,

If the gift card codes are already created, you could upload them into Klaviyo as custom properties for each profile and use the 'person | lookup' tag to pull in the value for that property in your email: Template Tags and Variable Syntax

However, I'm afraid at this time that Klaviyo does not have any native support specific to Shopify Gift Cards.
As a workaround, I was able to find that we do offer an existing template for sending a Gift Card Notification. You can see that when reviewing the Shopify Notification Templates here: 

?name=inline-1516612156.png​

You can use that template as a starting point for how you want to email to look. You can then also replace any of the variables in the email if needed. You can then export the template HTML for use in Shopify.
 

Hope that helped,

Alex

4 replies

Contributor IV
Feb 23, 2022 11:23 PM UTC

From your Shopify admin, go to Products > Gift Cards. Click the code for the issued gift card. You'll be able to see only the last four characters of the code. On the issued gift card's page, you can view its details and Edit.

 

 

hope this is going to he

Problem Solver I
Feb 23, 2022 11:34 PM UTC

Thanks @Global_sale1 . I understand how to view and use Gift Cards in Shopify. But what I’m after is a way to add Gift Card data into a Klaviyo email/flow.

For example, if someone buys a gift card, I want to send them an email through Klaviyo with the code {{ gift_card.code }}, or at the very least a link to the code {{ gift_card.url }}

alex.hong
alex.hongAnswer
Klaviyo Alum
Feb 25, 2022 9:16 PM UTC

Hi there @TheSuburbs,

If the gift card codes are already created, you could upload them into Klaviyo as custom properties for each profile and use the 'person | lookup' tag to pull in the value for that property in your email: Template Tags and Variable Syntax

However, I'm afraid at this time that Klaviyo does not have any native support specific to Shopify Gift Cards.
As a workaround, I was able to find that we do offer an existing template for sending a Gift Card Notification. You can see that when reviewing the Shopify Notification Templates here: 

?name=inline-1516612156.png​

You can use that template as a starting point for how you want to email to look. You can then also replace any of the variables in the email if needed. You can then export the template HTML for use in Shopify.
 

Hope that helped,

Alex

Contributor I
Jan 15, 2026 10:21 PM UTC

In Shopify flow - you can track an event to Klaviyo and pull information that way.  I am sure you can include the link in JSON and use that in a button.