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 created a
generic API key
and copied it for later use.note
You cannot use a Braze-specific API key with the endpoint.
- You 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:
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, type the URL of the endpoint.
For example:
https://<your-base-url>.talon.one/v2/customer_audiences
.In Request Body, enter all the required parameters of the endpoint:
action
:"add"
to add members to the audience, or"delete"
to remove members.profileIntegrationId
: Use personalization in the editor to add a Braze user ID, for example,"{{${user_id}}}"
.audienceId
: Type the ID of the audience to update, for example,608
.tipYour audience ID is displayed on the Audience page of the Campaign Manager.
In Request Headers, enter:
Authorization
:ApiKey-v1 <generic API key>
, where<generic API key>
is the generic API key you created and copied.- HTTP Method:
POST
Review the request preview to ensure it resembles the following example:
POST https://mycompany.europe-west1.talon.one/v2/customer_audiences
authorization: ApiKey-v1 9ebd8ab6dbf7ac52a10b0fd3aaff59f1d351c616baca200e0fd44108ea207b7b
{
"data": [
{
"audienceId": 608,
"profileIntegrationId": "{{${user_id}}}",
"action": "add"
}
]
}noteIf the editor does not automatically add the
data
object, enter it manually as raw text.Test-send the message by selecting a user.
Your audience in Talon.One is updated accordingly.