Skip to main content

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 multi-step user journeys.

Prerequisites

Setting up the integration

1

Create an API key in Talon.One

In the Campaign Manager, create a generic Integration API key:

note

You cannot use a Braze-specific API key with the endpoint used in this tutorial.

  1. In your Application, click Settings > Integration API Keys.

  2. Click Create API Key.

  3. In the Create API Key drawer, if you are asked for a key type, select Production.

  4. In Key name, type a name to identify the key.

  5. In Key expiration date, select a date.

  6. In Third-party integration, select No.

  7. Click Create API Key.

  8. Click to copy the key for use.

  9. note

    You cannot view or copy the API key after closing the drawer. If you lose it, create another API key.

We will use the API key in the Braze webhook.

2

Create 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:

  1. In Braze, create a new Canvas using the Canvas Flow editor.

  2. When you create a message, select Webhook with a blank template as the messaging channel.

  3. In Webhook URL, enter https://YOUR_DEPLOYMENT_URL/v2/customer_audiences, where YOUR_DEPLOYMENT_URL is the base URL of your Talon.One deployment, for example, mycompany.europe-west1.talon.one.

  4. In Request Body, select Raw Text and add the following text, where:

    • YOUR_AUDIENCE_ID is the ID of the audience to update.

      tip

      Your audience ID is displayed on the Audience page of the Campaign Manager.

    • YOUR_AUDIENCE_ACTION is add or delete to add or remove audience members.

      {
      "data": [
      {
      "audienceId": YOUR_AUDIENCE_ID,
      "profileIntegrationId": "{{${user_id}}}",
      "action": "YOUR_AUDIENCE_ACTION"
      }
      ]
      }
  5. Click the Settings tab.

  6. In Request Headers, click Add New Pair and enter Authorization: ApiKey-v1 YOUR_API_KEY, where YOUR_API_KEY is the API key you created.

  7. In HTTP Method, select POST.

  8. Click the Test tab, select an existing user, and click Send Test.
    The endpoint returns 204 No Content, and your audience in Talon.One is updated accordingly.

  9. Click Done.