I am trying to find a way, via Query Studio, to quickly get a list of all triggered e-mails that failed to send (or was/is queued), so I can get an overview of problems.

I cannot seem to find where the data is stored. Basically a query that would list my results like the triggered send overview, but for all e-mails (and possibly limit them by when they failed/were queued).

enter image description here

  • There isn't any quick way to do this as per documentation. The max you can do is view the queue and export the queue. :) help.salesforce.com/… Nov 16 '20 at 11:42
  • You may want to look at that not sent extract
    – EazyE
    Nov 16 '20 at 12:40

I don't think that via SQL you will be able to, but if you use the SOAP API via WSProxy, you can set up an easy reference. You can probably take some of the functions from my 'Trigger Alert' article for your needs.

Example function for Queue:

function getTSDQueue(customerKey,mid) {

  var prox = new Script.Util.WSProxy();

  var cols = ["CustomerKey","Queued"];
  var res = prox.retrieve("TriggeredSendSummary", cols, filter);

  var queue = res.Results[0].Queued

  return queue;

//Then you just run this for each TSD via a for loop to get current queue(can grab via the TSD call below)

(ref for TriggeredSendSummary SOAP Object)

and this for the status:

function getTSDandStatus() {

  var prox = new Script.Util.WSProxy();

  var cols = ["CustomerKey","TriggeredSendStatus"];
  var res = prox.retrieve("TriggeredSendDefinition", cols, filter);

  var results = res.Results
  return results;

(ref for TriggeredSendDefinition SOAP Object)

This will return a JSON that contains the CustomerKey and current status. You can then iterate through this list to grab the queue value via the above function and then only pull out and display the ones that fit your criteria (e.g. Status == "Canceled" || queue > 100)

If you need this to be in SFMC, you can use Zuzanna's article and you can add it into your UI via a Cloudpage.

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.