Skip to content
Last updated

Incremental Activation Workflowテンプレート

Incremental Activationはベータ版リリースです。詳細については、カスタマーサクセス担当者にお問い合わせください。

このページでは、一般的なIncremental Activationシナリオですぐに使用できるワークフローテンプレートを提供します。これらのテンプレートをワークフローエディタに直接コピー&ペーストし、ニーズに合わせてパラメータを変更できます。

目次

Basic Template - Add New Profiles Only

これは、新規プロファイルのみを送信先に送信する最もシンプルな設定です。

ユースケース: 既存のプロファイルを再送信せずに累積オーディエンスを構築します。

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

新規プロファイルと更新された属性を持つプロファイルの両方をSnowflakeに送信します。

ユースケース: 属性の更新を含むセグメントの変更でSnowflakeテーブルを同期状態に保ちます。

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)

新規プロファイルの追加、変更されたプロファイルの更新、削除されたプロファイルの削除により、Snowflakeを完全に同期した状態に保ちます。

ユースケース: GDPR準拠のための削除を含め、Snowflakeでセグメントの完全なレプリカを維持します。

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

データポイント消費を最小限に抑えるため、新規ユーザーのみをBrazeに送信します。

ユースケース: 既存プロファイルの再送信を避けることで、Brazeのデータポイントコストを削減します。

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の顧客リストを更新します。

ユースケース: 新しい見込み客と更新された連絡先情報でGoogle Adsオーディエンスを最新の状態に保ちます。

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

新規ユーザーを追加し、条件を満たさなくなったユーザーを削除することで、Meta Custom Audiencesを完全に同期した状態に保ちます。

ユースケース: 自動削除機能を使用して、Facebook/Instagram広告用の正確なオーディエンスリストを維持します。

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

Salesforce Marketing Cloudのリスト全体を現在のセグメントで置き換え、精密なターゲティングを確保します。

ユースケース: セグメントとSFMC Data Extension間で正確に一致させる必要がある場合。

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

これらのテンプレートの使用方法

  1. ユースケースに合ったテンプレートをコピーします
  2. TD Data Workbench > Workflowsで新しいワークフローを作成します
  3. ワークフローエディタにテンプレートを貼り付けます
  4. パラメータを変更します:
    • TDサイトに合わせて正しいapi_endpointを設定します
    • 一意の識別子カラムに合わせてid_keyを設定します
    • 変更を追跡したいカラムにdelta_keysを設定します
    • コネクタの機能に基づいてactivation_mappingsを調整します
  5. ワークフローを保存します
  6. Activationに割り当てるか、スタンドアロンワークフローとして実行します

パラメータカスタマイズガイド

リージョン別APIエンドポイント

リージョンエンドポイント
UShttps://integrations-gateway.us01.treasuredata.com
EUhttps://integrations-gateway.eu01.treasuredata.com
Asia Pacifichttps://integrations-gateway.ap02.treasuredata.com
Japanhttps://integrations-gateway.treasuredata.co.jp

プラットフォーム別の一般的なID Key

プラットフォーム推奨ID Key備考
Brazeexternal_idBrazeのexternal_idフィールドと一致する必要があります
Salesforce Marketing Cloudsubscriber_keySFMCの一意の識別子
Google Adsemailコネクタによってハッシュ化されます
Metaemailコネクタによってハッシュ化されます
Snowflaketd_customer_id または emailデータモデルに基づいて選択します

コネクタフィールド名

コネクタによって異なるフィールド名を使用します:

コネクタフィールド名サポートされる値
Snowflake, MySQL, PostgreSQLmodeappend, replace, truncate, delete
Brazemodeappend, replace
Google Ads, Google Sheetsmodeappend, replace
Meta Custom Audiencesactionadd, remove
Klaviyooperationadd, remove

次のステップ

関連トピック