Treasure Data cohort import
This article describes how to import user cohorts from Treasure Data to Braze so you can send targeted campaigns based on data that may only exist in your warehouse.
This feature is currently in Beta. For more information, contact your Treasure Data and Braze representatives.
Prerequisites
Requirement | Description |
---|---|
Treasure Data account | A Treasure Data account is required to take advantage of this partnership. |
Braze Data Import key | This can be captured in the Braze dashboard from Partner Integrations > Technology Partners and then select Heap. |
Braze REST endpoint | Your REST endpoint URL. Your endpoint will depend on the Braze URL for your instance. |
Static IP Address of Treasure Data | The static IP address of Treasure Data is the access point and source of the linkage for this Integration. To determine the static IP address, contact your Treasure Data Customer Success representative or Treasure Data Technical support. |
Data import integration
Step 1: Get your Braze data import key
In Braze, navigate to Partner Integrations > Technology Partners and select Treasure Data. Here, you will find your REST endpoint and generate your Braze data import key. After the key is generated, you can create a new key or invalidate an existing one.
Step 2: Create a data connection
Before you create your data connection within Treasure Data, you’ll need to authenticate. First, select Integrations Hub, then Catalog.
Search for the Braze Integration in the Catalog, then hover over the icon and select Create Authentication. Enter your credentials, name your authentication, then select Done.
Step 3: Define your query
Query columns must be specified with the exact column names and data type. The query columns must include at least one of the columns: user_ids
, device_ids
, or braze alias column match with configuration on the UI. Only user profiles that exist within Braze will be added to a cohort. Cohort Import will not create new user profiles.
- Navigate to Data Workbench > Queries.
- Select New Query.
- Run the query to validate the result set.
Use case: Syncing cohorts by identifier
Here’s an example table in Treasure Data:
external_id | device_ids | |
---|---|---|
TDCohort1 |
[email protected] |
1a2b3c |
TDCohort2 |
[email protected] |
4d5f6g |
TDCohort3 |
[email protected] |
7h8j9k |
TDCohort4 |
[email protected] |
1ab2cd |
The column name must be user_ids
or the sync will fail.
To sync cohorts using the external ID, run the following query:
1
2
3
4
SELECT
external_id as user_ids
FROM
example_cohort_table
After running the query, these user aliases will be added to the cohort in Braze:
TDCohort1
TDCohort2
TDCohort3
TDCohort4
Here’s an example table in Treasure Data:
external_id | device_ids | |
---|---|---|
TDCohort1 |
[email protected] |
1a2b3c |
TDCohort2 |
[email protected] |
4d5f6g |
TDCohort3 |
[email protected] |
7h8j9k |
TDCohort4 |
[email protected] |
1ab2cd |
To sync cohorts using the user alias, run the following query:
1
2
3
4
SELECT
email
FROM
example_cohort_table
After running the query, these user aliases will be added to the cohort in Braze:
"alias_label":"email", "alias_name":"[email protected]"
"alias_label":"email", "alias_name":"[email protected]"
"alias_label":"email", "alias_name":"[email protected]"
"alias_label":"email", "alias_name":"[email protected]"
Here’s an example table in Treasure Data:
external_id | device_ids | |
---|---|---|
TDCohort1 |
[email protected] |
1a2b3c |
TDCohort2 |
[email protected] |
4d5f6g |
TDCohort3 |
[email protected] |
7h8j9k |
TDCohort4 |
[email protected] |
1ab2cd |
The column name must be device_ids
or the sync will fail.
To sync cohorts using the device ID, run the following query:
1
2
3
4
SELECT
device_ids
FROM
example_cohort_table
After running the query, these device IDs will be added to the cohort in Braze:
1a2b3c
4d5f6g
7h8j9k
1ab2cd
Step 4: Specify the result export target
Once the query has been built, select Export Results. You can select an existing authentication, such as the one created in the last steps, or create a new authentication to be used for output.
Follow Treasure Data’s steps for configuring your export to meet your use case.
Step 5: Execute the query
Save the query with a name and run, or just run the query. Upon successful completion of the query, the query result is automatically exported to Braze.
Step 6: Create a Braze segment from the Treasure Data Export
In Braze, navigate to Segments, create a new segment, and select Treasure Data Cohorts as your filter. From here, you can choose which Treasure Data cohort you wish to include. After your Treasure Data cohort segment is created, you can select it as an audience filter when creating a campaign or Canvas.