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

Version 1 Next »

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

Sanity config

Use Required assignment ruleset

On the offer in sanity, set the ‘requires assignment' rule

Example: https://prod-bk-menu.co.uk.rbi.tools/desk/orderLevelContent;menu;legacyOffers;offer;0cb01728-8081-4081-846b-0bdd81ede247

Find here documentation on Sanity rulesets

Braze config

Body request

{
  "couponId": "0526d543-3871-4e9c-bec5-327ebcd3f1db",
  "tokenId": "tester",
  "userId": "{{${user_id}}}",
  "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

  • userId -> leave as is

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

Request headers

Webhook URL

https://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

Authorization

Authorization: Basic SCYkKk1tTnVQIiVtJCJLcUVpOWRpfmBEK3pJYkwlN24yLFhGbnpRfDpNWi4hcVgvRWI5dkZxTy45bXleNVFTTXkwZFo6WkdOJFwualRDeWFs

Content-type

Content-Type: application/json

  • No labels