トリガーによる送信の一時停止、再パブリッシュ、再起動を行うビジネスユニットで、次のデータエクステンションを作成します。
データエクステンション名: TSRepublish
データエクステンション外部キー: TSRepublish
| 項目名 | データ型 | 文字数 | プライマリキー | Null 可能 | デフォルト値 |
| ExternalKey | テキスト | 254 | はい | いいえ | 該当なし |
| torepublish | Boolean | 該当なし | いいえ | いいえ | True |
データエクステンションの [ExternalKey] 項目に、一時停止、再パブリッシュ、再起動が必要な、トリガーによる送信の外部キーを入力します。
一時停止、再パブリッシュ、再起動する、トリガーによる送信の [torepublish] 項目の値が「True」であることを確認します。
次のコードで Automation Studio スクリプトアクティビティを作成します。
<script runat="server"> Platform.Load("core", "1.1.1"); var api = new Script.Util.WSProxy(); var rowstoprocess = DataExtension.Init("TSRepublish").Rows.Lookup(["torepublish"],[1]) for(j=0; j < rowstoprocess.length; j ++ ) { var tskey = rowstoprocess[j].ExternalKey var tsd = TriggeredSend.Init(tskey); var pause = tsd.Pause(); var updateObj = {}; updateObj.CustomerKey = tskey; updateObj.RefreshContent = true; var publish = tsd.Update(updateObj); var start = tsd.Start(); } </script>スクリプトアクティビティで上の SSJS を実行すると、「TSRepublish」データエクステンションに存在する [torepublish] の値が「True」の外部キーが、トリガーによる送信を一時停止、パブリッシュ、再開します。
「TSRepublish」データエクステンション内のトリガーによる送信を一時停止、再パブリッシュ、再開する必要がない場合は、スクリプトアクティビティの実行前に、それらの送信の [torepublish] 値を「False」に更新します。
000395628

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.