Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 23 Next »

Benjamin Reynolds (Deactivated) recording → Targeted Coupons Through Braze-20220322_123641-Meeting Recording.mp4

Your RBI product or customer success team can tell you whether you should follow the “Traditional Offers Assignment” or “Loyalty Offers Assignment” flow for your market.

Traditional Offers Assignment

Sanity Setup

Use Required assignment ruleset

  1. Add the offer to Feature Offers

    1. please note that wherever you order the offer in the Feature Offer List, is where the offer will show as available to the user

  2. On the offer in sanity, set the Requires Assignment rule

    1. if there are other rules in the offer, make sure that the Requires Assignment Rule is the LAST ONE listed

If the same offer is assigned multiple times, the user will not see the same offer added multiple times to their offer list. Instead, the already assigned offer will be updated with the new offer assignment settings

Example: https://prod-bk-menu.de.rbi.tools/desk/orderLevelContent;menu;offers;offer;b3d0ed6f-f0b9-4ae0-8b74-c9036436345d;ccc12e32-6c91-4f8b-820a-cf073dd5194f%2Ctype%3Dcombo%2CparentRefPath%3Doption;38107448-4933-4e73-bfbd-63cdcd67e5a4%2Ctype%3DcomboSlot%2CparentRefPath%3Doptions[_key%3D%3D"91b3816ff9ad"]

Find here documentation on Sanity rulesets.

Make sure that all the PLUs are set to the correct value. If set to Empty, the assigned offer won’t show in the offer list

Braze Configuration

Body request

{
  "couponId": "0526d543-3871-4e9c-bec5-327ebcd3f1db",
  "tokenId": "tester",
  "email": "{{${email_address}}}",
  "expiresOn": "2020-08-11T08:59:59.000Z"
}
  • Replace couponId with the offer Sanity ID of the coupon you want to assign

  • tokenId should be a unique identifier for each campaign

  • email -> leave as is

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}}}"

  • expiresOn -> this field determines when the offer assignment will expire, so i.e. the end of the offer life

Request headers

Webhook URLs

US-East-1 (Americas Timezone Markets)
https://prod-bk.rbictg.com/api/v2/braze/webhooks/assign-coupon-token
EU-Central-1 (EU Timezone Markets)
https://euc1-prod-bk.rbictg.com/api/v2/braze/webhooks/assign-coupon-token
AP-SouthEast-1 (APAC Timezone Markets)
https://apse1-prod-bk.rbictg.com/api/v2/braze/webhooks/assign-coupon-token

Make sure you use v2 - in the past the URL used to be v1

If you would like to test in Staging the Offer assignment first, replace prod with staging in the Webhook URL.

Authorization

Authorization: Basic <Get this from your RBI Product or Customer Success Team>

Content-type

Content-Type: application/json

Loyalty Offers Assignment (Loyalty Offers Platform)

Sanity Setup

  • Create a template offer (e.g. template offer for Braze Offers in BK UK)

    • this offer can be used for all future Braze Offer Assignments

    • save the Loyalty Engine ID of the template offer to input into Braze after

    • under Mechanics ensure a config offer is added under Config Offer and under the Required Rules drop down the Date Band toggle is turned on

      • it does not make a difference which config offer is within the template offer in Sanity - it just needs to be added so the offer can be Published

  • Create a Config Offer (e.g. config offer for for BK UK)

    • you will need a different Config Offer created for each offer you would like to assign using Braze

    • save the Loyalty Engine ID of the template offer to input into Braze after

    • within this config offer, in the Mechanics dropdown under Benefits you will need to link the offer benefits (e.g. Picker or Offer Combo)

    • Make sure to add the config offer to the list of Live Config Offers in the Loyalty Offers UI in Sanity, so the offer shows in the app to the user after it is assigned

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

Braze Configuration

Body request

{
  "email": "{{${email_address}}}",
  "templateId": "31860003-2e04-4b2e-9008-a6aa33f69da9",
  "source": "braze-test",
  "rank": 123456, (optional)
  "configId": "Loyalty engine id of config offer",
  "ruleParams": {
    "startDate": "yyyy-mm-dd",
    "endDate": "yyyy-mm-dd"
  }
}
  • Replace templateId with the Loyalty Engine ID of the Template Offer used for Braze Offers

  • Replace configId with the Loyalty Ending ID of the 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 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-> required fields; the endDate must be set after the startDate - this represents the duration of time the offer assignment will be available for

  • rank field (optional) 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)

Request headers

Webhook URL

the Hot path should be used for any user triggered campaigns that should happen in realtime

  • ie: T-Mobile Tuesdays, sign up bonuses

the Cold path should be used for any marketer triggered campaigns that can be processed over time

  • ie: mass offers assignments, mass points updates

Example of Hot Webhook URL in Production:

https://prod-bk-loyalty-middleware.rbictg.com/bulk-action/hot/create-offer

Example of the Cold Webhook URL in Production:

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

If you would like to test in Staging the Offer assignment first, just replace prod with staging in the Webhook URL.

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

Content-type
Content-Type: application/json
X-Region
x-region: gb

x-region is the 2-character ISO country code string of that market (e.g. gb = United Kingdom, ch = Switzerland)

X-Api-Key
x-api-key: string

Please reach out to Lopes da Costa, Valentina or another PM to get you access to the API Key in Production or Staging for your brand

Other resources

Assign Loyalty Points to Users Using Braze Webhook

This can be used for all Markets with Loyalty

Body request

{
"pointsEarned": 500,
"source": "braze",
"email": "{{${email_address}}}"
}
  • Replace pointsEarned with the amount of points you would like users that receive this Braze web hook to receive

  • source should be braze in Production; braze-test in lower environments (Dev, Staging)

  • email -> leave as is

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}}}"

Request headers

Webhook URL

the Hot path should be used for any user triggered campaigns that should happen in realtime

  • ie: T-Mobile Tuesdays, sign up bonuses

the Cold path should be used for any marketer triggered campaigns that can be processed over time

  • ie: mass offers assignments, mass points updates

Example of Hot Webhook URL in Production:

https://prod-bk-loyalty-middleware.rbictg.com/bulk-action/hot/assign-points

Example of the Cold Webhook URL in Production:

https://prod-bk-loyalty-middleware.rbictg.com/bulk-action/cold/assign-points

If you would like to test in Staging the Offer assignment first, just replace prod with staging in the Webhook URL.

Markets in EU Timezone and APAC Timezone should add euc1- and apse1- prefixes to the URL respectively (e.g., https://euc1-prod-bk-loyalty-middleware.rbictg.com/bulk-action/cold/assign-points)

Content-type
Content-Type: application/json
X-Region
x-region: gb

x-region is the 2-character ISO country code string of that market (e.g. gb = United Kingdom, ch = Switzerland)

X-Api-Key
x-api-key: string

Please reach out to Lopes da Costa, Valentina or another PM to get you access to the API Key in Production or Staging for your brand

  • No labels