Skip to main content

Klaviyo: Add a referral invitation to an existing email or flow

Add a referral section or separate invitation to an existing Klaviyo email or flow, using current campaign profile data.

Written by Adam

Add a ReferralCandy invitation to a Klaviyo email or flow your customers already receive. For purchase-triggered invitations, send as soon as possible after the qualifying purchase, once the customer is eligible and their personalized links are ready. Use a section inside a prompt post-purchase email or a separate prompt invitation. Use the customer's current campaign-specific profile properties so their button opens the correct personal portal.

For an email sent when someone enrolls in ReferralCandy, use Klaviyo flows: Sending a referral email upon enrollment instead. This guide keeps an existing flow's trigger, such as Shopify Placed Order. Connect ReferralCandy with Klaviyo before following these steps.

Choose one referral touchpoint

Choose one prompt invitation touchpoint. Add an inline section when the existing post-purchase email already goes out promptly. If that email or journey waits several days, use a separate invitation at an earlier suitable point instead of delaying the first invitation to fit it. Avoid adding both by default, and check what ReferralCandy and your other Klaviyo flows already send.

Work in an inactive draft copy while setting this up. Preserve the original trigger, branches, re-entry, existing message delays/time zones, subject, sender, footer and message purpose. Place the referral invitation where it can go out promptly; do not add a wait for product arrival or customer satisfaction by default, or move existing messages merely to accommodate it.

Choose the campaign properties and links

In Klaviyo's Personalization picker, select the properties for your referral campaign's actual short code. The short code identifies the campaign's profile fields; the campaign name is the separate value used in ReferralCandy event filters. Find your campaign short code and properties.

  • Portal link: use this for an advocate-facing button such as Get my sharing link.

  • Referral link: use this when displaying the link the customer should copy/share with friends.

  • Next reward description: optional text describing the customer's next referral reward. Omit the reward line if the value is missing, blank or literal None; do not replace it with a guessed reward.

A Shopify-triggered email or newsletter uses profile properties for ReferralCandy data. Its trigger does not supply a ReferralCandy enrollment/reward event's variables. Insert the actual personalized links and preview them; do not build a URL from a name or use # or click here as a URL fallback. State your actual friend offer and its qualifications in the surrounding copy.

Check readiness and current eligibility

Use only the brief delay needed for required ReferralCandy profile properties to become available before the invitation or a split that checks them. A one-minute delay can be a starting test, not a guaranteed sync time or a required marketing delay. Test the shortest suitable wait for your setup. Verify that the customer is enrolled and the actual links are ready; a longer delay does not enroll an audience that does not qualify.

Use the following checks for the same referral campaign, replacing [Short code] in every property. All requirements must pass:

Campaign profile property

Required for this referral invitation

Portal link and Referral link

Both contain usable HTTPS URLs. Resolve missing, blank, literal None or malformed links before using them.

Enrolled at

A positive numeric enrollment timestamp.

Unenrolled at, Banned at, Deleted at, Unsubscribed at

For this invitation check, each must be unset or contain the literal text None. A populated lifecycle timestamp fails the check; inspect the actual values for returning participants before relying on this rule.

Retained links are not proof that the customer is still participating or wants that campaign's invitations. These checks supplement Klaviyo's normal channel eligibility, consent, suppression and Smart Sending; keep those controls. The invitation criteria here are not a rule for every reward or account-status notice.

Apply the checks only to the referral section or the separate invitation message. Putting them on the entire host flow can exclude a customer before profile data syncs, or prevent a thank-you they should still receive. For a newsletter, check the audience and the section's current profile conditions at send time.

Option A: add a referral section inside an email

  1. Choose an existing email that already sends promptly after the qualifying purchase, then open its draft and add one section for the referral heading, offer/reward text and portal button. Keep the original message, order content and footer outside this section. If the existing email is scheduled much later, use a separate prompt invitation instead of waiting for it.

    Before choosing the inline option, confirm that the required campaign links are available on the customer's profile by the time the host email sends. If it can send before ReferralCandy has updated those links, use a separate prompt invitation after the brief sync wait (Option B), while preserving the host email's timing.

  2. Select the whole referral section, then open its Display / Show/hide logic controls. Apply the current-eligibility checks above to the section, rather than only its button or the whole email.

  3. Use the native logic builder where it expresses the complete conditions correctly. For custom code, adapt the example below and preserve every condition; use only your actual campaign fields. Follow Klaviyo's section show/hide instructions and conditional-logic reference for the editor controls.

  4. Save the draft and preview eligible and ineligible recipients, including one with missing links and one with a campaign-email unsubscribe. Confirm the entire referral section hides while the host message remains. A child block's condition must also pass for that block to appear.

Klaviyo email editor: the whole referral Section is selected with Display, section Visibility and Show/hide logic controls including Edit logic. The host reply text and footer stay outside the selected referral section.

Example of selecting the whole referral section and its Display / Show-hide logic controls. The host message and footer remain outside the section. Use a host email that sends promptly after the links are ready, as described above. The campaign short code A and $10 offer are example values.

Can I use a custom section condition?

A custom section condition can combine the required link and lifecycle checks. This example is adapted from the tested referral section; replace [Short code] everywhere with the actual campaign short code. Use it only after checking the profile data types and cleared-field values in your account. It belongs in the section's show/hide condition, without {{ }} or {% if %} wrappers:

