1

Is there any way of of filtering TriggeredSends by the date that it was sent? Kind of how the SentDate works for Sends. I can pull the totals (TriggeredSendSummary) of all the TriggeredSends by the CustomerKey, but I would like to be able to filter the return results by the date that the trigger was actually fired to send an email. That way I can total Sends, UniqueOpens, UniqueClicks, etc. of TriggeredSends by the date that they were sent.

I know if I filter by the CreatedDate or ModifiedDate, it will still just pull the whole TriggerSendSummary/TriggerSendDefinition that includes all emails that were sent. It only looks at when that object was made or updated. Even with this I'm getting errors with the request (I know it won't help me, but thought that you guys should know: Error: The Request Property(s) CreatedDate,ModifiedDate do not match with the fields of TriggeredSendSummary retrieve)

Here's basically what I would like to do in my code, since it may help you all understand a little better:

//Make new request for triggered results
RetrieveRequest triggeredRetrieveRequest = new RetrieveRequest();
triggeredRetrieveRequest.ObjectType = "triggeredSendSummary";
triggeredRetrieveRequest.Properties = new String[] { "CreatedDate", "Name", "CustomerKey"};

// Setting up a simple filter for customer key
SimpleFilterPart keyFilter = new SimpleFilterPart();
keyFilter.SimpleOperator = SimpleOperators.equals;
keyFilter.Property = "CustomerKey";
keyFilter.Value = new String[] { "MyCustomerKey" };

// Setting up a simple filter for the date I would like to filter by
SimpleFilterPart dateFilter = new SimpleFilterPart();
dateFilter.Property = "????"; //NEED SOME PROPERTY TO FILTER BY DATE
dateFilter.SimpleOperator = SimpleOperators.between;
dateFilter.DateValue = new DateTime[2];
dateFilter.DateValue[0] = myStartDateTime;
dateFilter.DateValue[1] = myEndDateTime;

//Combine the two simple filters into a complex filter
ComplexFilterPart cfp = new ComplexFilterPart();
cfp.LeftOperand = keyFilter;
cfp.RightOperand = dateFilter;
cfp.LogicalOperator = LogicalOperators.AND;

//Set filter to complex filter
triggeredRetrieveRequest.Filter = cfp;

APIObject[] triggeredResults = null;
String triggeredRequestId = null;
String triggeredResponse = soapClient.Retrieve(triggeredRetrieveRequest, out triggeredRequestId, out triggeredResults);
TriggeredSendSummary[] triggeredSends = Array.ConvertAll(triggeredResults, triggeredResult => (TriggeredSendSummary)triggeredResult);

If there is a different object I need to retrieve to get these dates, or if it is even possible, I really need to know!

1

I'm going to suggest you go about this differently. Try using the SentEvent object, querying by the TriggeredSendDefinitionObjectID and the date of interest.

  • So this is what I got out of what you said: 1) Search by the CreatedDate property and CustomerKey or TriggeredSendDefinitionObjectID of the SentEvent object 2) Make an array of the SendId's of the SentEvent objects that are returned 3) Pull all the Send objects by the SendId array to figure out totals of Sends, Opens, Clicks, etc – Cory Shaw Jul 2 '14 at 15:01
  • That's correct. If you are open to using a mixed solution using a combination of the API and functionality within application, that maybe the way to go here, using query activities of the publicly exposed data views. See help.exacttarget.com/en/documentation/exacttarget/interactions/… if this is of interest. – Timothy Jul 2 '14 at 15:16
  • Oh wow, I haven't seen the Query Activity yet. Will attempt to make QueryRequest and see how that goes. I'll compare response times of both, and let you know of the results. Thanks! – Cory Shaw Jul 2 '14 at 15:28
  • Okay, so I'm retrieving all of the SendEvents with the TriggeredSendDefinitionObjectID, and I'm receiving A LOT of results from TriggeredSends, which I should be. Unfortunately, all of these events have the exact same SendID (but they all have different SendDates), which defeats the purpose of being able to see specifically how many Opens, Clicks, etc. are for the TriggeredSend between the date because that SendID returns the whole TriggeredSend. – Cory Shaw Jul 2 '14 at 17:51
  • I would definitely write a query activity then, using the Opens view and the Clicks view. Works more or less just like a SQL query. – Timothy Jul 2 '14 at 18:13

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.