# Incremental Activation Workflow Templates

Incremental Activation is a Beta release. For more information, contact your Customer Success Representative.

This page provides ready-to-use workflow templates for common Incremental Activation scenarios. You can copy and paste these templates directly into your workflow editor and modify the parameters to suit your needs.

## Table of Contents

- [Basic Template - Add New Profiles Only](#basic-template---add-new-profiles-only)
- [Snowflake - Add New and Updated Profiles](#snowflake---add-new-and-updated-profiles)
- [Snowflake - Full Sync (Add, Update, Remove)](#snowflake---full-sync-add-update-remove)
- [Braze - Add New Profiles Only](#braze---add-new-profiles-only)
- [Google Ads - Add New and Updated Profiles](#google-ads---add-new-and-updated-profiles)
- [Meta Custom Audiences - Full Sync](#meta-custom-audiences---full-sync)
- [Salesforce Marketing Cloud - Replace Mode](#salesforce-marketing-cloud---replace-mode)


## Basic Template - Add New Profiles Only

This is the simplest configuration that sends only new profiles to your destination.

**Use case**: Building cumulative audiences without re-sending existing profiles.


```yaml
timezone: "UTC"
_export:
  params:
    # Change this to match your TD site
    api_endpoint: "https://integrations-gateway.us01.treasuredata.com"

    # Set your unique identifier column
    id_key: "email"

    # Columns to check for changes (defaults to id_key if empty)
    delta_keys: []

    # Only send new profiles
    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
```

## Snowflake - Add New and Updated Profiles

Send both new profiles and profiles with updated attributes to Snowflake.

**Use case**: Keep a Snowflake table synchronized with segment changes, including attribute updates.


```yaml
timezone: "UTC"
_export:
  params:
    # API endpoint for US region
    api_endpoint: "https://integrations-gateway.us01.treasuredata.com"

    # Unique identifier
    id_key: "td_customer_id"

    # Track changes in these columns
    delta_keys: ["email", "subscription_status", "loyalty_tier"]

    # Send new and updated profiles
    activation_mappings: [
      {
        "delta_status": "new",
        "connector_field": "mode",
        "connector_field_value": "append"
      },
      {
        "delta_status": "updated",
        "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
```

## Snowflake - Full Sync (Add, Update, Remove)

Keep Snowflake perfectly synchronized by adding new profiles, updating changed profiles, and removing deleted profiles.

**Use case**: Maintain an exact replica of your segment in Snowflake, including removals for GDPR compliance.


```yaml
timezone: "UTC"
_export:
  params:
    # API endpoint for US region
    api_endpoint: "https://integrations-gateway.us01.treasuredata.com"

    # Unique identifier
    id_key: "email"

    # Track changes in these columns
    delta_keys: ["first_name", "last_name", "city", "country", "subscription_tier"]

    # Full synchronization: add, update, and delete
    activation_mappings: [
      {
        "delta_status": "new",
        "connector_field": "mode",
        "connector_field_value": "append"
      },
      {
        "delta_status": "updated",
        "connector_field": "mode",
        "connector_field_value": "append"
      },
      {
        "delta_status": "deleted",
        "connector_field": "mode",
        "connector_field_value": "delete"
      }
    ]

# 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
```

## Braze - Add New Profiles Only

Send only new users to Braze to minimize data point consumption.

**Use case**: Reduce Braze data point costs by avoiding re-sends of existing profiles.


```yaml
timezone: "UTC"
_export:
  params:
    # API endpoint for US region
    api_endpoint: "https://integrations-gateway.us01.treasuredata.com"

    # Braze external_id as unique identifier
    id_key: "external_id"

    # Only check for new profiles (don't track attribute changes)
    delta_keys: []

    # Append new profiles only
    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
```

## Google Ads - Add New and Updated Profiles

Update Google Ads customer lists with new and changed profiles.

**Use case**: Keep Google Ads audiences fresh with new prospects and updated contact information.


```yaml
timezone: "UTC"
_export:
  params:
    # API endpoint for US region
    api_endpoint: "https://integrations-gateway.us01.treasuredata.com"

    # Email as unique identifier (will be hashed by connector)
    id_key: "email"

    # Track email and phone changes
    delta_keys: ["email", "phone_number"]

    # Send new and updated profiles
    activation_mappings: [
      {
        "delta_status": "new",
        "connector_field": "mode",
        "connector_field_value": "append"
      },
      {
        "delta_status": "updated",
        "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
```

## Meta Custom Audiences - Full Sync

Keep Meta Custom Audiences perfectly synchronized by adding new users and removing those who no longer qualify.

**Use case**: Maintain accurate audience lists for Facebook/Instagram advertising with automatic removals.


```yaml
timezone: "UTC"
_export:
  params:
    # API endpoint for US region
    api_endpoint: "https://integrations-gateway.us01.treasuredata.com"

    # Email as unique identifier
    id_key: "email"

    # Track changes in these attributes
    delta_keys: ["email", "phone_number", "country"]

    # Add new/updated profiles and remove deleted ones
    # Note: Check if your Meta connector uses "action" or "mode"
    activation_mappings: [
      {
        "delta_status": "new",
        "connector_field": "action",
        "connector_field_value": "add"
      },
      {
        "delta_status": "updated",
        "connector_field": "action",
        "connector_field_value": "add"
      },
      {
        "delta_status": "deleted",
        "connector_field": "action",
        "connector_field_value": "remove"
      }
    ]

# 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
```

## Salesforce Marketing Cloud - Replace Mode

Replace the entire list in Salesforce Marketing Cloud with the current segment, ensuring precision targeting.

**Use case**: When you need an exact match between your segment and SFMC data extension.


```yaml
timezone: "UTC"
_export:
  params:
    # API endpoint for US region
    api_endpoint: "https://integrations-gateway.us01.treasuredata.com"

    # Subscriber Key as unique identifier
    id_key: "subscriber_key"

    # Track changes in subscription attributes
    delta_keys: ["email", "subscription_status", "preference_center"]

    # Replace mode: clear and reload with current data
    activation_mappings: [
      {
        "delta_status": "new",
        "connector_field": "mode",
        "connector_field_value": "replace"
      },
      {
        "delta_status": "updated",
        "connector_field": "mode",
        "connector_field_value": "replace"
      }
    ]

# 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
```

## How to Use These Templates

1. **Copy the template** that matches your use case
2. **Create a new workflow** in TD Data Workbench > Workflows
3. **Paste the template** into the workflow editor
4. **Modify the parameters**:
  - Set the correct `api_endpoint` for your TD site
  - Configure `id_key` to match your unique identifier column
  - Set `delta_keys` to the columns you want to track for changes
  - Adjust `activation_mappings` based on your connector's capabilities
5. **Save the workflow**
6. **Assign it to an activation** or run it as a standalone workflow


## Parameter Customization Guide

### API Endpoint by Region

| Region | Endpoint |
|  --- | --- |
| US | `https://integrations-gateway.us01.treasuredata.com` |
| EU | `https://integrations-gateway.eu01.treasuredata.com` |
| Asia Pacific | `https://integrations-gateway.ap02.treasuredata.com` |
| Japan | `https://integrations-gateway.treasuredata.co.jp` |


### Common ID Keys by Platform

| Platform | Recommended ID Key | Notes |
|  --- | --- | --- |
| Braze | `external_id` | Must match Braze's external_id field |
| Salesforce Marketing Cloud | `subscriber_key` | SFMC's unique identifier |
| Google Ads | `email` | Will be hashed by the connector |
| Meta | `email` | Will be hashed by the connector |
| Snowflake | `td_customer_id` or `email` | Choose based on your data model |


### Connector Field Names

Different connectors use different field names:

| Connector | Field Name | Supported Values |
|  --- | --- | --- |
| Snowflake, MySQL, PostgreSQL | `mode` | `append`, `replace`, `truncate`, `delete` |
| Braze | `mode` | `append`, `replace` |
| Google Ads, Google Sheets | `mode` | `append`, `replace` |
| Meta Custom Audiences | `action` | `add`, `remove` |
| Klaviyo | `operation` | `add`, `remove` |


## Next Steps

- [Incremental Activation Overview](/products/customer-data-platform/audience-studio/activation/incremental-activation-overview)
- [Configure Incremental Activation](/products/customer-data-platform/audience-studio/activation/configure-incremental-activation)
- [Incremental Activation Parameters](/products/customer-data-platform/audience-studio/activation/incremental-activation-parameters)
- [Incremental Activation Mappings](/products/customer-data-platform/audience-studio/activation/incremental-activation-mappings)
- [Troubleshooting Incremental Activation](/products/customer-data-platform/audience-studio/activation/troubleshooting-incremental-activation)


## Related Topics

- [Activation Actions](/products/customer-data-platform/audience-studio/activation/activation-actions)
- [Creating and Editing a Workflow](/products/customer-data-platform/data-workbench/workflows/getting-started-with-treasure-workflow)