Triggered Sends take a significant amount of time to re-activate. This solution should be used with caution as, if you have hundreds/thousands of Triggered Sends, you will see that re-activation of 1000+ Triggered sends may take 30+ minutes to complete. In the scenario that there are more than 1000 Triggered Sends in the Business Unit context, you will want to make modifications to chunk these requests into smaller segments such as 500 at a time. It will be necessary to make modifications to this script given the above scenario as the script, as is, does not account for this scenario.
In the business unit where you would like to pause, republish, and restart triggered sends, create the following DE:
DE Name: TSRepublish
DE External Key: TSRepublish
| Field Name | Data Type | Length | Primary Key | Nullable | Default Value |
| ExternalKey | Text | 254 | Yes | No | Not Applicable |
| torepublish | Boolean | Not Applicable | No | No | True |
Populate the DE's 'ExternalKey' field with the External Keys of the Triggered Sends which need to be paused, republished, and restarted.
Ensure the 'torepublish' field value is 'True' for any Triggered Sends that are intended to be paused, republished, and restarted.
Create an Automation Studio Script Activity with the following code:
<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>
Run the above SSJS via a Script Activity to pause, publish, and restart any Triggered Sends with their external keys present in the 'TSRepublish' DE with a 'torepublish' value of 'True'.
If any Triggered Sends in the 'TSRepublish' DE do not need to be paused, republished, and restarted, update the 'torepublish' value to 'False' for those sends prior to running the Script Activity.
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.