0

Given a period of time, for example, 2 hours, I would like to retrieve subscriber keys who's unsubscribe reason is 'Spam Complaint'. I've tried using various retrieve calls which either return too much data, or too little.

3
  • What objects have you retrieved so far? Commented Feb 24, 2014 at 19:04
  • @KellyJAndrews SubscriberStatusEvent. The retrievable fields are SubscriberKey, CreatedDate and ReasonUnsub and the filter was between two CreatedDate's. This returns back SubscriberStatusEvent's and I get the ReasonUnsub's it's not efficient as I have to do some filtering on my side to get the ReasonUnsubs. Commented Feb 25, 2014 at 9:39
  • 1
    It would be possible to use a ComplexFilter in order to filter on CreatedDate(Using the Between Operater) and ReasonUnsub in one request.
    – Mac
    Commented Feb 27, 2014 at 2:29

1 Answer 1

3

This worked:

<par:RetrieveRequest> <par:ObjectType>SubscriberStatusEvent</par:ObjectType> <par:Properties>SubscriberKey</par:Properties> <par:Properties>ReasonUnsub</par:Properties> <par:Filter xsi:type="par:ComplexFilterPart"> <par:LeftOperand xsi:type="par:SimpleFilterPart"> <par:Property>CreatedDate</par:Property> <par:SimpleOperator>between</par:SimpleOperator> <par:Value>2014-02-20T00:00:00.000</par:Value> <par:Value>2014-02-21T00:00:00.000</par:Value> </par:LeftOperand> <par:LogicalOperator>AND</par:LogicalOperator> <par:RightOperand xsi:type="par:SimpleFilterPart"> <par:Property>ReasonUnsub</par:Property> <par:SimpleOperator>equals</par:SimpleOperator> <par:Value>Spam Complaint</par:Value> </par:RightOperand> </par:Filter> </par:RetrieveRequest>

You must log in to answer this question.

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