Is there a way I can monitor or be notified of failed Triggered Sends in Marketing Cloud?

Or could it be queried at all from the Data Views?

  • If you use the transactional messaging api you can set up a webhook – EazyE Dec 19 '19 at 15:37
  • The triggered send comes from the Marketing Cloud connector, is there a way we could still utilise the webhook when an error has occurred? – Deployment Failure Dec 19 '19 at 15:42

You could use a script activity within an hourly automation to monitor the queue and error counts of your triggered send. So you'd create two data extensions to house the data for your script activity, one for comparing data from the last automation run and another to house the current run's results if a threshold is reached. The automation would like this:

STEP 1: Script Activity

<script runat = "server" >
Platform.Load("Core", "1.1.1");
var tsdKey = "Your Triggered Send Key";
var rQueued = 0;
var rSent = 0;
var rErrored = 0;
// Get Error Total From Last Run
var prevErrorCount = Platform.Function.Lookup("TS_Monitor_Historical", 'current_errors', 'customer_key', tsdKey);
// Clear Previous Run
var rows = Platform.Function.DeleteData('TS_Monitor_Historical', ["customer_key"], [tsdKey]);
// Get TSD Data
var rr = Platform.Function.CreateObject("RetrieveRequest");
Platform.Function.SetObjectProperty(rr, "ObjectType", "TriggeredSendSummary");
Platform.Function.AddObjectArrayItem(rr, "Properties", "Queued");
Platform.Function.AddObjectArrayItem(rr, "Properties", "NotSentDueToError");
Platform.Function.AddObjectArrayItem(rr, "Properties", "Sent");
Platform.Function.AddObjectArrayItem(rr, "Properties", "CustomerKey");
var sfp = Platform.Function.CreateObject("SimpleFilterPart");
Platform.Function.SetObjectProperty(sfp, "Property", "CustomerKey");
Platform.Function.SetObjectProperty(sfp, "SimpleOperator", "equals");
Platform.Function.AddObjectArrayItem(sfp, "Value", tsdKey);
Platform.Function.SetObjectProperty(rr, "Filter", sfp);
var rows = Platform.Function.InvokeRetrieve(rr, results);
for (var itr = 0; itr < rows.length; ++itr) {
  rQueued += rows[itr].Queued;
  rErrored += rows[itr].NotSentDueToError;
  rSent += rows[itr].Sent;
// Add This Run's Data To Historical
var rows = Platform.Function.InsertData("TS_Monitor_Historical", ["customer_key", "current_queue", "current_errors"], [tsdKey, rQueued, rErrored]);
// If Queue Count Exceeds 500 Or New Errors Were Found
if (rQueued > 500 || rErrored > prevErrorCount) {
  var rows = Platform.Function.InsertData("TS_Monitor", ["customer_key", "current_queue", "current_errors"], [tsdKey, rQueued, rErrored]);
} else {
  var rows = Platform.Function.DeleteData('TS_Monitor', ["customer_key"], [tsdKey]);

STEP 2: Verification Activity

If the number of errors has increased since the last automation run or the queue count has crossed the threshold you've set, then a record is inserted into our primary TS_Monitor data extension.

You just need to add in a verification rule on the activity such that an email is sent to your inbox whenever the row count in the TS_Monitor data extension is greater than 0.

| improve this answer | |
  • I’ve actually tried something like this from a similar post, but I can’t seem to get it working. Is the External Key found in Triggered Send the same as Customer Key. – Deployment Failure Dec 19 '19 at 20:53
  • 1
    Yes, it's the external key. It might be helpful to refer to the Object doc on this as well. developer.salesforce.com/docs/… – Jason Hanshaw Dec 19 '19 at 21:18
  • So the responses does show some stats but they all the numbers including ‘Sent’ is at 0 which can’t be right as there are 100+ successful sends in the last month. – Deployment Failure Dec 19 '19 at 21:24
  • It's likely you have multiple batches of the send summary being returned in the response. You need to iterate over the response and sum the values to get the current summary in that situation. I've updated my code above to reflect that. – Jason Hanshaw Dec 19 '19 at 22:13
  • I'm not sure how reliable the data is regarding clicks/bounces/opens/etc from this object but I've found sent, notsentduetoerror and queued to be accurate in the past. – Jason Hanshaw Dec 19 '19 at 22:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.