Voucherify
Voucherify is an all-in-one promotional platform that allows for personalized campaigns and loyalty programs that drive user engagement and retention.
The Braze and Voucherify integration allows you to grow your promotional campaigns by sending unique codes through the use of:
- Connected Content: Add unique codes to Braze campaigns via Braze’s Connected Content. With this feature, you can use Voucherify discount coupons, gift card campaigns, loyalty cards, and referral codes.
- Custom Attributes: Custom attributes enable you to assign Voucherify unique coupons, gift cards, loyalty cards, and referral codes to users’ profiles in Braze. As a result, you can send attached codes and attributes in email campaigns and share them with your users.
- Promotion Codes Lists: Use Voucherify generated promotion codes and upload them into Braze.
Prerequisites
Requirement | Description |
---|---|
Voucherify account | A Voucherify account is required to take advantage of this partnership. |
Braze REST API key | A Braze REST API key with users.track permissions. This can be created within the Braze Dashboard > Developer Console > REST API Key > Create New API Key. |
Integration
Generate unique codes using Connected Content
Step 1: Build out Voucherify Connected Content call
From the Braze dashboard, create a new campaign. In the email body, add the following code snippet:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
{% assign campaign_id = {{campaign.${api_id}}} %}
{% assign customer_id = {{${user_id}}} %}
{% assign source_id = campaign_id | append: customer_id %}
{% connected_content
https://api.voucherify.io/v1/publications
:method post
:headers {
"X-App-Id": "VOUCHERIFY-APP-ID",
"X-App-Token": "VOUCHERIFY-APP-TOKEN"
}
:body campaign=CAMPAIGN_ID&customer={{${user_id}}}&channel=Braze&source_id={{source_id}}
:content_type application/json
:save publication
%}
After you copy the code to the email body, add your application keys and CAMPAIGN_ID
:
- Add
VOUCHERIFY-APP-ID
andVOUCHERIFY-APP-TOKEN
from your Voucherify project settings under Application Keys. - Replace
CAMPAIGN_ID
, you can find the campaign ID in the Voucherify campaign URL. - Lastly, add
{{publication.voucher.code}}
to the email body to display the published code, and select Preview and Test.
We highly advise you to send several test messages to confirm that everything works as it should.
The {{source_id}}
parameter in the email body ensures that each customer will receive only one unique code in a single Braze email campaign, and upon resend, will receive the same code. Visit Voucherify to change this behavior and see other configurations.
Step 2: Send and track user codes
Launch your Braze campaign to send codes to your users, these codes will automatically be assigned to their profile in Voucherify.
When a code gets to the user, it is published to their profile in Voucherify.
If a user redeems the code, you’ll see the redemption details in your Voucherify Dashboard.
- When testing the email template, be aware of the Connected Content cache (at least 5 minutes). If you want each test preview to publish a new voucher, you can omit the cache by appending a query parameter to the URL, e.g.,
?t=1
, and increment the number with each test. - While setting up publication
source_id
, you can differentiate your users by using two different variables:${user_id}
which is an external id (seen as source id in a customer profile in Voucherify) and${braze_id}
which is an internal id.
Assign unique codes to users’ custom attributes
Step 1: Connect Voucherify account
To connect your Voucherify account, visit the Integrations Directory in your Voucherify dashboard, locate the Braze integration, and add your Braze API key.
Step 2: Code distribution
Next, you must decide whether to distribute codes to Braze in manual mode or define a workflow that triggers code delivery in response to your user’s actions. In both situations, Voucherify sends unique codes with their attributes and assigns them as custom attributes in users’ profiles.
Besides the unique code, you can also attach attributes like when the code was delivered, the code’s value, and URLs that direct the customer to the cockpit, where all assigned codes and available rewards will be listed.
Note that before setting up distribution, you need to add your Braze users to the Voucherify dashboard. Go here to read more.
Manual mode works as a one-time action that assigns codes to a chosen audience. You can select a Voucherify segment of users or a single user as your receivers and choose a campaign that will be a source of unique codes.
To set up manual distribution with Braze and Voucherify, visit a Voucherify step-by-step tutorial.
Set an automated workflow that delivers codes to Braze in response to actions taken by your users:
- Customer entered/left specific Voucherify segment.
- Successful code publication – 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 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.
To set up an automatic workflow with Braze and Voucherify, visit a Voucherify step-by-step tutorial.
Step 3: Use Voucherify custom attributes in your Braze campaign
When the custom attribute with code is added, you can use it in Braze campaigns. To do this, edit your email body and add
{{custom_attribute.${custom_attribute_with_code}}}
to display the unique code.
You can see the code in your message preview when it’s ready.
Step 4: Track sent codes in Voucherify
Launch your Braze campaign to send codes to your users; these codes will automatically be assigned to their profile in Voucherify.
When a code gets to the user, it is published to their profile in Voucherify.
If a user redeems the code, you’ll see the redemption details in your Voucherify Dashboard.
Upload Voucherify codes to Braze promotion codes lists
Next to the Connected Content and custom attributes, you can share Voucherify codes using Braze Promo Codes snippet.
Step 1: Export unique codes from your Voucherify campaign
Export the Voucherify code list and edit the CSV file to remove the column’s name to leave the list of codes only.
Step 2: Create promotion code list in Braze
Navigate to Promotion Codes and click Create Promotion Code List.
Next, update the Liquid code snippet that will be used to call from the list. Once the message is sent, this snippet will be populated with a unique code.
You can set attributes for codes such as list expiration and threshold alerts. However, note that Voucherify manages the logic behind your codes regardless of list settings.
Next, upload the CSV file with Voucherify codes.
When the import is done, click Save.
Step 3: Use the code snippet in your Braze campaign
To use codes from the list in a Braze campaign, copy the snippet and add it to the email body.
Once the message with the code is sent, the same code will not be reused.
If you need help with any of these steps, visit Promotion codes.