検証アクティビティ(Verification Activity)はレコード件数のみ評価可能です。SQL と組み合わせ、特定のデータ条件に基づきオートメーションを停止する設定手順を解説します。
Marketing Cloud の Verification Activity(検証アクティビティ)は、データエクステンション(DE)の「レコード件数」のみを評価対象とします。特定の「項目値」を直接条件(例: IsUpdatedThisMonth が True のレコードが存在しない場合は停止するなど)には設定できません。
この要件を満たすためには、「条件に合致するデータを抽出した結果の件数」を検証することで、間接的に判定を行う方法が一例として活用されています。以下の手順で設定を行います。
まず、条件を満たすレコードのみを格納する一時的なデータエクステンション(以下、判定用 DE)と、データを抽出する SQL クエリアクティビティを作成します。
判定用 DE の作成: 必要なプライマリキーのみを持つシンプルな DE を作成する(例: Check_IsUpdated)。
SQL クエリアクティビティの作成: 以下のサンプルコードを参考に、条件(IsUpdatedThisMonth = 'True')に合致するレコードのみを抽出するクエリを作成する。
SELECT
SubscriberKey
FROM
[元のデータエクステンション名]
WHERE
IsUpdatedThisMonth = 'True'
/* ブール型の場合は 1、テキスト型の場合は 'True' などデータ型に合わせて記述 */
データアクションの設定: 判定用DEに対して [上書き (Overwrite)] を選択し保存する。
作成した判定用DEのレコード件数を確認する検証アクティビティを設定します。
Automation Studio で [検証] アクティビティを新規作成する。
ターゲットとして、手順1で作成した「判定用 DE (Check_IsUpdated)」を選択する。
条件を以下のように設定する。
条件: [件数], [次の値に等しい (is equal to)], 0
論理: 条件を満たすレコードが0件(=対象データが存在しない)場合を検知するため。
アクションを以下のように設定する。
アクション: [オートメーションを停止 (Stop Automation)]
通知: 必要に応じて、停止時に通知するメールアドレスを入力する。
Automation Studio のワークフロー設定にて、以下の順序でアクティビティを配置します。
ステップ 1: 手順1で作成した「SQLクエリアクティビティ」
条件に合致するデータを判定用 DE に抽出します。
ステップ 2: 手順2で作成した「検証アクティビティ」
判定用 DE が0件の場合、ここでオートメーションが停止します。
ステップ 3以降: メール送信アクティビティなど
検証を通過した場合(条件を満たすデータが1件以上ある場合)のみ実行されます。
この構成により、特定の値を持つレコードが存在しない場合に、後続の処理を安全に停止できます。
005232930

We use three kinds of cookies on our websites: required, functional, and advertising. You can choose whether functional and advertising cookies apply. Click on the different cookie categories to find out more about each category and to change the default settings.
Privacy Statement
Required cookies are necessary for basic website functionality. Some examples include: session cookies needed to transmit the website, authentication cookies, and security cookies.
Functional cookies enhance functions, performance, and services on the website. Some examples include: cookies used to analyze site traffic, cookies used for market research, and cookies used to display advertising that is not directed to a particular individual.
Advertising cookies track activity across websites in order to understand a viewer’s interests, and direct them specific marketing. Some examples include: cookies used for remarketing, or interest-based advertising.