Skip to main content
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

  1. You create a Message Template on your WhatsApp provider’s platform (e.g., Pragma, Meta).
  2. Meta approves the template (required for all business-initiated messages).
  3. You map the approved template in Referbro by entering its ID and parameters.
  4. 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 TypeTriggerPurpose
Referral Share (whatsappConfig)Customer clicks “Share on WhatsApp” in widgetFirst-person referral invite
Post-Purchase Nudge (orderConfig)After a customer places an orderEncourage sharing while the customer is happy
Post-Referral (postReferralWhatsappConfig)After a successful referral is madeConfirm the referral and encourage more sharing
Nudge / Reminder (nudgeConfig)Scheduled reminderRe-engage customers who haven’t shared yet
Reward Notification (rewardWhatsappConfig)Referrer earns a rewardNotify the referrer of their earned reward
Delivery Notification (deliveryConfig)Order is marked as deliveredPrompt sharing after the customer receives their order
Referrer Delivery (referrerDeliveryConfig)Referred friend’s order is deliveredNotify the referrer that their friend received the order
Post-Delivery Followup (postDeliveryFollowupConfig)Configured time after deliveryFollow-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.

Parameter Key Format

Key PatternMeaningExample
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"
languageCodeTemplate 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.
PlaceholderReplaced WithExample OutputAvailable InWhen It Is Available
{{REFERRAL_CODE}}The customer’s unique referral codeJOHN-AB12All template slotsAlways available in automated sends (and test sends, where fallback is TEST123)
{{REFERRAL_LINK}}Full referral link URLhttps://yourstore.com?ref=JOHN-AB12Share-link message flowAvailable in the widget share URL flow (/whatsapp/share), not auto-injected in server-side template sends
{{FRIEND_REWARD}}Friend offer text₹150 OFFShare-link message flowAvailable in the widget share URL flow (/whatsapp/share), not auto-injected in server-side template sends
{{FIRST_NAME}}Customer’s first nameJohnN/ANot auto-injected yet
{{REFERRER_NAME}}Referrer’s nameJohnrewardWhatsappConfigAvailable for all reward notifications
{{GIFT_CODE}}Gift card codeGIFT-123rewardWhatsappConfigAvailable only when reward type is Gift Card
{{PRODUCT_NAME}}Gift product titleFree Coffee MugrewardWhatsappConfigAvailable only when reward type is Gift Card
{{GIFT_URL}}Auto-apply gift cart URLhttps://yourstore.com/cart/{variant_id}:1?discount={code}&storefront=truerewardWhatsappConfigAvailable only when reward type is Gift Card
{{DISCOUNT_CODE}}Discount code rewardSAVE-123rewardWhatsappConfigAvailable only when reward type is Flat Amount or Percentage Discount Code
{{DISCOUNT_VALUE}}Discount text₹150 off / 15% offrewardWhatsappConfigAvailable only when reward type is Flat Amount or Percentage Discount Code
{{DISCOUNT_URL}}Auto-apply discount URLhttps://yourstore.com/discount/SAVE-123rewardWhatsappConfigAvailable only when reward type is Flat Amount or Percentage Discount Code
{{CREDIT_AMOUNT}}Issued store credit amount150.00rewardWhatsappConfigAvailable only when reward type is Store Credit
{{CURRENCY_CODE}}Store credit currency codeUSDrewardWhatsappConfigAvailable only when reward type is Store Credit
{{BALANCE_AFTER}}Store credit balance after credit225.00rewardWhatsappConfigAvailable 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:
  1. Go to Apps → Referbro → WhatsApp Settings.
  2. Scroll to the template you configured.
  3. Click Send Test Message and enter your phone number.
  4. 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.