Braze Webhooks Adapter Overview
Braze is a Customer Engagement Platform that powers customer-centric interactions between consumers and brands in real time, enabling brands to create and manage communications that are tailored to individual consumers. This can include activities like sending targeted messages, personalized offers, or notifications based on customer behavior and preferences.
The Braze and Punchh integration allows a brand to sync data across the two platforms for gifting and loyalty purposes. User data published in Braze will be available for segmentation and can be synced with Punchh via Braze webhooks.
Integrating Braze with Punchh requires the creation of a specific Braze adapter within the Webhooks Manager. For more information, see the "Webhooks Adapter" section in the Braze Implementation article on the Support Portal.
Note: To view the Punchh product documentation on the Punchh Support Portal, you must log in to a Punchh platform production environment. If you already have access to a production environment, follow the instructions here to access the Punchh Support Portal.
Events at a Glance
Currently, Punchh supports sending data for these events to Braze:
- Braze Event - Guest
- Braze Event - Loyalty Check-in
- Braze Event - Gift Check-in
- Braze Event - Redemptions
- Braze Event - Rewards
- Braze Event - Pending Check-ins (transactional notification)
- Braze Event - Post Check-in Campaign Gift (marketing notification)
- Braze Event - Coupon Issuance - Unlock Type
- Braze Event - Coupon Redemptions
Common Parameters in Braze Event Responses
Braze events return these three standard response parameters.
| time | Date_time | Date and time of the event |
| external_id | String | ID stored in Punchh against the external source when creating/updating a user in Punchh. This is the ID assigned to the user in Braze. |
| name | String | Name of the event |
Exclude User Profile Data From Custom Events
By default, the "attributes" object containing user profile data sent in Braze Event - Guest is also sent in the Braze custom events or non-user events such as Loyalty Check-in, Redemptions, Rewards, etc. In addition to the "attributes" key, the custom events have an "events" key that contains the event data. However, you can exclude the user attributes when sending a Braze custom event to avoid sending redundant user data and to reduce data costs. To exclude the "attributes" object, you need to set Disable sending default user attributes to Braze to Yes when creating or editing your Braze adapter in the Punchh platform.
When Disable sending default user attributes to Braze is set to No:
- All parameters in the user "attributes" object are sent in the Braze Event - Guest event, regardless of whether a parameter has been updated or not.
- The "attributes" object is available in all custom events (events that are not guest events).
When Disable sending default user attributes to Braze is set to Yes:
- The “attributes” object is not available for custom events.
- The entire “attributes” object is available in the Braze Guest Create event and will be sent as is when no mapping is present; otherwise, it will work as per the mapping.
- Only the updated fields are available in the “attributes” object in the Braze Guest Update event. All changes sent in the Braze Guest events are based on delta (updated values).
punchh_user_idis included in the Braze Guest Create event only.guest_typeis sent only as part of the Braze Guest Create event when the user is being converted or transitioning from eClub to Loyalty.
For more information about setting Disable sending default user attributes to Braze in the Punchh platform, see the "Webhooks Adapter" section in the Braze Implementation article on the Support Portal.
Note: To view the Punchh product documentation on the Punchh Support Portal, you must log in to a Punchh platform production environment. If you already have access to a production environment, follow the instructions here to access the Punchh Support Portal.
Sample Payload for Custom Events With and Without User Attributes
This is a sample payload for redemptions create/update events triggered as they happen in the Punchh system. When Disable sending default user attributes to Braze is set to No, the sample payload will contain the default "attributes" key along with the "events" key as shown in the sample payload below.
{
"attributes": [
{
"last_name": "5476",
"punchh_user_id": 18268,
"signup_channel": "MobileEmail",
"account_balance_total_point_credits": 0,
"email_subscribe": "subscribed",
"external_id": "18268",
"favourite_store_numbers": "",
"terms_and_conditions": false,
"account_balance_current_membership_level_name": "Silver Level",
"account_balance_net_balance": 0,
"confirmation_sent_at": "2021-08-16T15:01:46Z",
"referral_code": "Rohitcf2072",
"user_status": "active",
"account_balance_total_lifetime_points": 0,
"email": "test@example.com",
"push_subscribe": "subscribed",
"time_zone": "Asia/Kolkata",
"date_of_last_session": "2021-08-16T15:01:45Z",
"first_name": "Rohit",
"guest_type": "Loyalty",
"sms_subscription": false,
"account_balance_net_debits": 0,
"business_uuid": "57efe5f1-06cc-40df-8388-24026c45c8e4",
"current_sign_in_at": "2021-08-16T15:01:45Z",
"date_of_first_session": "2021-08-16T15:01:45Z"
}
],
"events": [
{
"properties": {
"redemption_code_discount": 1,
"redemption_code_subtotal_amount": 10,
"redemption_status": "redeemed",
"store_number": "39450",
"created_at": "2021-08-16T15:24:48Z",
"expiring_on": "2021-08-16T19:24:48Z",
"redeemed_menu_items": [
{
"item_qty": 2,
"menu_family": "3000",
"menu_item_type": "M",
"menu_major_group": "3000",
"serial_number": "1",
"menu_item_id": "260035",
"item_amount": 10,
"item_name": "Spicy Polynesian Poke Bwl"
}
],
"redemption_code_id": 3564,
"redemption_code_receipt_amount": 10,
"redemption_code_status": "processed",
"channel": "POS",
"redeemable_id": 121,
"redeemed_points": 1,
"points_requested": 10,
"redemption_code_processed_at": "2021-08-16T15:24:48Z",
"redemption_code_receipt_datetime": "2021-07-17 02:13:00 -0700",
"bar_code": "04672323305",
"location_id": 1666,
"location_name": "LOCATION_NAME_GOES_HERE",
"redemption_code_transaction_no": "3502762395",
"redemption_id": 2188,
"redemption_type": "RedeemableRedemption",
"updated_at": "2021-08-16T15:24:48Z",
"business_uuid": "BUSINESS_UUID_GOES_HERE",
"internal_tracking_code": "8128203",
"redeemable_name": "Free Coke (R)"
},
"time": "2021-08-16T15:24:54Z",
"external_id": "EXTERNAL_ID_GOES_HERE",
"name": "redemptions"
}
]
}
When Disable sending default user attributes to Braze is set to Yes, the redemptions create/update event will send only the events data in the payload.
{
"events": [
{
"properties": {
"redemption_code_discount": 1,
"redemption_code_subtotal_amount": 10,
"redemption_status": "redeemed",
"store_number": "39450",
"created_at": "2021-08-16T15:24:48Z",
"expiring_on": "2021-08-16T19:24:48Z",
"redeemed_menu_items": [
{
"item_qty": 2,
"menu_family": "3000",
"menu_item_type": "M",
"menu_major_group": "3000",
"serial_number": "1",
"menu_item_id": "260035",
"item_amount": 10,
"item_name": "Spicy Polynesian Poke Bwl"
}
],
"redemption_code_id": 3564,
"redemption_code_receipt_amount": 10,
"redemption_code_status": "processed",
"channel": "POS",
"redeemable_id": 121,
"redeemed_points": 1,
"points_requested": 10,
"redemption_code_processed_at": "2021-08-16T15:24:48Z",
"redemption_code_receipt_datetime": "2021-07-17 02:13:00 -0700",
"bar_code": "04672323305",
"location_id": 1666,
"location_name": "LOCATION_NAME_GOES_HERE",
"redemption_code_transaction_no": "3502762395",
"redemption_id": 2188,
"redemption_type": "RedeemableRedemption",
"updated_at": "2021-08-16T15:24:48Z",
"business_uuid": "BUSINESS_UUID_GOES_HERE",
"internal_tracking_code": "8128203",
"redeemable_name": "Free Coke (R)"
},
"time": "2021-08-16T15:24:54Z",
"external_id": "EXTERNAL_ID_GOES_HERE",
"name": "redemptions"
}
]
}