Contents
This guide will show you how you can create a Webhook campaign in Braze to assign offers to only specific users. This means only these particular users will see these offers. In order to do this you will need to create a config Offer in Sanity and then create a Braze webhook campaign to assign this offer to users that meet a specific criteria set in Braze (e.g. assign Veggie Whopper Offer to guests that replied to a survey that they are vegetarian).
Follow this guide to create the offer: Offers - Configuration Guide
Note: You will need a different Config Offer created for each offer you would like to assign using Braze. |
Loyalty Engine ID
of the config offer to input into Braze afterTo access Live Config Offers navigate to Order-Level Content > Loyalty > Live Offers Configuration > Live Offers > Live Config Offers in Sanity.
The offer will only show in the app if it is assigned to the user and added in this section in Sanity. |
Note: If the same offer is assigned multiple times, the user will see the same offer added multiple times to their offer list. This means that the user will see multiple instances of the same offer in their offer list - as many as offer assignments done for that offer. Each offer will maintain their own configuration settings |
Login to your braze account
In the homepage, click on “Campaigns”
Click on “Create Campaign”. Then click on “Webhook”.
Add the name of the campaign in the “Campaign Name” field
Click on “Blank Template”
the Hot path should be used for any user triggered campaigns that should happen in realtime
the Cold path should be used for any marketer triggered campaigns that can be processed over time
|
Example of Hot Webhook URL in Production:
https://euc1-prod-bk-loyalty-middleware.rbictg.com/bulk-action/hot/create-offer |
Example of the Cold Webhook URL in Production:
https://euc1-prod-bk-loyalty-middleware.rbictg.com/bulk-action/cold/create-offer |
Please test offer assignment in Staging first. To do this: replace prod
with staging
in the Webhook URL.
The brand can set as bk
(as seen in the example above), plk
or fhs
in the Webhook URL.
Markets in EU Timezone use euc1-
, APAC Timezone should add apse1-
and Iberia should use euw3-
prefixes to the URL respectively (e.g., https://euw3-prod-plk-loyalty-middleware.rbictg.com/bulk-action/cold/create-offer
).
Please test offer assignment in Staging first. To do this: replace prod
with staging
in the Webhook URL.
The brand can set as bk
(as seen in the example above), plk
or fhs
in the Webhook URL.
Markets in EU Timezone use euc1-
, APAC Timezone should add apse1-
and Iberia should use euw3-
prefixes to the URL respectively (e.g., https://euw3-prod-plk-loyalty-middleware.rbictg.com/bulk-action/cold/create-offer
).
Input the URL in the “Webhook URL” field
Keep this field set to “POST”. No changes needed here.
Inside “Request Body” choose “Raw Text”
Then copy the format below and paste it inside the Raw Text field.
{ "email": "{{${email_address}}}", "source": "braze-test", "rank": 123456, "configId": "Loyalty engine id of config offer", "ruleParams": { "startDate": "yyyy-mm-dd", "endDate": "yyyy-mm-dd" } } |
configId
→ replace configId
with the Loyalty Engine ID of the config offer you want to assign using Braze
source
→ should be braze
in Production; braze-test
in lower environments (Dev, Staging)
email
→ leave as is
startDate
and endDate
→ the endDate
must be set after the startDate
- this represents the duration of time the offer will be available for the guest in the app
|
rank
→ (optional) field that determines the sequence priority of the assigned personalized offer. The lower the number, the higher the priority (i.e. 1 would rank at the top)
By default, the assigned offers will have the same rules as the ones configured in Sanity. If you want to override some of these with custom rules, for example, a custom End Date & Start Date, you can pass the following arguments:
In the above example, we set the Start Date to be the time when the Offer was assigned, and we set the End Date to be 7 days after the offer was assigned (now + 604800 seconds). |
Content-Type: application/json |
x-region: gb |
|
x-api-key: string |
Please reach out to your market setup representative to get you access to the API Key in Production or Staging for your brand |
It is extremely important to test your offer webhook, before launching the campaign. Once an offer is assigned to a user its configuration and rules CANNOT be changed using Sanity. |
In the “Compose” section in Sanity click on “Test”. Then choose “Select existing user” from the dropdown “Preview message as user”. After this input the email address of your test user in the app. Last but not least, click on “Send Test”. Now the offer should show on the top of your offer list.
Note: The rest of the Braze campaign needs to be configured like any other Braze campaign (e.g. email, IAM, or push campaign). You will need to input specific information on the Schedule Delivery of the campaign, the Target users the campaign will apply to and when the campaign should be delivered to these target users. For more information refer to: https://www.braze.com/docs/user_guide/engagement_tools/campaigns |