Skip to main content
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
deleted 60 characters in body
Source Link
Themba
  • 140
  • 7

adding a large number of subscribers to an ExactTarget list ssjs

I have a large number of subscribers I need need to move from an ExactTarget data extension into different lists using ssjs. This is the basic script I am using

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

var tempDE = DataExtension.Init("Temp");
var oldList = List.Init(2830)
var newList = List.Init(2833)

var arrayLength = 1;

while (arrayLength > 0) {
var tempDeResults = tempDE.Rows.Retrieve();
var arrayLength = tempDeResults.length;

if (arrayLength > 50) { arrayLenght = 50; }

for (var i = 0; i < arrayLength; i++) {

    var sub = tempDeResults[i]['Email Address'];
    
    var moveto = opensListnewList.Subscribers.Upsert(sub,{Attempt1:attempt1, Attempt2:attempt2, Attempt3:attempt3});

var delfrom = oldList.Subscribers.Unsubscribe(sub);
    
tempDE.Rows.Remove(['Email Address'],[sub]);
}
    location.reload(true);

}
</script></pre>

What I am trying to do is have the script run for 50 subscribers, and then reload for the next 50, as if I have clicked the reload button, but that is not working great, and it get's aborted.

My question what is the best way of say adding 2500 contacts to a list by running s script once? How do I get it to break and restart those requests after 50 subscribers so those calls don't hang? How do I add subscribers asynchronously using ssjs?

Any help here would be great. The more detail the better.

Thanks

adding a large number of subscribers

I have a large number of subscribers I need need to move from an ExactTarget data extension into different lists using ssjs. This is the basic script I am using

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

var tempDE = DataExtension.Init("Temp");
var oldList = List.Init(2830)
var newList = List.Init(2833)

var arrayLength = 1;

while (arrayLength > 0) {
var tempDeResults = tempDE.Rows.Retrieve();
var arrayLength = tempDeResults.length;

if (arrayLength > 50) { arrayLenght = 50; }

for (var i = 0; i < arrayLength; i++) {

    var sub = tempDeResults[i]['Email Address'];
    
    var moveto = opensList.Subscribers.Upsert(sub,{Attempt1:attempt1, Attempt2:attempt2, Attempt3:attempt3});

var delfrom = oldList.Subscribers.Unsubscribe(sub);
    
tempDE.Rows.Remove(['Email Address'],[sub]);
}
    location.reload(true);

}
</script></pre>

What I am trying to do is have the script run for 50 subscribers, and then reload for the next 50, as if I have clicked the reload button, but that is not working great, and it get's aborted.

My question what is the best way of say adding 2500 contacts to a list by running s script once? How do I get it to break and restart those requests after 50 subscribers so those calls don't hang? How do I add subscribers asynchronously using ssjs?

Any help here would be great. The more detail the better.

Thanks

adding a large number of subscribers to an ExactTarget list ssjs

I have a large number of subscribers I need need to move from an ExactTarget data extension into different lists using ssjs. This is the basic script I am using

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

var tempDE = DataExtension.Init("Temp");
var oldList = List.Init(2830)
var newList = List.Init(2833)

var arrayLength = 1;

while (arrayLength > 0) {
var tempDeResults = tempDE.Rows.Retrieve();
var arrayLength = tempDeResults.length;

if (arrayLength > 50) { arrayLenght = 50; }

for (var i = 0; i < arrayLength; i++) {

    var sub = tempDeResults[i]['Email Address'];
    
    var moveto = newList.Subscribers.Upsert(sub);

var delfrom = oldList.Subscribers.Unsubscribe(sub);
    
tempDE.Rows.Remove(['Email Address'],[sub]);
}
    location.reload(true);

}
</script></pre>

What I am trying to do is have the script run for 50 subscribers, and then reload for the next 50, as if I have clicked the reload button, but that is not working great, and it get's aborted.

My question what is the best way of say adding 2500 contacts to a list by running s script once? How do I get it to break and restart those requests after 50 subscribers so those calls don't hang? How do I add subscribers asynchronously using ssjs?

Any help here would be great. The more detail the better.

Thanks

corrected title to have"subscribers", formatted code
Source Link

adding a large number of subscriber to an ExactTarget list with ssjssubscribers

