...
This guide will show you how you can create a Webhook campaign in Braze to assign offers to only specific usersguests. This means only these particular users guests 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 guests 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).
...
Note |
---|
The offer will only show in the guest app if it is assigned to the user guest and added in this section in Sanity. |
...
Info |
---|
Note: If the same offer is assigned multiple times, the user guest will see the same offer added multiple times to their offer list. This means that the user guest 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 |
...
In the homepage, click on “Campaigns”
...
Info |
---|
“Campaign” assignment works well for if you are aiming to do a one-shot offer assignment. Instead, if you are aiming to perform one of the below tasks, you should use “Canvas” instead:
More details here: https://rbictg.atlassian.net/wiki/spaces/IC1/pages/edit-v2/5157814281 |
3. Create a new Webhook Campaign
...
5. Compose the Webhook
Webhook URL
Example of Hot Webhook URL in Production:
Code Block |
---|
https://euc1-prod-bk-loyalty-middleware.rbictg.com/bulk-action/hot/create-offer |
Example of the Cold Webhook URL in Production:
Code Block |
---|
https://euc1-prod-bk-loyalty-middleware.rbictg.com/bulk-action/cold/create-offer |
Info |
---|
the Hot path should be used for any user guest 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 the Webhook URL in Productionshould always begin with the following format:
Code Block |
---|
https://euc1-prod-bk{reg}-{env}-{brand}-loyalty-middleware.rbictg.com/bulk-action/hot/create-offer |
Example of the Cold Webhook URL in Production:
Code Block |
---|
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.
...
Where:
Region
{reg}
variables:euc1
EU Timezone Marketsapse1
APAC Timezone Marketsuse1
LAC Timezone Marketseuw3
Iberia Timezone Market
Environment
{env}
variables:dev
,staging
,qa
orprod
. Please always test withstaging
first.Brand
{brand}
variables:bk
,plk
orfhs
(other brands are not supported in International markets yet).
Please always test offer assignment in staging
environment first. Here is an example of an URL with an offer that needs to be assigned in staging
env for PLK ES using hot
path:
https://euw3-prodstaging-plk-loyalty-middleware.rbictg.com/bulk-action/coldhot/create-offer
).
Input the URL in the “Webhook URL” field
...
configId
→ replaceconfigId
with the Loyalty Engine ID of the config offer you want to assign using Brazesource
→ should bebraze
in Production;braze-test
in lower environments (Dev, Staging)email
→ leave as isstartDate
andendDate
→ theendDate
must be set after thestartDate
- this represents the duration of time the offer will be available for the guest in the guest app
Note |
---|
|
...
Info | ||
---|---|---|
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). |
Request headers
Scroll down to request headers section and click “Add New Header” 3 times
Then input the below headers keys and their values (
Content-type
,x-region
, andx-api-key
)
...
Content-type
Code Block | ||
---|---|---|
| ||
Content-Type: application/json |
...
Note |
---|
Please reach out to your market setup representative to get you access to the API Key in Production or Staging for your brand |
...
6. Test the offer is getting assigned to your
...
guest
Note |
---|
It is extremely important to test your offer webhook, before launching the campaign. Once an offer is assigned to a user guest 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 guest app. Last but not least, click on “Send Test”. Now the offer should show on the top of your offer list.
...
Note |
---|
If you are assigning a high number of offers with a campaign ensure the rate limit is set to a maximum 50K offers assigned per minute as not to strain the APIs. |
Info |
---|
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 |
...
guests. For more information refer to: https://www.braze.com/docs/user_guide/engagement_tools/campaigns |