Distribution with Braze Custom Attributes

Braze integration enables you to send Voucherify codes in your Braze messages. In this tutorial, we are going to show you how to send unique coupons, gift cards, loyalty, and referral codes to your Braze users. Voucherify enables you to use Braze's Connected Content, Braze's Custom Attributes, or Braze's Promo Codes Snippet to push codes from Voucherify to Braze. In this tutorial, we will show you how to use Braze's Custom Attributes with Voucherify distributions.

Before you start

Before you use Braze custom attributes in Voucherify distributions, you need to add your Braze users to the Voucherify dashboard. You can use Braze connected content to synchronize users or import your customers through CSV or API. Go here to read more about customer import.


How does it work?

Braze Custom Attributes enable you to assign Voucherify codes to custom attributes in user profiles in Braze. You can use unique coupons, gift cards, loyalty cards and referral codes. First, connect Voucherify with Braze, then create a distribution in Voucherify and finally create a campaign in Braze with the custom attribute snippet in your message template.

Step 1: Connecting Voucherify account to Braze

First, connect your Voucherify account with Braze. 

  1. Copy the REST API Key from your Braze account (it should at least have a permission 'users.track')

    Braze REST API Key Settings

  2. Go to the Integrations directory in your Voucherify dashboard, find Braze and choose Connect.Connect Braze Integration
  3.  Paste the copied API Key from Braze and choose Connect:

Step 2: Code distribution

When connected, you can start a new Voucherify distribution that assigns a code to the custom attribute in the user profile in Braze. Later on, you can use received attributes with codes in your Braze campaigns.

Before you import Customers

The below customer import feature is OPTIONAL. It is only mandatory for those who wish to perform a mass sendout. This use case is usually tied to the manual message option in the distributions manager, which is described below. In most instances, users are likely to follow a scenario where Voucherify responds to specific events (automatic workflow described below), leading to the saving of a customer with a source_id in Voucherify, which in turn triggers a distribution to Braze. We do not recommend importing for every use case—only selected ones. Please contact our support team to determine which avenue is appropriate for your use case.

Please note that before setting up distribution, you need to add your Braze users to the Voucherify dashboard. Go here to read more.

Customer Import

You can export your customers from Braze using the CSV export. Braze Audience > Segments > Segment of interest > User Data > CSV Export User Data.

Your CSV file will contain a header named user_id.

Go to Voucherify Dashboard > Customers > CSV Import.

Click Upload. A preview of available fields will be displayed.

Click Map fields.

The only required field to map is the user_id. Map this to the Voucherify field source_id.

Confirm by Pressing the Plus button to confirm the mapping.

Finish by pressing Import.

Once the import completes, you should see your Braze customers listed in the Customers Manager in Voucherify.

Setting up the distributionCreate distribution in Voucherify

You can distribute codes to Braze using two modes:

In both manual and automatic modes, Voucherify sends unique codes with their attributes and assigns them to Braze Custom Attributes in users' profiles. 

Map fields to custom attributes

Manual distribution

Manual mode works as a one-time action that assigns codes to a chosen audience. Go to the Distributions in your dashboard and run the Distribution Manager with the plus.

Choose Manual Message.

  1. Name your distribution.

    Name your distribution

    Choose a campaign that will be a source of unique codes (1) and select a segment of users or a single customer as your receivers (2). Read more about customer segments here.

    For instance, you can create a customer segment by filtering the source_id by a common attribute. In the instance above, the nomenclature of the source_id follows the following pattern braze-voucherify-import-export-test-4, which lets us create a segment with a filter such as:

    Choose campaign and users

  2. Go to the Next step to add marketing permissions. If you don't collect permissions from your audience, disable the consents verification.

    Set marketing permissions

  3. In the Next step, choose Braze as a channel and map custom fields that will be added to the user profile in Braze. You need to add the field representing the code of the published voucher; the rest of the fields are optional.

    Choose and set up Braze channel

    Note that the 'code of published voucher' field doesn't require pre-creation in Braze. This field simply labels the custom attribute where the code will appear. When the distribution is triggered, Voucherify automatically sends this to Braze, adding it as a custom attribute. In simple terms, this is where you decide how you want to label these fields in Braze.
  4. Choose Next step to see a summary of the distribution. Click Save and send to deliver codes to user profiles in Braze. 

Note that all manual distributions are sent with 10 minutes delay.

Braze's promo codes snippet

The manual distribution allows you to set up the distribution of the promotion tiers. Promotion tiers are not individually assigned like coupon codes. Instead, they notify customers that an available promotion will be applied automatically during checkout. The process is exactly the same as a standard manual distribution, with the exception of mapping specific fields, as shown in the screenshot below.

All the information regarding the promotion is sent from Voucherify and stored in Braze customer profiles alongside the environment it was sent from and the promotion code in three formats (text, barcode, and QR).

Automatic workflow

Voucherify can push codes to Braze automatically in response to the following triggers:

  • Customer entered/left specific Voucherify segment
  • Successful code publish – the message is sent once the code from a campaign is published (assigned) to a customer in Voucherify. 
  • Order status changed (order created, order update, order has been paid, order canceled)
  • Gift credits added – the message is sent once gift card credits are added to the customer's card. 
  • Loyalty points added – the message is sent once loyalty points are added to the customer's profile.
  • Voucher redeemed – the message is sent to customers who successfully redeemed vouchers.
  • Voucher redemption rollback – the message is sent to the customer whose redemption was successfully rolled back. 
  • Reward redemption – the message is sent when a customer redeems a loyalty or referral reward.
  • Custom event was logged for a customer - the message is triggered once Voucherify logs a particular custom event.

To set up an automatic workflow with Braze and Voucherify, visit distributions tutorial.

Step 3: Use Voucherify custom attributes in your Braze campaign

Once the custom attribute with the code is added to the customer's custom attributes in Braze, you can use it in your Braze campaigns.       

Edit the message body and add the custom attribute defined in the Voucherify distribution. Place {{custom_attribute.${custom_attribute_with_code}}} to display the unique code.

Braze email snippet

When it's ready, you can see the code in your message preview.

Braze email example

Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.

Still need help? Contact Us Contact Us