I have defined a Triggered Send based on a sendable Data Extension and an EMail AMPScript. I have assigned a external key to the Triggered Send and is sending emails when I create a POST request to the endpoint https://www.exacttargetapis.com/messaging/v1/messageDefinitionSends/external_key/send
I would like to know if there's a way to restart the Triggered Send programatically. I know there's a dashboard UI I can use but I'm not interested in do it manually.
Do you know how to do it? I have tons of Triggered Sends and I'd like to automate the pause/publish/restart process for each TS.
Best Answer
EDIT
This is the most optimized solution I could find using AMPScript - albeit part of it is done in SSJS, but that part greatly reduces the code weight and optimizes the speed of the script.
As I was unsure which triggers you wanted to pause or restart, I filtered based on just 'currently active'.
I had the same sort of issue and it took a large chunk of my life to solve.
Reference this question/answer for more info on my exact issue: SOAP API to 'publish' a TriggeredSendDefinition?
As I am assuming you want to do a pause, publish and run - See below for API calls which will do a full restart on the triggered email interaction.
You just need to do the requests via the AMPScript API functions.
See below for sample SOAP envelopes to accomplish this:
Pause
Publish
Restart