How to Email Coupon Codes Through Braze to Advocates and Friends After They Are Distributed by Friendbuy
Updated
by Connor Johanning
Overview
When Friendbuy distributes rewards such as Advocate Reward Codes or Referred Friend Incentive Codes, these coupon codes are also synced to Braze as custom attributes on user profiles.
This guide outlines how to automatically send an email through Braze containing the customer’s dynamically inserted coupon code.
Before You Start
In Braze, Canvas flows support single entry triggers, so you will need to create one Canvas per reward type, such as:
- Advocate Reward Earned
- Friend Incentive Reward Earned
- Loyalty Reward Earned
This recipe focuses on the Advocate Reward Earned event, but the steps are identical for any reward type once you select the correct event trigger.
Coupon Properties in Braze
Once the Friendbuy integration is enabled, you will see coupon properties inside each Braze user profile, for example:
advocate_reward_codereferred_friend_coupon_code
These are automatically kept in sync whenever Friendbuy distributes a reward.
Step 1: Create a Canvas for Reward Emails
1. Navigate to Canvas
In Braze:
- Open Messaging → Canvas
- Click Create Canvas
2. Choose Canvas Type
Select Build from Scratch
3. Name Your Canvas
Example:
Advocate Reward Coupon Code Email
Step 2: Choose the Entry Trigger
Configure Your Trigger
Under Entry Audience → Action-Based Trigger:
- Choose your Friendbuy reward event:
friendbuy_advocate_reward_earned(event naming varies by integration)
- Set Re-Entry according to your program needs
- Recommended: allow re-entry so repeat Advocate referrers continue receiving coupon emails
You must have the Friendbuy → Braze integration enabled to see these events.
Step 3: Add an Email Step
- Click the + icon under your trigger
- Choose Email
- This adds your first message to the Canvas
Step 4: Design Your Coupon Code Email
1. Open the Email Editor
- Click the email step
- Select Edit Message
2. Choose How to Design the Email
Braze offers multiple builders. Most customers choose:
- Drag & Drop Editor
3. Select a Template
You may:
- Use a Braze template
- Start from scratch
- Use a custom brand template
4. Insert the Friendbuy Coupon Code
Inside your email content, place a text block in the appropriate location.
Use the Braze Liquid syntax:
For Advocate coupons:
{{custom_attribute.${advocate_reward_code}}}
For Referred Friend coupons:
{{custom_attribute.${referred_friend_coupon_code}}}
This dynamically inserts the exact coupon code Friendbuy distributed to the user.
Optional: Save the Coupon Block
To reuse this coupon content in other campaigns:
- Hover over the block
- Click Save Block
- Name it something like Friendbuy Coupon Code Block
This lets you reuse the same block across future canvases.
Step 5: Turn the Message Live
Braze requires both the individual email message and the overall Canvas to be activated.
Activate the Email
- Open the email step
- Switch the Message Status from Draft to Active
Activate the Entire Canvas
- Click Launch Canvas
- Review:
- Recipient logic
- Trigger
- Message settings
- Confirm launch
Your coupon code email now sends instantly whenever Friendbuy distributes a reward to a customer.