Built for startups,
scaled for unicorns
Successfully submitted!
Error! Please try again
Klaviyo's event-driven architecture makes it the perfect email platform for referral programs. Unlike batch-and-blast email tools, Klaviyo can trigger personalized flows based on individual referral events β when someone signs up, when they make a referral, when their friend converts, and when they go quiet. Combined with Klaviyo's powerful segmentation and A/B testing, you get referral emails that are both automated and highly optimized.
This guide shows you how to connect GrowSurf referral events to Klaviyo, build triggered flows for every stage of the referral journey, and use Klaviyo's analytics to optimize email performance. Whether you're in e-commerce or SaaS, these flows will maximize your referral program's email-driven conversions.
Configure GrowSurf to send referral events to Klaviyo, which will serve as flow triggers.
Referral Program Joined β participant createdReferral Made β participant referred someoneReferral Converted β referred person became a customerReward Earned β participant earned a rewardEnrich Klaviyo profiles with referral data so you can use it in segmentation and personalization.
referral_code β the participant's unique codereferral_link β their sharing URLreferral_count β number of successful referralsreferral_status β current program statusreferred_by β email of who referred them (if applicable)Create a Klaviyo flow that welcomes new referral program participants.
Trigger emails based on referral activity β celebrate wins and maintain momentum.
Create a flow for people who were referred (the friends), giving them a warm welcome that leverages the referral context.
referred_by is not emptyUse Klaviyo's analytics to measure and improve each referral flow.
// Send GrowSurf events to Klaviyo's Track API
const axios = require('axios');
const KLAVIYO_API_KEY = process.env.KLAVIYO_PRIVATE_KEY;
async function trackReferralEvent(eventName, participantData, properties = {}) {
await axios.post('https://a.klaviyo.com/api/events/', {
data: {
type: 'event',
attributes: {
metric: { data: { type: 'metric', attributes: { name: eventName } } },
profile: {
data: {
type: 'profile',
attributes: {
email: participantData.email,
first_name: participantData.firstName,
last_name: participantData.lastName,
properties: {
referral_code: participantData.referralCode,
referral_link: participantData.shareUrl,
referral_count: participantData.referralCount || 0,
referral_status: 'active'
}
}
}
},
properties: properties,
time: new Date().toISOString()
}
}
}, {
headers: {
'Authorization': `Klaviyo-API-Key ${KLAVIYO_API_KEY}`,
'Content-Type': 'application/json',
'revision': '2024-02-15'
}
});
}
// Webhook handler
app.post('/api/growsurf-to-klaviyo', async (req, res) => {
const { event, participant, referrer } = req.body;
const eventMap = {
'PARTICIPANT_CREATED': 'Referral Program Joined',
'PARTICIPANT_REFERRED': 'Referral Made',
'CAMPAIGN_REFERRAL_CONVERTED': 'Referral Converted'
};
if (eventMap[event]) {
await trackReferralEvent(eventMap[event], participant, {
referrer_email: referrer?.email,
referrer_name: referrer?.firstName
});
}
res.json({ success: true });
});Klaviyo's conditional splits let you create one flow that handles multiple scenarios. Split on referral_count to send different messages to first-time referrers vs. power referrers, or split on whether the person was referred (inbound) vs. joined organically (outbound).
If you're an e-commerce brand, include Klaviyo's product recommendations in referral emails. Show the referred friend products related to what their referrer purchased β this increases the relevance of the referral and boosts conversion rates.
Exclude people in referral flows from your regular marketing flows to prevent email fatigue. Use Klaviyo's flow filters to suppress contacts who are currently active in a referral flow from receiving campaign emails for the duration of the flow.
Yes. Use GrowSurf's webhook feature to POST events directly to Klaviyo's Track API. This gives you real-time event delivery without the Zapier middleman. The code example in this guide shows the exact API call to make. This approach is faster and doesn't count against your Zapier task quota.
Add a flow filter to your regular welcome flow that excludes profiles where referred_by property is not empty. This ensures referred friends only get the referral-specific welcome sequence, which is more relevant and personalized.
Absolutely. Add SMS steps within your email flows or create dedicated SMS flows triggered by the same referral events. SMS is especially effective for time-sensitive notifications like "Your friend just signed up!" or "Your reward is ready!" β covered in detail in the Klaviyo Referral SMS Campaigns guide.
Trusted by marketing and product teams at fast-growing B2C, fintech, and SaaS companies
