This User Guide will take you through the process of configuring a Promotion created through the MENU CMS in Braze’s Marketing Automation platform for a campaign, so a Promotion is issued to users when a Braze campaign triggers.
For example, you could configure a Braze campaign that triggers for users that have not placed an order in the past 30 days, with the message “We miss you! Here’s a free drink on us. Get it by tapping on Promotions in your Profile.”. When the campaign triggers for a user (and sends the push message), Braze can let MENU know that a Promotion should be issued to that user, so when the user opens their app, they’ll find the Free Drink Promotion on their app, ready to be redeemed.
We’re going to be using Braze’s Webhook feature to configure the Braze campaign to let MENU know when the campaign is triggered, as well as which Promotion should be issued to the user.
Step 1: Create the Promotion in the MENU CMS
First of all, the Promotion you want to issue through Braze needs to be created in the MENU CMS. You can create a new Promotion from the Promotions page, found by navigating to the Promotions tab for your Brand:
Click on ADD PROMOTION and fill in the relevant fields for your new your Promotion. For the Distribution Type make sure to select Marketing Automation. This defines that you’ll be distributing this Promotion through a Marketing Automation platform (in your case Braze):
The Promo Code is what we’ll also be entering in the Braze campaign later on, to configure which Promotion should be issued, so make sure to take note of what you’re entering here, we’ll need it later! The Promo Code needs to be unique for all of your Promotions, so make sure to enter something you’ve not used before. You can issue more than one Promotion through a single Braze campaign, so if that’s what you want to do, just make sure to take note of all your promo codes.
Below the Promo Code you’ll find the Brand Token, please make a note of that as well, since we’ll also need that later.
Once you’re done configuring your new Promotion, click on SUBMIT to create it. If all is well, you’ll get a success message in the bottom-right corner of your screen.
Congrats! You’ve created your Promotion. Now, let’s go over to Braze.
Step 2: Create Webhook in Braze Campaign or Canvas Step
You can issue one or more Promotions through a campaign or canvas step. In both cases you’ll want to add a Webhook messaging channel to your campaign / canvas step. If you are creating campaign, since you also want to send a push notification or e-mail with the campaign, this means you’ll want to create a Multi-Channel Campaign (a webhook counts as it’s own channel).
If you don’t have a template for MENU webhooks (we’ll show you how to create one later), select Blank Template. If you already have a template, go ahead and select it.
What you’ll enter for the WEBHOOK URL depends on what geographical environment your Brand is hosted in:
- EU: https://api.menu.app/api/discounts/cdp-promotions
- US: https://api-us.menu.app/api/discounts/cdp-promotions
- LAC: https://api-lac.menu.app/api/discounts/cdp-promotions
If you’re unsure which environment your Brand is hosted in, check the URL of your CMS. That should help.
Step 3: Configuring JSON Key/Value Pairs for Webhook
Next we’re going to be configuring 3 Key/Value Pairs for the Webhook. Think of those pairs as pieces of information that Braze is sending to MENU. The three pieces of information Braze will be sending to MENU are the ID of the customer’s account, the ID of the customer’s device and the promo code of the Promotion(s) you created in Step 1.
This might seem complicated, but no worries, we’ve got you:
Step 3.1: customer_account_id
To add a new Key/Value Pair click on Add New Pair.
Next, enter “customer_account_id” in the field next to the key icon.
Once you’ve done this, click on the + icon in the other field (we’ve pointed an arrow to it for you above). This will open a new form.
In this form, select user_id from the Attribute dropdown.
Once you’ve done this, check the Preview. It should look like this:
If that’s the case, click on Insert Personalization to close the form.
Nice! You’ve added your first Key/Value Pair. Only two more to go.
Step 3.2: device_uuid
Click on Add New Pair to add another one and enter “device_uuid” in the field next to the key icon.
Once you’ve done this, click on the + icon in the other field to open the Add Personalization form again.
In this form, select Custom Attributes from the Personalization Type dropdown, device-uuid from the Attribute dropdown.
Once you’ve done this, check the Preview. It should look like this:
If that’s the case, click on Insert Personalization to close the form. One more to go!
Step 3.3: promotion_codes
Click on Add New Pair to add another one and enter “promotion_codes” in the field next to the key icon.
In the field on the right of the arrow icon, enter the promo code(s) from Step 1. If you want to issue more than one Promotion, separate the promo codes with a comma (like promo_code_1,promo_code2,promo_code3).
You’re done configuring all Pairs! On to the next step.
Step 4: Configuring Request Headers for the Webhook
Next, we’re going to be configuring two Request Headers for the Webhook. Think of Request Headers as a way of Braze telling MENU what it is getting in the first place.
To configure Request Headers, we’re going to be switching to the Settings tab.
Click on Add New Pair, and enter “Content-Type” into the field next to the key icon and “application/json” into the field next to the arrow icon.
Click on Add New Pair again, and enter “Brand-Token” into the field next to the key icon and your Brand Token from Step 1 into the field next to the arrow icon.
You’ve just configured the webhook!
Step 5: Testing the Webhook
Now let’s test the webhook, just to make sure we’ve done everything right. It’s really important that you do this for every new campaign / canvas step you are creating. I mean, we want your users to receive their promo, right?
We’re going to be testing the webhook by issuing the Promotion to ourselves (so make sure you have a registered account on the app).
To do so, we’ll switch to the Test tab.
Select Select Existing User from the PREVIEW MESSAGE AS USER dropdown, enter the e-mail address with which you’ve created your customer account in the app and click on the search button.
Make sure that Braze found the right profile for you.
Now is the moment of truth: Click on Send Test to issue yourself the Promotion. To verify that everything worked, open the app and navigate to Profile and then Promotions. You should see the Promotion you configured in the CMS before.
You see the Promotion? Pat yourself on the back! You’ve successfully configured the webhook. Your users are going to love that shiny new Promotion of yours!
Of course you’re now going to want to continue by configuring the actual message (push, e-mail or SMS) that you want your users to receive, letting them know that they’ve received a new Promotion. I know you’ll think of something awesome to say!
If you run into any trouble configuring & testing your webhook, open a ticket through one of our contact forms and our friendly support ninjas will be happy to help you out.
Pro Tip: Create a Webhook Template
To make it easier to add the webhook to a campaign / canvas step, you can create a Webhook Template, that you can use when adding the webhook, since a lot of the configuration for the webhook is the same across campaigns / promotions.
To create a webhook template, navigate to Templates & Media and then open the Webhook Templates tab in Braze. Click Blank Template to create a new template, perform Steps 2 – 5 above and then save the template.
Now when you want to add the webhook to any new campaign / canvas step, you can select your template.
The only thing you need to change is the promotion_codes Key/Value Pair to reflect the Promotion(s) you’d like to issue through the campaign / canvas step.
Note that even when you’re using a Webhook Template, it is still important that you test the webhook for every single campaign / canvas step you are creating.
Please sign in to leave a comment.