I have a large number of subscribersubscribers I need need to move from an ExactTarget data extension into different lists using ssjs. This is the basic script I am using

Platform.Load("core","1");

var tempDE = DataExtension.Init("Temp");
var oldList = List.Init(2830);
var newList = List.Init(2833);
var arrayLength = 1;

while (arrayLength > 0) { var tempDeResults = tempDE.Rows.Retrieve(); var arrayLength = tempDeResults.length;

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

var tempDE = DataExtension.Init("Temp");
var oldList = List.Init(2830)
var newList = List.Init(2833)

var arrayLength = 1;

while (arrayLength > 0) {
var tempDeResults = tempDE.Rows.Retrieve();
var arrayLength = tempDeResults.length;

if (arrayLength > 50) { arrayLenght = 50; } 

for (var i = 0; i < arrayLength; i++) { 

    var sub = tempDeResults[i]['Email Address'];        
    
        var moveto = opensList.Subscribers.Upsert(sub);   ,{Attempt1:attempt1, Attempt2:attempt2, Attempt3:attempt3});
     
var delfrom = oldList.Subscribers.Unsubscribe(sub);
    
    tempDE.Rows.Remove(['Email Address'],[sub]);
}
    location.reload(true);

}
</script></pre>

}

What I am trying to do is have the script run for 50 subscribers, and then reload for the next 50, as if I have clicked the reload button, but that is not working great, and it get's aborted.

My question what is the best way of say adding 2500 contacts to a list by running s script once? How do I get it to break and restart those requests after 50 subscribers so those calls don't hang? How do I add subscribers asynchronously using ssjs?

Any help here would be great. The more detail the better.

Thanks

adding a large number of subscriber to an ExactTarget list with ssjs

I have a large number of subscriber I need need to move from an ExactTarget data extension into different lists using ssjs. This is the basic script I am using

Platform.Load("core","1");

var tempDE = DataExtension.Init("Temp");
var oldList = List.Init(2830);
var newList = List.Init(2833);
var arrayLength = 1;

while (arrayLength > 0) { var tempDeResults = tempDE.Rows.Retrieve(); var arrayLength = tempDeResults.length;

if (arrayLength > 50) { arrayLenght = 50; }
for (var i = 0; i < arrayLength; i++) {
    var sub = tempDeResults[i]['Email Address'];        
    
        var moveto = opensList.Subscribers.Upsert(sub);     
    var delfrom = oldList.Subscribers.Unsubscribe(sub);
    
    tempDE.Rows.Remove(['Email Address'],[sub]);
}
    location.reload(true);

}

What I am trying to do is have the script run for 50 subscribers, and then reload for the next 50, as if I have clicked the reload button, but that is not working great, and it get's aborted.

My question what is the best way of say adding 2500 contacts to a list by running s script once? How do I get it to break and restart those requests after 50 subscribers so those calls don't hang? How do I add subscribers asynchronously using ssjs?

Any help here would be great. The more detail the better.

Thanks

adding a large number of subscribers

I have a large number of subscribers I need need to move from an ExactTarget data extension into different lists using ssjs. This is the basic script I am using

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

var tempDE = DataExtension.Init("Temp");
var oldList = List.Init(2830)
var newList = List.Init(2833)

var arrayLength = 1;

while (arrayLength > 0) {
var tempDeResults = tempDE.Rows.Retrieve();
var arrayLength = tempDeResults.length;

if (arrayLength > 50) { arrayLenght = 50; } 

for (var i = 0; i < arrayLength; i++) { 

    var sub = tempDeResults[i]['Email Address'];
    
    var moveto = opensList.Subscribers.Upsert(sub,{Attempt1:attempt1, Attempt2:attempt2, Attempt3:attempt3});
 
var delfrom = oldList.Subscribers.Unsubscribe(sub);
    
tempDE.Rows.Remove(['Email Address'],[sub]);
}
    location.reload(true);

}
</script></pre>

What I am trying to do is have the script run for 50 subscribers, and then reload for the next 50, as if I have clicked the reload button, but that is not working great, and it get's aborted.

My question what is the best way of say adding 2500 contacts to a list by running s script once? How do I get it to break and restart those requests after 50 subscribers so those calls don't hang? How do I add subscribers asynchronously using ssjs?

