Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

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 show 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).

...

Code Block
https://euc1-prod-bk-loyalty-middleware.rbictg.com/bulk-action/cold/create-offer

If you would like to test Please test offer assignment in Staging the Offer assignment first, just 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 .

Markets in EU Timezone and use euc1- , APAC Timezone should add euc1apse1- and apse1Iberia should use euw3- prefixes to the URL respectively (e.g., https://euc1euw3-prod-bk-loyalty-middleware.rbictg.com/bulk-action/cold/create-offer).

Input the URL in the “Webhook URL” field

...

Code Block
languagejson
{
  "email": "{{${email_address}}}",
  "source": "braze-test",
  "rank": 123456,
(optional)   "configId": "Loyalty engine id of config offer",
  "ruleParams": {
    "startDate": "yyyy-mm-dd",
    "endDate": "yyyy-mm-dd"
  }
}
  • Replace 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

Note

Note that in the past we relied on "userId": "{{${user_id}}}" , but after the EUC1 user data migration all campaigns should use "email": "{{${email_address}}}"

  • 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 apprank field

Note

startDate and endDate always counts from 00:00 to 23:59 from their respective dates.

  • 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)

...

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:

Code Block
"ruleParams": {
    "startDate": "{{ "now" | date:"%F" }}",
    "endDate": "{{ "now" | date:'%s' | plus:604800| date:"%F" }}"
  }

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).

Note

startDate and endDate always counts from 00:00 to 23:59 from their respective dates.

Request headers

Content-type

...