[SalesForce] Simple Exact Target API Request: Retrieve Subscriber info from list specified by list ID and subscriber key

Tech support sent me here to ask this question.

I would like to set up an ET API call that would return subscriber information (i.e., attributes) for a specific user (using subscriberkey) from a specific list (i.e, NOT all subscribers). I've tried various permutations of using Subscriber and ListSubscriber without any success.

Can anybody direct me to some specific documentation about how to do this?

Thanks.

Best Answer

A lot of it depends on what you intend to do with this data. There is an unsubEvent REST route that supports GET, but doesnt appear to have a listid property(which would be strange, since unsubs are cardinally list-subscriber level data): https://code.exacttarget.com/apis-sdks/fuel-sdks/tracking/unsubscribe-tracking.html#rubyget . I cant help much with that, but might be worth trying.

Its not really API, but we actually do already track unsub date per list in the Unsubscribe Data view: https://help.exacttarget.com/en-US/documentation/exacttarget/interactions/activities/query_activity/data_view_unsubscribe/

That data view has eventDate(the date of the unsub event) and listid. You could write some simple sql and place in a query activity:

SELECT subscriberkey, eventDate, listid FROM _unsubsubscribe
WHERE eventDate > dateadd(day,datediff(day,1,GETDATE()),0) 
AND eventDate < dateadd(day,datediff(day,0,GETDATE()),0)

You could join in _listSubscribers on subscriberid to get a human-readable list name instead of the listID.

As has been mentioned previously, Profile attributes are at an account level (shared across all lists), so that wouldnt be the place to store unsubscribe data. Subscription status ETC are really system attributes and are stored per list.

Related Topic