Solved

Auto-Applying Coupons that are shown as Custom Properties?

  • 14 October 2021
  • 3 replies
  • 98 views

Badge +3

Hi there,

We’re currently working on a flow that begins with a Justuno modal. When a customer completes the modal, they receive a coupon code via email that’s triggered by being added to a list in Klaviyo but this coupon code comes in as a custom property requiring the {{ person | lookup: ‘Referral_Code’ }} variable syntax. 


We would like to auto-apply this coupon to a customer’s cart upon clicking the “shop now” button in the email that follows the completion of the form - is there a way to do this? The code technically comes from Shopify as a dynamic code.

 

Also for context - we are using a Justuno pop-up instead of a Klaviyo form because of Justuno’s ability to auto-display codes in a user’s session. I know Klaviyo would be an easy set-up for us, but Justuno’s auto-display feature allows for a seamless customer journey.

Thanks!

icon

Best answer by Dov 15 October 2021, 17:09

View original

3 replies

Userlevel 7
Badge +56

Hi @Kelly,

Thank you for sharing this question with our Klaviyo community.

I recommend replicating the format we describe in our help center documentation on applying a coupon code at checkout. The format looks like the following:

mysite.com/?discount=your_code
 

I would try updating “mysite.com” with your website and replace “your_code” with the person look-up tag: {{ person | lookup: ‘Referral_Code’ }}. 

mysite.com/?discount={{ person|lookup:‘Referral_Code’ }}

Alternatively, you can try to use

mysite.com/discount/{{ person|lookup:‘Referral_Code’ }

Badge

Sorry to piggyback onto this but I need to do the same and don’t fully follow the reply. So we have created a pop up in OptiMonk and when the data is imported to Klaviyo, we have a custom property called coupon_code and that would be the unique code created. 

 

I’m not a developer so I don;t really follow /{{ person|lookup:‘Referral_Code’ } 

 

Please help!

Userlevel 6
Badge +54

Hey there @Tootsweets ,

The {{ person|lookup:‘Referral_Code’ }  is the dynamic tag utilized to pull in custom profile properties from a user into somewhere else in Klaviyo. This would be altered based on how your data is coming in for the coupon codes and how the custom property is stored within a profile. Related article here.

Reply