Skip to main content

Klaviyo flows: Sending a referral email upon enrollment

Send a Klaviyo email when advocates enroll, personalize their portal link, and filter enrollment flows by campaign.

Written by Adam

You can use ReferralCandy events and custom properties to set up your own campaign enrollment flow and send your referral emails from Klaviyo instead of ReferralCandy.

Before you begin setting up a flow, we recommend you first read the Klaviyo integration overview and ReferralCandy custom properties articles.

To learn more about flows, read Getting started with flows on the Klaviyo help center.

💡 Note: Each ReferralCandy campaign has its own unique shortcode, so there isn't a single custom property that works across all campaigns.
When adding custom or event properties in Klaviyo, always insert them using the Personalization button (also called the merge tag picker) — instead of typing or reusing the sample shortcodes shown in this guide.
The examples below are placeholders only to illustrate where your campaign's shortcode would appear.
Selecting the actual property helps you avoid typos and the wrong campaign shortcode. Preview the email with a profile enrolled in that campaign to check the resulting link.


Enrollment flow

Create a flow that sends an email when a customer is enrolled in your campaign. You can incorporate ReferralCandy custom properties to personalize your existing content and flows.

Avoid duplicate emails: Set up and test your Klaviyo enrollment flow first. Then open the relevant campaign in ReferralCandy, go to Emails, and turn off Welcome email. Turn off Reminder email too if your Klaviyo flow also replaces reminders, such as with a delay and a second email. See Managing campaign email settings.

If you wish to set up a new flow for your campaign, you can replicate the following setup and make tweaks as needed.

  1. Trigger

    • Metric: RC - Enrolled

    • Add a Campaign name trigger filter that equals your campaign name, with type Text. This keeps enrollment in another referral, affiliate or loyalty campaign from triggering this email.

    • For a first-enrollment welcome email, also add First time enrollment - equals - True (sentence case), with type Text, using AND. Select Text explicitly if the picker defaults to another type. A separate re-enrollment flow can then use False without sending both emails for the same enrollment. To send this same email again on re-enrollment instead, leave the First time enrollment filter off and choose Allow re-entry.

    • Check Re-entry criteria: Allow re-entry permits another entry when an event matches your filters; No re-entry limits a profile to one entry in this Klaviyo flow. The filters determine which enrollments qualify.

  2. Email

  3. End

Important: If you want to incorporate ReferralCandy custom properties within an existing flow that isn't triggered by a ReferralCandy event (such as the Shopify "Placed Order" metric), add a 1-minute time delay before the email step. Profile properties may not be available when another service's event starts the flow. Treat 1 minute as a starting point, not a guaranteed sync time. After the delay, add a Split based on whether the campaign-specific Portal link profile property is set, and send the referral email only on that path. Profiles without it should take the other path without the referral email. This checks link availability, not current campaign eligibility. Confirm that the audience for this referral email is eligible for the campaign. A longer delay will not enroll customers who are outside the campaign's target audience. Check enrollment and preview the actual link before enabling sends. After going live, monitor how many profiles take the path without the referral email. If customers you expected to be enrolled are there, check enrollment and whether their link arrived later; increase the delay when sync timing caused the skip. See Klaviyo's guidance on delays before splits.

Enrollment sample flow and template

Sample flow

This illustration shows the basic sequence. Add the campaign filter and choose the first-enrollment and re-entry settings described above.

Illustrative Klaviyo flow: RC - Enrolled trigger, an email step named Invite email with Live status, then End.

Sample template

Replace the example discount and reward with your campaign's actual offer and reward.

Example referral email with the headline Refer friends. Get Rewards, a sample 20% friend offer and advocate reward, and a GET LINK button.

Refer friends. Get rewards

Give your friends 20% off all products. Get 20% off all products when they shop with your link.

GET LINK*


*The GET LINK button block uses the link address:

{{ person|lookup:"RC [Short Code] - Portal link" }}. Make sure to use your campaign short code.

Using metric filters

Add filters to the RC - Enrolled metric trigger to create other types of email flows.

Multicampaign

If you're running multiple campaigns, you can create separate flows to send out different post-enrollment invite emails for each campaign.

  • Condition: Campaign name - equals - [campaign name]

  • Type: Text

If you rename the campaign, check and update the Campaign name filter to match the name on new enrollment events.

Note: Remember to use the correct campaign-specific custom properties, by adding personalization with the short code specific to the campaign for your targeted advocates and affiliates.

Sample scenario

In this example, the advocate gets enrolled in two separate campaigns. One for signing up via a form, and another for making a purchase that meets a specific lifetime spend value.

Two example campaign emails: Thanks for signing up with a REFER NOW button, and You are a VIP with a VIP REFERRAL button and different sample rewards.

The email templates are distinct, allowing the customer to decide which campaign they can choose to participate in.

Re-enrollment

Send an email to a re-enrolled advocate to let them know that they can refer friends again. How is an advocate unenrolled?

  • Condition: First time enrollment - equals - False (sentence case)

  • Type: Text. Select this explicitly if the picker defaults to another type.

Use AND to add the Campaign name filter for the campaign this email belongs to, with type Text, as in the setup above.

Also check the flow trigger's Re-entry criteria. If an advocate should receive this email each time they re-enroll, choose Allow re-entry. With No re-entry, a profile that has already entered the Klaviyo flow cannot enter it again.

Klaviyo trigger filters: First time enrollment equals False, Type Text, AND Campaign name equals the example campaign name.

You can combine these filters and add OR or AND conditions to create an even more filtered flow setup. Read Understanding flow triggers and filters to learn more.


FAQ

Why are some of my advocates getting blank referral links from this flow?

The most common cause is a flow trigger filter that uses a timestamp property (like RC [Short code] - Enrolled at) instead of the RC - Enrolled event metric.

Timestamp properties are debug fields populated separately from URL properties. Flows filtered by them can fire before the contact has campaign-specific portal/referral link properties available — resulting in blank links in the email.

Correct setup:

  • Use the RC - Enrolled event as the metric trigger (not as a filter).

  • Make sure your trigger has the Campaign name filter from the setup above (see the Multicampaign section for details).

  • In the email template, always insert URL properties via Klaviyo's Personalization picker so the correct campaign-specific property is selected.

See Klaviyo: ReferralCandy events and custom properties for the full list of available properties and events.

Did this answer your question?