Skip to main content

Overview

This recipe sets up the full referral loop — a chain of automated WhatsApp messages that guide both the referrer and their friend through the entire referral journey, from initial share to reward payout. The complete loop: Time to complete: ~20 minutes

Prerequisites

Before starting, ensure you have:
  • An active campaign (see Campaign Management)
  • A WhatsApp provider connected (see Provider Setup)
  • 4 approved WhatsApp templates on your provider’s platform (you’ll create these below)

Steps

1

Prepare Your WhatsApp Templates

Create these 4 templates on your provider’s platform (e.g., Pragma, Meta). All should be in the Marketing category.
Template Name: referbro_post_purchase

Body:
Hey {{1}}! 🎉 Thanks for your order.

Share your unique link with friends — they get ₹150 OFF, and you earn ₹150 cashback!

👇 Tap below to share
{{2}}

Button: [Shop Now] → URL with {{1}} parameter
Submit all 4 templates for Meta approval. Approval usually takes minutes to a few hours.
Wait for all templates to be approved before proceeding. Unapproved templates will cause message delivery failures.
2

Map Templates in Referbro

Go to Apps → Referbro → WhatsApp Settings and configure each template slot:Post-Purchase Nudge (orderConfig):
{
  "body.1": "{{FIRST_NAME}}",
  "body.2": "{{REFERRAL_LINK}}&source=order",
  "languageCode": "en",
  "button.url.0.1": "{{REFERRAL_CODE}}&source=order_cta"
}
Post-Referral Confirmation (postReferralWhatsappConfig):
{
  "body.1": "{{FIRST_NAME}}",
  "body.2": "{{REFERRAL_LINK}}&source=post_referral",
  "languageCode": "en",
  "button.url.0.1": "{{REFERRAL_CODE}}&source=post_referral_cta"
}
Reward Notification (rewardWhatsappConfig):
{
  "body.1": "{{FIRST_NAME}}",
  "body.2": "{{REFERRAL_LINK}}&source=reward",
  "languageCode": "en",
  "button.url.0.1": "{{REFERRAL_CODE}}&source=reward_cta"
}
Nudge Reminder (nudgeConfig):
{
  "body.1": "{{FIRST_NAME}}",
  "body.2": "{{REFERRAL_LINK}}&source=nudge",
  "languageCode": "en",
  "button.url.0.1": "{{REFERRAL_CODE}}&source=nudge_cta"
}
Toggle each template to Enabled.
3

Enable the Storefront Widgets

  1. Go to Shopify Admin → Online Store → Themes → Customize.
  2. Enable both App Embeds:
    • Refer & Earn — the floating share button
    • Referral Received — the discount popup for referred friends
  3. Go to Settings → Checkout → Customize and add the Referbro Widget to the Thank You page.
  4. Click Save in both editors.
4

Test the Complete Loop

Walk through the full referral cycle:
  1. Place a test order → Check that you receive the Post-Purchase Nudge on WhatsApp.
  2. Click the referral link from the message → Verify the store loads and the Referral Received popup appears with the discount.
  3. Place a second order using the referral discount → Check that the original referrer receives the Post-Referral Confirmation on WhatsApp.
  4. Verify in Analytics → Go to Apps → Referbro → Analytics and confirm events: LINK_GENERATED, WHATSAPP_SENT, LINK_CLICKED, ORDER_PLACED.
Use the Send Test Message button in WhatsApp Settings to quickly test individual templates without placing orders.

Best Practices

  • Start with 2 templates, not 4 — Begin with Post-Purchase Nudge and Referral Share. Add the others once these are working.
  • Track UTM sources — The &source= parameters in the template configs let you see in Analytics which touchpoint drives the most referrals.
  • Use the Nudge feature weekly — Go to Apps → Referbro → Nudge Users and send reminders to dormant referrers every 7–14 days.
  • Monitor delivery rates — If WhatsApp delivery rates drop, check that your templates haven’t been paused by Meta (common if too many users report them as spam).