Applying specific discount codes to specific customers

  • 14 February 2022
  • 5 replies

Badge +1

Hey Klaviyo community!


We are currently testing out how our referral programme might work. We have a list of referral codes and the email addresses / customers that they relate to.  Is there a way to show specific coupons to specific email addresses? In this article I can see how to upload our code, but not how to specify which customer each code should be sent to:


Any help would be appreciated!





Best answer by In the Inbox 14 February 2022, 17:17

View original

5 replies

Userlevel 6
Badge +26

Hi Sam, 

The coupon pool outlined in the help article is a good option if you are just looking for an automated way to distributed coupons on a first come, first serve basis. 


If you are looking to distribute specific codes that are already assigned to a specific email address, I would upload the coupon as a custom profile property and then using the custom property lookup to display that coupon in the email. 


This first article walks through the process of uploading profile properties via a CSV:


This second article walks through the use of property look ups to display different profile properties in the email:


So, in this case, you might upload a list with the emails and associated coupon codes in two different columns in the list upload. As part of the upload process, you’d create a new profile property and link the coupon codes to that new profile property. 


For the sake of example, we will call the profile property where the coupons will be saved “Referral_Coupons”


After upload, you can search for any of the email addresses in the custom data section of a profile and you will see the coupon code populated next to the new custom property “Referral_Coupons”


Then, in the email you want to send to your subscribers, to display the coupon code assigned to a specific email address I would use the custom tag

{{ person|lookup:'Referral_Coupons' }}.


Essentially, you would place the name of the custom profile property where you saved the referral coupons in between the two single quotes in the tag above.


I hope this helps!

@In the Inbox 

Badge +1

Top man @In the Inbox !!!! Thank you very much indeed - will give this a crack

Userlevel 6
Badge +26


Sounds great! Feel free to let me know if you have any other questions!


@In the Inbox 

Badge +1

@In the Inbox thank you for taking the time to share that solution.  I have a similar need and it looks like your solution will get us 75% of the way to our needs.  It seems, though, that we will not be able to have Klaviyo generate a barcode for the coupon code in that case, as that functionality is limited specifically to the coupon code field.  Am I correct in this conclusion?

Warm Regards, 


Userlevel 6
Badge +26

Hi @JacquiS 

I’m glad to hear the feedback above was helpful as well!

I haven’t dealt with barcodes with any of my clients unfortunately, but I believe it is possible. You can use the following code:

{% barcode_code 'CouponName' height=100 width=200 %}

You would replace ‘CouponName’ with the name of your coupon pool.

Depending on your needs and customization to the barcodes, you may find the following guide helpful.

I hope this helps!
@In the Inbox