Skip to main content
added 110 characters in body
Source Link

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!

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.

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!

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!

Source Link

ExactTarget - Get SentDates of TriggeredSends

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.

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!