0

I'm trying to remove all subscribers from a suppression list, I have been able to get one in particular to be deleted, but I have not been able to do it for all of them. How could it be done? Thanks in advance

this is my code:

<script type="javascript" runat="server">
Platform.Load("core", "1");

var prox = new Script.Util.WSProxy();
var i;
var Subscribers = new Array();
var complexfilter = {
            Property:"Customer ID",
            SimpleOperator:"isNotNull"
        };

var Subscribers = Rows.Retrieve(complexfilter);
if(Subscribers.length > 0) {
      for (i = 0; i < Subscribers.length; i++) {
      var rows = Platform.Function.DeleteData('SupressionTest - 2044',['Customer ID'],[Subscribers[i]]);

}
};

</script>
0

1 Answer 1

1

This below will remove all subs from your suppression list;

<script runat="server">
    Platform.Load("Core","1");
var api = new Script.Util.WSProxy();
var action = "ClearData";
var props = {  
        CustomerKey: 'SupressionTest - 2044'
            };
var opts = {};
var data = api.performItem("DataExtension", props, action, opts);
</script>

Assuming "SupressionTest - 2044" is your suppression list' Ext Key.

1
  • Hi Ali! Thanks for your answer! would this work with suppression list? I mean, I've seen some similar answers asking about auto suppression list. Thanks in advance!
    – MRT
    Jun 21, 2022 at 19:08

You must log in to answer this question.

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