How to Email Coupon Codes Through Braze to Advocates and Friends After They Are Distributed by Friendbuy

Connor Johanning 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_code
  • referred_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:

  1. Open Messaging → Canvas
  2. 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:

  1. Choose your Friendbuy reward event:
    • friendbuy_advocate_reward_earned (event naming varies by integration)
  2. 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

  1. Click the + icon under your trigger
  2. Choose Email
  3. 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:

  1. Hover over the block
  2. Click Save Block
  3. 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
  1. Open the email step
  2. Switch the Message Status from Draft to Active
Activate the Entire Canvas
  1. Click Launch Canvas
  2. Review:
    • Recipient logic
    • Trigger
    • Message settings
  3. Confirm launch

Your coupon code email now sends instantly whenever Friendbuy distributes a reward to a customer.

How did we do?

How to Send Referral Links Post Purchase Through Braze

How to Promote Your Referral Program via SMS (Through Braze)

Contact