Incremental Activation is a Beta release. For more information, contact your Customer Success Representative.
This guide walks you through setting up Incremental Activation for your segments. You'll create a user-defined workflow that processes delta changes and configure it to work with your destination platform.
Configuring Incremental Activation involves three main steps:
- Navigate to TD Data Workbench > Workflows.
- Click New User-Defined Workflow.
- Provide a Workflow Name (for example,
incremental_activation_meta). - Select Blank from the Workflow Template options.
- Click New Workflow to create it.
- In the Project Editor, copy and paste the following workflow template:
timezone: "UTC"
_export:
params:
api_endpoint: "https://integrations-gateway.us01.treasuredata.com"
id_key: "contact_id"
delta_keys: ["job_title", "status"]
activation_mappings: [
{
"delta_status": "new",
"connector_field": "mode",
"connector_field_value": "append"
}
]
# Fetch and execute incremental activation workflow
+fetch_incremental_activation_wf:
http_call>: "${params.api_endpoint}/integration_workflow/workflows/incremental_activation/fetch"
method: POST
headers:
- Authorization: ${secret:td.apikey}
- Content-Type: "application/json"
content_type_override: application/x-yaml
content: |
{
"database": "${activation_actions_db}",
"source_table": "${activation_actions_table}",
"id_key": "${params.id_key}",
"delta_keys": ${JSON.stringify(params.delta_keys)},
"activation_mappings": ${JSON.stringify(params.activation_mappings)},
"result_connection_settings": ${result_connection_settings},
"result_connection_name": "${result_connection_name}"
}
retry: true- Click Save to save the workflow.
Modify the params block in the workflow template to match your data source and destination platform requirements.
Set the api_endpoint parameter to match your TD site:
| TD Site | API Endpoint |
|---|---|
| US | https://integrations-gateway.us01.treasuredata.com |
| EU | https://integrations-gateway.eu01.treasuredata.com |
| AP | https://integrations-gateway.ap02.treasuredata.com |
| JP | https://integrations-gateway.treasuredata.co.jp |
The id_key parameter specifies the unique identifier column in your source table. This column's data must be unique across all profiles.
Examples:
mobile_ad_id(IDFA, MAID)emailphone_numbertd_customer_id
Duplicate values in the id_key column will cause errors in delta calculation. Ensure this column contains only unique values.
Example Configuration:
id_key: "email"The delta_keys parameter is an array of column names to check for changes in the source table. These columns determine whether a profile is marked as "updated" or "unchanged."
Examples:
["job_title", "organization"]["subscription_status", "tier_level"]["city", "country", "postal_code"]
If left empty or not specified, it defaults to the value of id_key.
Example Configuration:
delta_keys: ["job_title", "subscription_status", "city"]The activation_mappings parameter defines how different types of delta records are sent to your destination. Each mapping connects a delta status to a connector configuration.
For detailed information about configuring mappings, see Incremental Activation Mappings.
Example Configuration for Snowflake:
activation_mappings: [
{
"delta_status": "new",
"connector_field": "mode",
"connector_field_value": "insert"
},
{
"delta_status": "updated",
"connector_field": "mode",
"connector_field_value": "merge"
}
]Example Configuration for Salesforce B2C Commerce Cloud (Full Sync):
activation_mappings: [
{
"delta_status": "new",
"connector_field": "mode",
"connector_field_value": "append"
},
{
"delta_status": "updated",
"connector_field": "mode",
"connector_field_value": "replace"
}
]When running the workflow as a standalone (not as an Activation Action), you must also specify:
activation_actions_db: Source TD database nameactivation_actions_table: Source table name containing the data to processresult_connection_settings: Result connector configuration objectresult_connection_name: Connector authentication name
Example Standalone Configuration:
_export:
params:
api_endpoint: "https://integrations-gateway.us01.treasuredata.com"
id_key: "email"
delta_keys: ["status", "tier"]
activation_mappings: [
{
"delta_status": "new",
"connector_field": "mode",
"connector_field_value": "append"
}
]
activation_actions_db: "my_customer_database"
activation_actions_table: "customer_profiles"
result_connection_name: "my_snowflake_connection"
result_connection_settings:
type: "snowflake"
database: "MARKETING_DB"
schema: "PUBLIC"
table: "CUSTOMER_SEGMENTS"
mode: "append"When running as an Activation Action within Audience Studio, the activation_actions_db, activation_actions_table, result_connection_settings, and result_connection_name parameters are automatically populated. You only need to configure api_endpoint, id_key, delta_keys, and activation_mappings.
After configuring the workflow, you can use it in two ways:
Use the workflow within Audience Studio to activate segment deltas automatically:
- Navigate to Audience Studio > Segments.
- Open the segment you want to activate.
- Select Activations > Create activation.
- In the Details tab, enable Enable Activation Actions.
- Select your authentication and provide an activation name.
- In the Actions tab, select the workflow you created.
- Complete the activation setup and save.
When the activation runs, only delta records (based on your configuration) will be sent to the destination.
For more details, see Configure Activation Actions.
Run the workflow on a schedule to export delta changes from any TD table:
- Ensure all required parameters are configured (including
activation_actions_db,activation_actions_table,result_connection_settings, andresult_connection_name). - Navigate to TD Data Workbench > Workflows.
- Open your Incremental Activation workflow.
- Click Run or configure a schedule.
The workflow will compare the current table data with the previous run and export only the changes.
Avoid Concurrent Workflow Runs: The table used by the Incremental Activation workflow is not locked during operation. Do not schedule multiple workflows to run concurrently on the same source table, as this can cause state conflicts and produce inconsistent delta calculations. Ensure only one workflow processes a given table at any time.
To use the workflow as an Activation Action, ensure proper permissions are set:
- Navigate to Control Panel > Security > Policies.
- Configure workflow permissions to grant View and Run access to users who will create activations.
For details, see Configuring Workflow Permissions.
After creating your workflow:
- Test with a small dataset: Run the workflow on a test segment before using it in production.
- Check the first run: The initial run will export all data (full export) to establish the baseline.
- Verify subsequent runs: Subsequent runs should export only delta changes.
- Monitor activation logs: Review activation results to confirm the correct number of profiles are being sent.
- Incremental Activation Mappings
- Incremental Activation Parameters
- Troubleshooting Incremental Activation