vDotdigital Engagement Cloud is an omnichannel marketing solution designed to send data-triggered campaigns across channels including email, SMS, social media, push notifications, and more. You can write job results from Treasure Data directly to Dotdigital. 


  • Basic knowledge of Treasure Data, including the TD Toolbelt.

  • An account in Dotdigital.  

  • An API account in Dotdigital.


Obtain Your API account

  1. Log in to DotDigital. Navigate to https://login.dotdigital.com/login.aspx?ReturnUrl=/.

  2. Navigate to https://r1-app.dotdigital.com/access/api and go to tab: API users

  3. Select New user. DotDigital provides you with an email address. Complete the form by adding and confirming a password, a description is optional.

  4. Click Save.

Create a New Connection with TD Console

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

  1. Open the TD Console.

  2. Navigate to the Integrations Hub > Catalog.

  3. Click the search icon on the far-right of the Catalog screen, and enter dotdigital.
  4. Hover over the dotdigital connector and select Create Authentication.
  5. The New Authentication dialog opens.

  6. Select your Region. The API User Name and API User Password fields auto-populate.

  7. Select Continue.

  8. Enter a name for your connection.

  9. Select Done. 

Configure Export Results in Your Data Connection

Next, you need to create or reuse a query. In the query, you configure the data connection. You might need to define the column mapping in the query.

Configure the Connection by Specifying the Parameters

  1. Open the TD Console.

  2. Navigate to Data Workbench > Queries.

  3. Select the query that you plan to use to export data.

  4. Run the query.

  5. Select Export Results located at top of your query editor. 
    The Choose Integration dialog opens.

  6. You have two options when selecting a connection to use to export the results:

  • Use an existing connection:

    • Type the connection name in the search box to filter.

    • Select your connection.

  • Create a new Dotdigital connection

    • Complete the field values to create a new connection.

Type the required credentials for your new dotdigital connection. Set the following parameters.




Export Mode


There are two different ways to move data:

  • Transactional Email (default). Trigger send emails for the triggered campaign in Dotdigital: send one email for each record.

  • Bulk Contacts: Upload records as contacts to Dotdigital.

Campaign ID


The ID of the triggered campaign.

JSON Personalization Columns


The JSON columns names, separated by commas.

Ignore Invalid Records


Ignore invalid records and complete the job.

Address Book ID


Address book ID to add contacts.

Add to Address Book


Add to address book.

Merge Option


The following merge options are available:

  • None (default). Do not merge.

  • Update All. Update all data fields - update_all

  • Ignore Blank. Ignores the blank values in query result set - ignore_blank

  • Skip Existing Non-Empty Fields. Do not update data fields that contain values - skip_fields

Sample Configuration

Example of a Query to Populate Dotdigital

From Treasure Data, run the following query, and export results into a connection for Dotdigital. Transactional emails use case-sensitive column names while bulk contacts use case-insensitive column names.

Transactional Emails Query

SELECT an_email_column AS email,
another_first_name AS FIRSTNAME
another_first_name AS LASTNAME
FROM your_table;

Bulk Contacts Query

SELECT an_email_column AS email,
another_first_name AS firstname
another_first_name AS lastname
FROM your_table;

Optional: Use of Scheduled Jobs for Export

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

Optional: Configure Export Results in Workflow

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

Example Workflow Exporting Transactional Email

timezone: UTC

    database: sample_datasets

  td>: queries/sample.sql
  result_connection: my_dotdigital_output
    campaign_id: 119178
    mode: transactional_email
    ignore_invalid_records: true
    json_columns: ORDER, ITEMS

Example Workflow Exporting Bulk Contacts

timezone: UTC

    database: sample_datasets

  td>: queries/sample.sql
  result_connection: my_dotdigital_output
    campaign_id: 119178
    mode: bulk_contacts
    ignore_invalid_records: true
    merge_option: update_all
    add_to_address_book: true
    address_book_id: 119178

For more information on using data connectors in a workflow to export data, see Using Workflows to Export Data with TD Toolbelt.

  • No labels