Dotdigital Engagement Cloud is an omnichannel marketing solution that sends data-triggered campaigns across 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.
- Treasure Data does not create a campaign.
- A transactional email action does not count over the rate limit of API calls.
- As per the rate limit of dotdigital API (https://developer.dotdigital.com/docs/getting-started-with-the-api#restrictions), one Upload bulk contacts action requires two API calls, which count into the overall rate limit.
Log in to DotDigital. Navigate to https://login.dotdigital.com/login.aspx?ReturnUrl=/.
Navigate to https://r1-app.dotdigital.com/access/api and select the API users tab**.**

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

Click Save.
In Treasure Data, you must create and configure the data connection for export before running your query. As part of the data connection, you provide authentication to access the integration.
Open the TD Console.
Navigate to the Integrations Hub > Catalog.
Click the search icon on the far right of the Catalog screen, and enter dotdigital.
Hover over the dotdigital connector and select Create Authentication.

The New Authentication dialog opens.

Select your Region. The API User Name and API User Password fields auto-populate.
Select Continue.
Type a name for your connection.
Select Done.
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.
Open TD Console.
Navigate to Data Workbench > Queries.
Select the query that you plan to use to export data.
Run the query.
Select Export Results, located at the top of your query editor.
The Choose Integration dialog opens.
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.
| Parameter | Requirement | Description |
|---|---|---|
| Export Mode | Required | There are three 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. - Unified Contacts: Upload/Delete records as contacts to Dotdigital. An enhanced version of Bulk Contacts that enable contacts and their dependencies to be uploaded/deleted in one go. |
| Parameter | Requirement | Description |
|---|---|---|
| Campaign ID | Required | The ID of the triggered campaign. |
| JSON Personalization Columns | Optional | Commas separate the JSON column names. |
| Ignore Invalid Records | Optional | Ignore invalid records and complete the job. |
- Sample Configuration

| Parameter | Requirement | Description |
|---|---|---|
| Export Operation | Required | Export operation in bulk contacts mode - Upload (default). Upload records. - Delete. Delete contact from address book by id |
| Add to Address Book | Optional | Add to address book. |
| Address Book Identifier Mode | Optional | Address book Identifier Mode to interact with: - Id (default). - Name. Resolve id from name |
| Address Book ID | Optional | Address book ID to interact with. This parameter is required in following situations: - Export Operation is "Upload" and "Add to Address Book" is enabled - Export Operation is "Delete" |
| Create A New Address Book When Not Found | Optional | Create a new address book with the name when no address book with the provided name is found. |
| New Address Book Visibility | Optional | Address book Visibility - Private (default). - Public. |
| Address Book Name | Optional | Address book Name to interact with. This parameter is required in the following situations: - Export Operation is "Upload", and "Add to Address Book" is enabled - Export Operation is "Delete" |
| Merge Option | Optional | 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 the query result set - ignore_blank - Skip Existing Non-Empty Fields. Do not update data fields that contain values - skip_fields |
| Ignore Invalid Records | Optional | Ignore invalid records and complete the job. |
| Enable Parallel Upload | Optional | Run the job in parallel mode. |
| Thread Count | Optional | Number of threads run in parallel mode. |
- Sample Configuration


| Parameter | Requirement | Description |
|---|---|---|
| Export Operation | Required | Export operation in unified contacts mode - Upload (default). Upload records as unified contacts. - Delete. Delete contacts (hard delete) |
| Add to List (former Address Book) | Optional | Add contacts to a list. |
| List Identifier Mode | Optional | List Identifier Mode to interact with: - Id (default). - Name. Resolve id from name |
| List ID | Optional | List ID to interact with. This parameter is required in following situations: - Export Operation is "Upload" and "Add to List" is enabled - Export Operation is "Delete" |
| Create A New List When Not Found | Optional | Create a new list with the name when no list with the provided name is found. |
| New List Visibility | Optional | List Visibility - Private (default). - Public. |
| List Name | Optional | List Name to interact with. This parameter is required in the following situations: - Export Operation is "Upload", and "Add to List" is enabled - Export Operation is "Delete" |
| Merge Option | Optional | The following merge options are available: - overwrite (default). always overwrite all fields. - overwriteIfEmpty. overwrite empty fields only. - overwriteIfNotEmpty. overwrite if new values are not empty. |
| Ignore Invalid Records | Optional | Ignore invalid records and complete the job. |
- Sample Configuration
Upload Operation

Delete Operation

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 Upload Query
SELECT an_email_column AS email,
another_first_name AS firstname
another_first_name AS lastname
FROM your_table;- Bulk Contacts Delete Query
SELECT contact_id AS id FROM your_table;
- Unified Contacts Query
Upload Operation
SELECT match_identifier, contact_id, email, mobile_number, channel_properties, consent_records, firstname, lastname FROM your_table;Delete Operation
SELECT match_identifier, contact_id, email, mobile_number FROM your_table;Data Model
| Columns | Require | Data Type | Notes |
|---|---|---|---|
| match_identifier | yes | string | - Values: contactId, email, mobileNumber - Case sensitive |
| contact_id | - Require one of these identifier depends on value of match_identifier column - Leftover columns are optional. | int64 | |
| string | |||
| mobile_number | string | ||
| channel_properties | no | string in json format | |
| preferences | no | string in json format | |
| consent_records | no | string in json format | |
| any other columns | no | string | mapped to datafields |
You can use Scheduled Jobs with Result Export to periodically write the output result to a target destination that you specify.
Treasure Data's scheduler feature supports periodic query execution to achieve high availability.
When two specifications provide conflicting schedule specifications, the specification requesting to execute more often is followed while the other schedule specification is ignored.
For example, if the cron schedule is '0 0 1 * 1', then the 'day of month' specification and 'day of week' are discordant because the former specification requires it to run every first day of each month at midnight (00:00), while the latter specification requires it to run every Monday at midnight (00:00). The latter specification is followed.
Navigate to Data Workbench > Queries
Create a new query or select an existing query.
Next to Schedule, select None.

In the drop-down, select one of the following schedule options:

Drop-down Value Description Custom cron... Review Custom cron... details. @daily (midnight) Run once a day at midnight (00:00 am) in the specified time zone. @hourly (:00) Run every hour at 00 minutes. None No schedule.

| Cron Value | Description |
|---|---|
0 * * * * | Run once an hour. |
0 0 * * * | Run once a day at midnight. |
0 0 1 * * | Run once a month at midnight on the morning of the first day of the month. |
| "" | Create a job that has no scheduled run time. |
* * * * *
- - - - -
| | | | |
| | | | +----- day of week (0 - 6) (Sunday=0)
| | | +---------- month (1 - 12)
| | +--------------- day of month (1 - 31)
| +-------------------- hour (0 - 23)
+------------------------- min (0 - 59)The following named entries can be used:
- Day of Week: sun, mon, tue, wed, thu, fri, sat.
- Month: jan, feb, mar, apr, may, jun, jul, aug, sep, oct, nov, dec.
A single space is required between each field. The values for each field can be composed of:
| Field Value | Example | Example Description |
|---|---|---|
| A single value, within the limits displayed above for each field. | ||
A wildcard '*' to indicate no restriction based on the field. | '0 0 1 * *' | Configures the schedule to run at midnight (00:00) on the first day of each month. |
A range '2-5', indicating the range of accepted values for the field. | '0 0 1-10 * *' | Configures the schedule to run at midnight (00:00) on the first 10 days of each month. |
A list of comma-separated values '2,3,4,5', indicating the list of accepted values for the field. | 0 0 1,11,21 * *' | Configures the schedule to run at midnight (00:00) every 1st, 11th, and 21st day of each month. |
A periodicity indicator '*/5' to express how often based on the field's valid range of values a schedule is allowed to run. | '30 */2 1 * *' | Configures the schedule to run on the 1st of every month, every 2 hours starting at 00:30. '0 0 */5 * *' configures the schedule to run at midnight (00:00) every 5 days starting on the 5th of each month. |
A comma-separated list of any of the above except the '*' wildcard is also supported '2,*/5,8-10'. | '0 0 5,*/10,25 * *' | Configures the schedule to run at midnight (00:00) every 5th, 10th, 20th, and 25th day of each month. |
- (Optional) You can delay the start time of a query by enabling the Delay execution.
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 the specified destination.
Scheduled jobs that continuously fail due to configuration errors may be disabled on the system side after several notifications.
(Optional) You can delay the start time of a query by enabling the Delay execution.
You can also send segment data to the target platform by creating an activation in the Audience Studio.
- Navigate to Audience Studio.
- Select a parent segment.
- Open the target segment, right-mouse click, and then select Create Activation.
- In the Details panel, enter an Activation name and configure the activation according to the previous section on Configuration Parameters.
- Customize the activation output in the Output Mapping panel.

- Attribute Columns
- Select Export All Columns to export all columns without making any changes.
- Select + Add Columns to add specific columns for the export. The Output Column Name pre-populates with the same Source column name. You can update the Output Column Name. Continue to select + Add Columnsto add new columns for your activation output.
- String Builder
- + Add string to create strings for export. Select from the following values:
- String: Choose any value; use text to create a custom value.
- Timestamp: The date and time of the export.
- Segment Id: The segment ID number.
- Segment Name: The segment name.
- Audience Id: The parent segment number.
- + Add string to create strings for export. Select from the following values:
- Set a Schedule.

- Select the values to define your schedule and optionally include email notifications.
- Select Create.
If you need to create an activation for a batch journey, review Creating a Batch Journey Activation.
For Dotdigital, Audience Studio supports fetching IDs of Address Books, user can select a Address Book from the list. Only when the fetch is not success, manual typing is expected.

timezone: UTC
_export:
td:
database: sample_datasets
+export_to_dotdigital:
td>: queries/sample.sql
result_connection: my_dotdigital_output
result_settings:
campaign_id: 119178
mode: transactional_email
ignore_invalid_records: true
json_columns: ORDER, ITEMStimezone: UTC
_export:
td:
database: sample_datasets
+export_to_dotdigital:
td>: queries/sample.sql
result_connection: my_dotdigital_output
result_settings:
campaign_id: 119178
mode: bulk_contacts
ignore_invalid_records: true
merge_option: update_all
add_to_address_book: true
address_book_id: 119178
export_operation: upload
address_book_name: "address_book_name"
address_book_identifier_mode: name
create_when_not_found: true
new_address_book_visibility: privatetimezone: UTC
_export:
td:
database: sample_datasets
+export_to_dotdigital:
td>: queries/sample.sql
result_connection: my_dotdigital_output
result_settings:
campaign_id: 119178
mode: bulk_contacts
ignore_invalid_records: true
address_book_id_delete: 119178
export_operation: delete
address_book_name_delete: "address_book_name"
address_book_identifier_mode_delete: nametimezone: UTC
_export:
td:
database: sample_datasets
+export_to_dotdigital:
td>: queries/sample.sql
result_connection: my_dotdigital_output
result_settings:
mode: unified_contacts
ignore_invalid_records: true
unified_cts_export_operation: upload
unified_cts_merge_option: overwrite
unified_cts_add_to_list: true
unified_cts_list_identifier_mode: id
unified_cts_list_id: 119178timezone: UTC
_export:
td:
database: sample_datasets
+export_to_dotdigital:
td>: queries/sample.sql
result_connection: my_dotdigital_output
result_settings:
mode: unified_contacts
ignore_invalid_records: true
unified_cts_export_operation: deleteFor more information on using integrations in a workflow to export data, see Using Workflows to Export Data with TD Toolbelt.