Refer a Friend: Sending a reward email based on a custom profile property

  • 22 June 2023
  • 5 replies

Badge +4

We are building a Refer a Friend program using a combination of Shopify, Jotform, Zapier, and Klaviyo. We are at the point where we need to send a reward code (via Klaviyo) to the referrer once the referee has made their first purchase. We have the referrer’s email address set up to be added to the referee’s Klaviyo profile as a custom property (from Jotform to Klaviyo via Zapier). What we can’t figure out is how to pull the referrer’s email address from the referee’s custom profile property in order to trigger the reward email to the referrer. Any ideas?


Best answer by David To 23 June 2023, 16:29

View original

5 replies

Userlevel 7
Badge +60

Hello @CKeast,

Great setup so far! 

In my experience from working with others who have built their own referral program, I believe the missing key here is an additional custom event. 

Essentially, once the referee has completed a purchase, you’ll want to trigger an event on the referrer’s profile. This would allow you to trigger a flow and email offering the discount code to them. 

This is actually how a lot of other referral programs function. It may help to also checkout third-party referral programs that have a direct integration with Klaviyo to get an understanding of how their programs work. You can find a list of these integrations from our Tech Partner Directory and filter by Referral Programs. 

I hope this helps!


Badge +4

Thank you, @David To, that is exactly the piece we needed! We’ll have our dev set it up.

Badge +4

Followup question, @David To — Once we get the metric set up (which we are still trying to do; our dev is waiting for Klaviyo support), what happens if a referrer has multiple referees who complete a purchase? Will a unique reward code be sent for each referee? For reference, I am planning to set up a flow that uses Klaviyo’s Coupons (via our Klaviyo/Shopify integration). Will that actually work the way we want it to?

Userlevel 7
Badge +60

Hey @CKeast,

Glad you’re making headway in this!

Overall, this should still work the way you intended it to.

However, you’ll want to take into consideration how coupons function in Klaviyo. Unique coupon codes are stored in Klaviyo until they expire. This means that if a referee was put into a flow three times because their three referrals placed an order around the same time, the discount code pulled into the email would be the same all three times. Only when the original - first issued discount code expired would a new discount code be issued. 

One way to resolve this though would be to include conditional splits in your flow to count how many referral orders were completed. This way, you can issue a new discount code (with a different coupon syntax) down each flow branch that corresponds with the number of referrals that completed their orders.



Badge +4

Thanks, @David To, that’s helpful!