Updating Talon.One audiences via Braze
After you create an audience in Talon.One, you can add or update its members directly from Braze. To do this, create a webhook, calling the Update multiple customer profiles' audiences endpoint.
To create a webhook in Braze, you can use the Canvas feature, a workspace that allows you to set up multistep user journeys.
Prerequisites
- You are an Admin user in Talon.One and Braze.
- You have created a
generic API key
and copied it for later use.
note
You cannot use a Braze-specific API key with the endpoint.
- You have created an audience in Talon.One.
Creating a webhook in Braze
In Braze, you can create a webhook as a webhook campaign, API campaign, or Canvas component. Let's create the webhook as a Canvas component.
To create a webhook that updates a Talon.One audience:
-
In Braze, create a new Canvas using the Canvas Flow editor.
-
When you create a message, select Webhook with a blank template as the messaging channel.
-
In Webhook URL, enter
https://YOUR_SUBDOMAIN.talon.one/v2/customer_audiences
, whereYOUR_SUBDOMAIN
is your Talon.One subdomain name. -
In Request Body, select Raw Text and add the following text, where:
YOUR_AUDIENCE_ID
is the ID of the audience to update.
tipYour audience ID is displayed on the Audience page of the Campaign Manager.
YOUR_AUDIENCE_ACTION
isadd
ordelete
to add or remove audience members.
{
"data": [
{
"audienceId": YOUR_AUDIENCE_ID,
"profileIntegrationId": "{{${user_id}}}",
"action": "YOUR_AUDIENCE_ACTION"
}
]
} -
Click the Settings tab.
-
In Request Headers, click Add New Pair and enter
Authorization
:ApiKey-v1 YOUR_API_KEY
, whereYOUR_API_KEY
is the API key you created. -
In HTTP Method, select POST.
-
Click the Test tab, select an existing user, and click Send Test.
The endpoint returns204 No Content
, and your audience in Talon.One is updated accordingly. -
Click Done.