0

I do not see an endpoint to retrieve the generic send reports through the API. I just want a quick way to get generic send summaries by account? For example either just a total send and delivered count or a listing of all sends by jobID and there corresponding send counts per job. I have done this is the past setting up programs etc. But in this case I am dealing with many lock and publish accounts and need a automated way to just pull generic details from all sub accounts.

2 Answers 2

1

I was able to solve this using ListSend object

rr.ObjectType = "ListSend";
rr.Properties = new string[] { "Client.ID", "SendID", "List.ID", "List.ListName", "Duplicates", "InvalidAddresses", "ExistingUndeliverables", "ExistingUnsubscribes", "HardBounces", "SoftBounces", "OtherBounces", "ForwardedEmails", "UniqueClicks", "UniqueOpens", "NumberSent", "NumberDelivered", "Unsubscribes", "MissingAddresses" };
status = _etClient.Retrieve(rr, out requestID, out results);

I had to search through the WSDL and looks like this is the best option.

Here is an example on there docs page. But to use it as I needed (without need of passing JobID specifically for each call). You can just remove that whole filter portion.

// Specify the SendID SimpleFilterPart listSendFilter = new
SimpleFilterPart();
listSendFilter.Property = "SendID";
listSendFilter.SimpleOperator = SimpleOperators.equals;
listSendFilter.Value = new string[] { "2057" };

I did however use the filter below so that I do get all messages with test messages omitted (removing sends that are sent to less than 50 people). So it will pull back ALL send jobs into the ListSend object that are valid sends and I can then loop through that object to pull object to get send counts etc for all sends in account.

sfp.Property = "NumberSent";
sfp.SimpleOperator = SimpleOperators.greaterThan;
sfp.Value = new string[] { "50" };
rr.Filter = sfp;

Here is the list of all available fields that are returned in that object:

0
0

Here is a more complete example if it may help anyone

do
{
ExactTargetWS.APIObject[] results;
String requestID;
ExactTargetWS.RetrieveRequest rr = new ExactTargetWS.RetrieveRequest();
sfp.Property = "NumberSent";
sfp.SimpleOperator = SimpleOperators.greaterThan;
sfp.Value = new string[] { "50" };
rr.Filter = sfp;
rr.ObjectType = "ListSend";
rr.Properties = new string[] { "Client.ID", "SendID", "List.ID", "List.ListName", "Duplicates", "InvalidAddresses", "ExistingUndeliverables", "ExistingUnsubscribes", "HardBounces", "SoftBounces", "OtherBounces", "ForwardedEmails", "UniqueClicks", "UniqueOpens", "NumberSent", "NumberDelivered", "Unsubscribes", "MissingAddresses" };
status = _client.Retrieve(rr, out requestID, out results);
for (int i = 0; i < results.Length; i++)
{
sendObject = (ListSend)results[i];
if (sendObject.NumberSent < 50) // double check to make sure we are not processing un-needed sends
{
    continue;
}
SaveSends(sendObject);  // pass send object for each Send Job and save to local DB
}
rr.ContinueRequest = requestID;
} while (status.Equals("MoreDataAvailable")); // call caps at 2,500
2
  • Hi @james, can you perhaps clarify what is _client? Jul 22, 2020 at 7:50
  • 1
    Sorry just saw this question. The _client is just the ExactTarget client that is instantiated outside of this code.
    – james
    Aug 10, 2020 at 15:22

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .