Open Loyalty to Braze
Syncing Open Loyalty Webhooks to Braze
Inbound webhooks: Open Loyalty → Braze
Send Open Loyalty webhook events to Braze. Use a Braze Data Transformation to convert the payload into a Braze API call.
This works for any Open Loyalty event. Examples: points changes, tier changes, campaign effects, reward redemptions.
Pick your delivery model in Braze
Custom event-based campaigns Best when you want Braze to record an event. You trigger Action-Based campaigns via Perform Custom Event.
API-triggered campaigns Best when one Open Loyalty event should send one specific campaign. Braze does not need to store a custom event. The transformation calls Braze “Send Campaigns via API-Triggered Delivery”.
Custom event-based campaigns
Create the Braze Data Transformation
In Braze, go to Data Settings > Data Transformation.
Click Create transformation.
Set Transformation name (example:
Open Loyalty Webhooks → Custom Events).Set Select destination to POST: Track users.
Click Create Transformation.
Copy the Webhook URL.
Treat the webhook URL like a secret. Anyone with it can send data into your Braze workspace.
Create the Open Loyalty webhook subscription
In Open Loyalty Admin Panel, go to General > Webhooks.
Click Add new webhook.
Configure:
Event Name: Pick the Open Loyalty event you want to forward. Example:
AvailablePointsAmountChanged,CustomerLevelChanged,CampaignEffectWasApplied.URL: Paste the Braze webhook URL.
Headers:
Content-Type: application/jsonUser-Agent: partner-OpenLoyalty
Save.
Map Open Loyalty → Braze custom event (users/track)
In Braze, open your transformation.
Trigger the Open Loyalty event once to capture a sample payload.
In Transformation code, map the payload to a Braze event.
// Open Loyalty webhook body is available as `payload`
const data = payload.data;
return {
events: [
{
// Must match a user identifier in Braze
external_id: data.customer.loyaltyCardNumber,
// This is the custom event name visible in Braze
name: "Loyalty Event Triggered",
time: new Date().toISOString(),
// These become `event_properties` in Braze
properties: {
event_type: payload.type,
event_time: payload.createdAt,
// Example fields (adjust per event type)
new_balance: data.amount,
change_amount: data.amountChange
}
}
]
};Click Validate.
Click Activate.
Create an Action-Based campaign triggered by the custom event
Create a campaign (Email, Push, SMS).
Under Schedule Delivery, pick Action-Based.
Add trigger Perform Custom Event.
Select the event name from the transformation. Example:
Loyalty Event Triggered.Use Liquid to access event properties:
{{event_properties.${new_balance}}}{{event_properties.${change_amount}}}
Create API-triggered Campaigns
Create the Braze Data Transformation (webhook URL)
In Braze, go to Data Settings > Data Transformation.
Click Create transformation.
Set Transformation name (example:
Open Loyalty Webhooks → API Trigger).Set Select destination to POST: Send Campaigns via API-Triggered Delivery.
Click Create Transformation.
Copy the Webhook URL.
Map Open Loyalty → Braze API-triggered send
In Braze, open your transformation.
Trigger the Open Loyalty event once to capture a sample payload.
In Transformation code, build the API-trigger request.
const data = payload.data;
return {
// Paste your Braze Campaign ID here
campaign_id: "YOUR_CAMPAIGN_ID",
recipients: [
{
// Must match a user identifier in Braze
external_user_id: data.customer.customerId || data.customer.loyaltyCardNumber,
// Available in messages as `api_trigger_properties`
trigger_properties: {
event_type: payload.type,
event_time: payload.createdAt,
// Example fields (adjust per event type)
new_balance: data.amount,
change_amount: data.amountChange
},
// Optional: update profile attributes before sending the campaign
attributes: {
loyalty_card_number: data.customer.loyaltyCardNumber
},
// Keep `true` if you only want to message users who already exist in Braze
send_to_existing_only: true
}
]
};Click Validate.
Click Activate.
Last updated
Was this helpful?

