The Braze platform provides insight into new growth opportunities and brand interactions that can help you build transformative campaigns and take strategic actions. Treasure Data supports the Braze platform by allowing you to write job results from Treasure Data directly to Braze. 

 What can you do with this Integration?


Prerequisites

Obtain Rest API Key in Braze

  1. Go to Braze dashboard and enter the development console.
  2. Go to the API setting tab and create a new Rest API key.

Use the TD Console to Create Your Connection

Create a New Connection

In Treasure Data, you must create and configure the data connection before running your query. As part of the data connection, you provide authentication to access the integration.

  1. Open TD Console.

  2. Navigate to Integrations Hub Catalog.

  3. Search for and select Braze.

  4. Type the credentials to authenticate.

  5. Type a name for your connection.

  6. Select Done.

Define your Query



Integration Parameters for Braze

The export results parameters are described in the table following the image.

ParameterValuesDescription
modeuser_new_alias,
user_identifying,
user_track,
user_delete
Connector mode
track_record_typecustom_events,
purchases,
user_profile_attributes
Record type for user_track mode
pre_formated_fieldsStringUse for array or JSON columns to keep the format.
skip_on_invalid_recordsBooleanIf enabled, continue and ignore the fail records for the JSON column.
Otherwise, the job stops.

Example Query

SELECT external_id, alias_name, alias_label FROM table create_user_alias


ModeTrack Record TypeColumns
user_new_alias

Supported columns:

  • external_id
  • alias_name
  • alias_label

Other columns are ignored.

user_identifying

Supported columns:

  • external_id
  • alias_name
  • alias_label

Other columns are ignored

user_trackcustom_events

Required columns:

  • external_id or (alias_name, and alias_label) or braze_id
  • name, time

Other aliases are sent as is

user_trackpurchases

Required columns:

  • external_id or (alias_name, and alias_label) or braze_id
  • product_id, currency, price, time

Other aliases are sent as is

user_trackuser_profile_attributes

Required columns:

  • external_id or (alias_name, and alias_label) or braze_id

Other aliases are sent as is

user_delete

Required columns:

  • external_id or (alias_name, and alias_label) or braze_id

Optionally Schedule the Query Export Jobs

You can use Scheduled Jobs with Result Export to periodically write the output result to a target destination that you specify.


Optionally Configure Export Results in Workflow

Within Treasure Workflow, you can specify the use of this data connector to export data.

Learn more at Using Workflows to Export Data with the TD Toolbelt.

Example Workflow


_export:
  td:
  database: td.database

+braze_export_task:
  td>: export_braze.sql
  database: ${td.database}
  result_connection: braze
  result_settings:
    type: braze
    mode: user_track
    track_record_type: custom_events
    pre_formatted_fields: array,json
    skip_on_invalid_records: false