Skip to content

Instantly share code, notes, and snippets.

@kylekeesling
Created April 11, 2012 18:04
Show Gist options
  • Save kylekeesling/2361012 to your computer and use it in GitHub Desktop.
Save kylekeesling/2361012 to your computer and use it in GitHub Desktop.
ExactTarget - Self-Cleansing List - Unengaged Subscribers
<script runat="server" language="javascript">
Platform.Load("Core","1");
//Self-Cleansing List
var selfCleansinglist = List.Init("auto_cleansing_list");
var status;
//Newly Refreshed Group that Contains Unengaged Subscribers
var unengagedGroup = List.Init('unengaged_subscribers_group');
var unengagedSubs = unengagedGroup.Subscribers.Retrieve();
//Iterate through the DE rows and unsubscribe them from the list
for(i = 0; i < unengagedSubs.length; i++) {
status = selfCleansinglist.Subscribers.Unsubscribe({EmailAddress: unengagedSubs[i].EmailAddress, SubscriberKey: unengagedSubs[i].SubscriberKey});
}
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment