Expand my Community achievements bar.

SOLVED

Stop delivery based on number of recipients

Avatar

Level 3

Hello everyone,

 

A question, is there any way within a delivery to stop the sent dynamically according to the number of recipients to be sent? For example, if it exceeds 100k recipients, or if it gives an error or requires approval, but if it is less than 100k recipients, it will be executed automatically.

 

We are aware that one option would be to include it in a workflow with a test node to validate it before delivery, but we have a requirement to reduce the number of nodes in the workflows.

 

Thanks

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

Hi @LAR1985 ,

Create a control type typology rule and select phase as 'After Targeting' and paste the below code,

var iToDeliver = parseInt(delivery.properties.toDeliver);
logInfo("Target Count: "+ iToDeliver);
if( iToDeliver > 100000 )
{
  logError("Target count is more than 100k");
  return false;
}
return true;

 ParthaSarathy_0-1748878383106.png

View solution in original post

1 Reply

Avatar

Correct answer by
Community Advisor

Hi @LAR1985 ,

Create a control type typology rule and select phase as 'After Targeting' and paste the below code,

var iToDeliver = parseInt(delivery.properties.toDeliver);
logInfo("Target Count: "+ iToDeliver);
if( iToDeliver > 100000 )
{
  logError("Target count is more than 100k");
  return false;
}
return true;

 ParthaSarathy_0-1748878383106.png