Referbro connects to the WhatsApp Business API to send automated referral messages at key moments in the customer journey. This page covers how templates work and how to configure them.
How It Works
- You create a Message Template on your WhatsApp provider’s platform (e.g., Pragma, Meta).
- Meta approves the template (required for all business-initiated messages).
- You map the approved template in Referbro by entering its ID and parameters.
- Referbro sends messages using your template whenever a trigger fires (e.g., customer shares, order placed).
Template Types
Referbro supports 8 different template slots, each triggered at a different point in the customer journey. You can find ready-to-use examples for all of these in our Template Library:
| Template Type | Trigger | Purpose |
|---|
Referral Share (whatsappConfig) | Customer clicks “Share on WhatsApp” in widget | First-person referral invite |
Post-Purchase Nudge (orderConfig) | After a customer places an order | Encourage sharing while the customer is happy |
Post-Referral (postReferralWhatsappConfig) | After a successful referral is made | Confirm the referral and encourage more sharing |
Nudge / Reminder (nudgeConfig) | Scheduled reminder | Re-engage customers who haven’t shared yet |
Reward Notification (rewardWhatsappConfig) | Referrer earns a reward | Notify the referrer of their earned reward |
Delivery Notification (deliveryConfig) | Order is marked as delivered | Prompt sharing after the customer receives their order |
Referrer Delivery (referrerDeliveryConfig) | Referred friend’s order is delivered | Notify the referrer that their friend received the order |
Post-Delivery Followup (postDeliveryFollowupConfig) | Configured time after delivery | Follow-up message to encourage repeat sharing |
You don’t need to configure all 8 templates to get started. Begin with Referral Share and Post-Purchase Nudge — these are the highest-impact touchpoints.
Template Parameters
When mapping a template in Referbro, you provide a JSON object with parameter keys and values.
| Key Pattern | Meaning | Example |
|---|
body.<index> | Body text parameter at position <index> (1-based) | "body.1": "Get ₹150 OFF!" |
body.<index>.<name> | Named body parameter (alias for readability) | "body.1.message": "Hey! Share this..." |
button.url.<btnIndex>.<paramIndex> | URL button parameter | "button.url.0.1": "{{REFERRAL_CODE}}" |
button.quick_reply.<btnIndex>.<paramIndex> | Quick reply button parameter | "button.quick_reply.0.1": "Share Now" |
languageCode | Template language code | "languageCode": "en" |
For Pragma users: Button parameters use the format button.url.<index>.value instead of button.url.<index>.<paramIndex>. See the Pragma section for details.
Available Placeholders
Use these placeholders in your parameter values. Referbro only resolves variables that are available in the current trigger context.
| Placeholder | Replaced With | Example Output | Available In | When It Is Available |
|---|
{{REFERRAL_CODE}} | The customer’s unique referral code | JOHN-AB12 | All template slots | Always available in automated sends (and test sends, where fallback is TEST123) |
{{REFERRAL_LINK}} | Full referral link URL | https://yourstore.com?ref=JOHN-AB12 | Share-link message flow | Available in the widget share URL flow (/whatsapp/share), not auto-injected in server-side template sends |
{{FRIEND_REWARD}} | Friend offer text | ₹150 OFF | Share-link message flow | Available in the widget share URL flow (/whatsapp/share), not auto-injected in server-side template sends |
{{FIRST_NAME}} | Customer’s first name | John | N/A | Not auto-injected yet |
{{REFERRER_NAME}} | Referrer’s name | John | rewardWhatsappConfig | Available for all reward notifications |
{{GIFT_CODE}} | Gift card code | GIFT-123 | rewardWhatsappConfig | Available only when reward type is Gift Card |
{{PRODUCT_NAME}} | Gift product title | Free Coffee Mug | rewardWhatsappConfig | Available only when reward type is Gift Card |
{{GIFT_URL}} | Auto-apply gift cart URL | https://yourstore.com/cart/{variant_id}:1?discount={code}&storefront=true | rewardWhatsappConfig | Available only when reward type is Gift Card |
{{DISCOUNT_CODE}} | Discount code reward | SAVE-123 | rewardWhatsappConfig | Available only when reward type is Flat Amount or Percentage Discount Code |
{{DISCOUNT_VALUE}} | Discount text | ₹150 off / 15% off | rewardWhatsappConfig | Available only when reward type is Flat Amount or Percentage Discount Code |
{{DISCOUNT_URL}} | Auto-apply discount URL | https://yourstore.com/discount/SAVE-123 | rewardWhatsappConfig | Available only when reward type is Flat Amount or Percentage Discount Code |
{{CREDIT_AMOUNT}} | Issued store credit amount | 150.00 | rewardWhatsappConfig | Available only when reward type is Store Credit |
{{CURRENCY_CODE}} | Store credit currency code | USD | rewardWhatsappConfig | Available only when reward type is Store Credit |
{{BALANCE_AFTER}} | Store credit balance after credit | 225.00 | rewardWhatsappConfig | Available only when reward type is Store Credit |
If a placeholder is not available for a trigger, it is sent as-is (not replaced). In Send Test Message, you can still provide manual values for any placeholder from the modal.
Full Example
{
"body.1": "Share your unique link, and your friends get {{FRIEND_REWARD}} OFF, while you earn ₹150 when they buy! 👇",
"body.2": "{{REFERRAL_LINK}}&source=order",
"languageCode": "en",
"button.url.0.1": "{{REFERRAL_CODE}}&source=order_cta"
}
Testing Templates
Before going live, test your template configuration:
- Go to Apps → Referbro → WhatsApp Settings.
- Scroll to the template you configured.
- Click Send Test Message and enter your phone number.
- Verify you receive the message with correct content and working links.
Test messages use the placeholder code TEST123. Make sure your template doesn’t have strict validation that would reject test codes.