Any help here would be great. The more detail the better.

Thanks

deleted 82 characters in body; edited title
Source Link
Themba
  • 140
  • 7

adding a large number of susubscriber to an ExactTarget list with ssjs

I have a large number of subscriber I need need to move from an ExactTarget data extension into different lists using ssjs. This is the basic script I am using

Platform.Load("core","1");

var tempDE = DataExtension.Init("Temp");
var oldList = List.Init(2830);
var newList = List.Init(2833);
var arrayLength = 1;

while (arrayLength > 0) { var tempDeResults = tempDE.Rows.Retrieve(); var arrayLength = tempDeResults.length;



Platform.Load("core","1");

var tempDE = DataExtension.Init("Temp");
var oldList = List.Init(2830)
var newList = List.Init(2833)

var arrayLength = 1;

while (arrayLength > 0) {

    var tempDeResults = tempDE.Rows.Retrieve();

    var arrayLength = tempDeResults.length;

    if (arrayLength > 50) { arrayLenght = 50; }

    for (var i = 0; i if (arrayLength > 50) { arrayLenght = 50; }
for (var i = 0; i < arrayLength; i++) {
    var sub = tempDeResults[i]['Email Address'];        
    
        var moveto = opensList.Subscribers.Upsert(sub);     
    var delfrom = oldList.Subscribers.Unsubscribe(sub);
    
    tempDE.Rows.Remove(['Email Address'],[sub]);
}
    location.reload(true);

}

What I am trying to do is have the script run for 50 subscribers, and then reload for the next 50, as if I have clicked the reload button, but that is not working great, and it get's aborted.

My question what is the best way of say adding 2500 contacts to a list by running s script once? How do I get it to break and restart those requests after 50 subscribers so those calls don't hang? How do I add subscribers asynchronously using ssjs?

Any help here would be great. The more detail the better.

Thanks

adding a large number of su

I have a large number of subscriber I need need to move from an ExactTarget data extension into different lists using ssjs. This is the basic script I am using



Platform.Load("core","1");

var tempDE = DataExtension.Init("Temp");
var oldList = List.Init(2830)
var newList = List.Init(2833)

var arrayLength = 1;

while (arrayLength > 0) {

    var tempDeResults = tempDE.Rows.Retrieve();

    var arrayLength = tempDeResults.length;

    if (arrayLength > 50) { arrayLenght = 50; }

    for (var i = 0; i 

What I am trying to do is have the script run for 50 subscribers, and then reload for the next 50, as if I have clicked the reload button, but that is not working great, and it get's aborted.

My question what is the best way of say adding 2500 contacts to a list by running s script once? How do I get it to break and restart those requests after 50 subscribers so those calls don't hang? How do I add subscribers asynchronously using ssjs?

Any help here would be great. The more detail the better.

Thanks

adding a large number of subscriber to an ExactTarget list with ssjs

I have a large number of subscriber I need need to move from an ExactTarget data extension into different lists using ssjs. This is the basic script I am using

Platform.Load("core","1");

var tempDE = DataExtension.Init("Temp");
var oldList = List.Init(2830);
var newList = List.Init(2833);
var arrayLength = 1;

while (arrayLength > 0) { var tempDeResults = tempDE.Rows.Retrieve(); var arrayLength = tempDeResults.length;

if (arrayLength > 50) { arrayLenght = 50; }
for (var i = 0; i < arrayLength; i++) {
    var sub = tempDeResults[i]['Email Address'];        
    
        var moveto = opensList.Subscribers.Upsert(sub);     
    var delfrom = oldList.Subscribers.Unsubscribe(sub);
    
    tempDE.Rows.Remove(['Email Address'],[sub]);
}
    location.reload(true);

}

What I am trying to do is have the script run for 50 subscribers, and then reload for the next 50, as if I have clicked the reload button, but that is not working great, and it get's aborted.

My question what is the best way of say adding 2500 contacts to a list by running s script once? How do I get it to break and restart those requests after 50 subscribers so those calls don't hang? How do I add subscribers asynchronously using ssjs?

Any help here would be great. The more detail the better.

Thanks

Source Link
Themba
  • 140
  • 7
Loading