person|lookup:'RC [Short code] - Portal link' and person|lookup:'RC [Short code] - Referral link' and person|lookup:'RC [Short code] - Portal link'|slice:':8' == 'https://' and person|lookup:'RC [Short code] - Referral link'|slice:':8' == 'https://' and person|lookup:'RC [Short code] - Portal link'|length > 12 and person|lookup:'RC [Short code] - Referral link'|length > 12 and '.' in person|lookup:'RC [Short code] - Portal link'|slice:'8:' and '.' in person|lookup:'RC [Short code] - Referral link'|slice:'8:' and ' ' not in person|lookup:'RC [Short code] - Portal link' and ' ' not in person|lookup:'RC [Short code] - Referral link' and '#' not in person|lookup:'RC [Short code] - Portal link' and '#' not in person|lookup:'RC [Short code] - Referral link' and 'None' not in person|lookup:'RC [Short code] - Portal link' and 'None' not in person|lookup:'RC [Short code] - Referral link' and person|lookup:'RC [Short code] - Enrolled at' > 0 and person|lookup:'RC [Short code] - Unenrolled at'|default_if_none:'None' == 'None' and person|lookup:'RC [Short code] - Banned at'|default_if_none:'None' == 'None' and person|lookup:'RC [Short code] - Deleted at'|default_if_none:'None' == 'None' and person|lookup:'RC [Short code] - Unsubscribed at'|default_if_none:'None' == 'None'

This example uses the inspected data shape in which cleared lifecycle fields contain the text None. Check missing, empty or null values separately in your account before relying on them. Preview the positive and negative cases after saving. Resolve differences before enabling sends; do not remove the eligibility checks to get a visible preview.

Option B: add a separate invitation to a flow

  1. In the inactive flow copy, place the separate invitation at the earliest suitable point after the qualifying purchase and required readiness checks. Preserve the existing trigger, branches and messages. Use a point after branches rejoin only when it reaches the intended audience promptly; do not wait until the end of a longer thank-you journey by default.

  2. Add and test only the brief delay needed for the required profile data to sync. Then add a split based on whether the campaign-specific Portal link profile property is set. The missing-link path continues without the referral invitation. After enabling the flow, monitor that path; check enrollment and whether links arrived later before adjusting the delay. Keep the wait as short as the verified setup allows. See Klaviyo's guidance on delays before splits.

  3. Select the invitation message card, then use Settings → Additional filters for current-eligibility checks. For the links use Text is set and starts with https://; for Enrolled at use Number is greater than 0. For each of the four lifecycle fields, use a separate group: Text is not set OR equals None. Join the groups with AND. Keep the grouping intact.

  4. Save the draft filters and preview the invitation with a matching profile. Keep its Smart Sending and normal channel controls. A message skipped by Additional filters does not prove the preceding host email failed.

    A recent marketing email can cause Smart Sending to skip this invitation. Check the actual skip reason and review the placement; an inline section is an alternative when the host email meets the readiness checks above. Keep Smart Sending enabled and do not force a resend. See how Smart Sending works.

Detail of a Klaviyo invitation readiness split: campaign A portal and referral links must be set and HTTPS. The qualifying path reaches the separate referral email with Additional filters and Smart sending; Everyone else ends without an invitation.

Detail of the readiness check and separate invitation in the current Klaviyo interface. This shows the link checks and message controls; place the invitation so it can send promptly after a qualifying purchase, once eligibility and links are ready. The campaign short code A and $10 offer are example values. Keep the invitation's current-eligibility Additional filters and normal Klaviyo sending controls.

If you place an invitation after another message, any delay follows the flow's progression, not necessarily that message's delivery: a skipped host can still progress to later steps. Do not postpone the first referral invitation merely to follow a later thank-you. If a separate message specifically depends on actual receipt or engagement, design and verify that condition explicitly. See Klaviyo's flow and message filter guidance.

Verify the draft before enabling sends

Check the saved draft and its actual recipient outcomes before changing a live customer journey:

  • Compare the source and draft: original trigger, branches, timing, re-entry, existing copy, sender, footer and sending settings should match the intended change.

  • If your customers can re-enroll or resubscribe to campaign emails, open a profile that has done so and confirm its current lifecycle fields before relying on the checks. Do not assume every previous lifecycle timestamp has been cleared.

  • Preview desktop/mobile with an eligible profile, missing/None links, and a campaign-unsubscribed or unenrolled profile. For inline content, verify the host remains when the referral section hides. Open the rendered personal CTA and check that it belongs to the intended campaign/customer.

  • Treat preview/render success, native flow eligibility, delivered status and the actual mailbox/CTA as separate checks. Inspect the exact native skip reason, including Smart Sending; keep the sending rules instead of forcing a resend.

  • When replacing a native ReferralCandy email, test its Klaviyo replacement first, then turn off only its equivalent native message. Adding a section to a store email does not automatically replace the campaign's welcome/reminder emails. See the per-email handover checklist.

If you use Composer, Klaviyo's AI marketing agent, to build or edit the flow or email, check the saved result in the native editor using the same criteria. An AI-generated proposal or saved template is not evidence that the flow sent or that every setting was preserved.

Existing-email invitation FAQ

Can I reuse the referral section in newsletters?

You can reuse the referral content in a Klaviyo newsletter using current campaign profile properties and the same section-level eligibility checks. Recheck the saved condition and links in each destination; a copied template alone does not establish that every copy stays synchronized. Preview the newsletter's actual audience before sending. Use newsletters as an additional referral touchpoint; do not hold the first post-purchase invitation until the next newsletter.

Why did an eligible customer not receive the invitation?

An eligible customer can still be skipped by the flow/message filters, re-entry settings, Smart Sending or channel/suppression rules. Check the message's recipient activity and actual skip reason, then the profile data at evaluation time. Follow the event-arrived/no-email checks.

Did this answer your question?