Skip to content
Last updated

Configure Incremental Activation

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.

Overview

Configuring Incremental Activation involves three main steps:

  1. Create User-Defined Workflow
  2. Configure Required Parameters
  3. Use the Workflow

Create User-Defined Workflow

  1. Navigate to TD Data Workbench > Workflows.
  2. Click New User-Defined Workflow.
  3. Provide a Workflow Name (for example, incremental_activation_meta).
  4. Select Blank from the Workflow Template options.
  5. Click New Workflow to create it.
  6. 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
  1. Click Save to save the workflow.

Configure Required Parameters

Modify the params block in the workflow template to match your data source and destination platform requirements.

API Endpoint

Set the api_endpoint parameter to match your TD site:

TD SiteAPI Endpoint
UShttps://integrations-gateway.us01.treasuredata.com
EUhttps://integrations-gateway.eu01.treasuredata.com
APhttps://integrations-gateway.ap02.treasuredata.com
JPhttps://integrations-gateway.treasuredata.co.jp

ID Key

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)
  • email
  • phone_number
  • td_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"

Delta Keys

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"]

Activation Mappings

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"
  }
]

Additional Parameters (Standalone Mode Only)

When running the workflow as a standalone (not as an Activation Action), you must also specify:

  • activation_actions_db: Source TD database name
  • activation_actions_table: Source table name containing the data to process
  • result_connection_settings: Result connector configuration object
  • result_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.

Use the Workflow

After configuring the workflow, you can use it in two ways:

Use the workflow within Audience Studio to activate segment deltas automatically:

  1. Navigate to Audience Studio > Segments.
  2. Open the segment you want to activate.
  3. Select Activations > Create activation.
  4. In the Details tab, enable Enable Activation Actions.
  5. Select your authentication and provide an activation name.
  6. In the Actions tab, select the workflow you created.
  7. 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.

As a Standalone Workflow

Run the workflow on a schedule to export delta changes from any TD table:

  1. Ensure all required parameters are configured (including activation_actions_db, activation_actions_table, result_connection_settings, and result_connection_name).
  2. Navigate to TD Data Workbench > Workflows.
  3. Open your Incremental Activation workflow.
  4. 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.

Set Workflow Permissions

To use the workflow as an Activation Action, ensure proper permissions are set:

  1. Navigate to Control Panel > Security > Policies.
  2. Configure workflow permissions to grant View and Run access to users who will create activations.

For details, see Configuring Workflow Permissions.

Verify Configuration

After creating your workflow:

  1. Test with a small dataset: Run the workflow on a test segment before using it in production.
  2. Check the first run: The initial run will export all data (full export) to establish the baseline.
  3. Verify subsequent runs: Subsequent runs should export only delta changes.
  4. Monitor activation logs: Review activation results to confirm the correct number of profiles are being sent.

Next Steps