Hi, there is going to be a law in my country that prohibits compnanies to send comunications after 8 pm.
I understand this law is also present in other countries, like France.
How do you manage this so Campaigns stops sending deliveries after 8 pm?
I'm looking for a global option, since leaving this to the criteria of each users is going to be complicated and phrone to errors.
Solved! Go to Solution.
Topics help categorize Community content and increase your ability to discover relevant content.
Views
Replies
Total Likes
Hi @ogonzalesdiaz ,
This cannot be done by making some global system setting in deployment wizard.
Rather, you can create a control typology rule and assign it to all typology in your instance.
Try the below approach, if the delivery is triggered after 8PM, this will postpone to next day's 9AM. And if the delivery is triggered before 8AM, delivery will get postponed to same day 9AM. So that any recipient won't be receiving email during OFF time.
Step-1: Create a new typology rule
Step-2:
In general tab,
select Rule type as 'Control'
Channel: All channels
Level: Warning
Step-3: In Code Tab, paste the below script
var Hour = formatDate(new Date(), "%2H");
if( Hour >= 20)
{
logWarning("Delivery is triggered during OFF time");
var hour1 = ((24-parseInt(Hour)+9))*60*60*1000;
var scheduledDate = new Date(new Date().getTime()+parseInt(hour1));
delivery.scheduling.contactDate= scheduledDate;
delivery.scheduling.delayed = 1;
logWarning("Rescheduling the delivery to "+scheduledDate);
}
if( Hour < 8)
{
logWarning("Delivery is triggered during OFF time");
var hour1 = (9-parseInt(Hour))*60*60*1000;
var scheduledDate = new Date(new Date().getTime()+parseInt(hour1));
delivery.scheduling.contactDate= scheduledDate;
delivery.scheduling.delayed = 1;
logWarning("Rescheduling the delivery to "+scheduledDate);
}
Step-4: In Typology tab, Add all the typologies from your environment including out of the box's Default typology and Save it.
So, as mentioned before, if the delivery is triggered after 8PM, delivery will get postpone to next day's 9AM.
And if the delivery is triggered before 8AM, then the delivery will get postponed to same day's 9AM. So that any recipient won't be receiving email or any communications during OFF time.
In Delivery > Audit tab, you can able to see the below warning, and the delivery will be Rescheduled.
Hi @ogonzalesdiaz ,
This cannot be done by making some global system setting in deployment wizard.
Rather, you can create a control typology rule and assign it to all typology in your instance.
Try the below approach, if the delivery is triggered after 8PM, this will postpone to next day's 9AM. And if the delivery is triggered before 8AM, delivery will get postponed to same day 9AM. So that any recipient won't be receiving email during OFF time.
Step-1: Create a new typology rule
Step-2:
In general tab,
select Rule type as 'Control'
Channel: All channels
Level: Warning
Step-3: In Code Tab, paste the below script
var Hour = formatDate(new Date(), "%2H");
if( Hour >= 20)
{
logWarning("Delivery is triggered during OFF time");
var hour1 = ((24-parseInt(Hour)+9))*60*60*1000;
var scheduledDate = new Date(new Date().getTime()+parseInt(hour1));
delivery.scheduling.contactDate= scheduledDate;
delivery.scheduling.delayed = 1;
logWarning("Rescheduling the delivery to "+scheduledDate);
}
if( Hour < 8)
{
logWarning("Delivery is triggered during OFF time");
var hour1 = (9-parseInt(Hour))*60*60*1000;
var scheduledDate = new Date(new Date().getTime()+parseInt(hour1));
delivery.scheduling.contactDate= scheduledDate;
delivery.scheduling.delayed = 1;
logWarning("Rescheduling the delivery to "+scheduledDate);
}
Step-4: In Typology tab, Add all the typologies from your environment including out of the box's Default typology and Save it.
So, as mentioned before, if the delivery is triggered after 8PM, delivery will get postpone to next day's 9AM.
And if the delivery is triggered before 8AM, then the delivery will get postponed to same day's 9AM. So that any recipient won't be receiving email or any communications during OFF time.
In Delivery > Audit tab, you can able to see the below warning, and the delivery will be Rescheduled.
Hello @ogonzalesdiaz
This can be a bit tricky and even after a workaround, there is still a possibility of customers getting the emails.
There is no best practice or accurate solution available for this. But you will have to Javascript heavily to accommodate all these scenarios.
hi @ParthaSarathy , where do you find documentation about the objects:
delivery.scheduling.contactDate
For example, here you use the "delivery" object and access its scheduling process. and contactDate property. I didn't know about these. Where may I find the docs?
Views
Replies
Total Likes
@ogonzalesdiaz , not sure about the documentation link, but when you trigger a delivery or create a new delivery and set a scheduling time, the delivery will get triggered during the contact date of the delivery.
And in nms:delivery schema, contact date will be stored in as [scheduling/@contactDate]
@ParthaSarathy will this work with deliveries with "waves" activated?
Also, how would this handle retries?
Views
Replies
Total Likes
@ogonzalesdiaz , As Manoj mentioned, there is no accurate solution for this when it is scheduled as a wave. Mostly wave scheduled campaign will be used for one time send campaigns and not for recurring campaigns. So you can advise the campaign developers to schedule a wave campaign which will not have a wave scheduled after 8PM.
Lets say the campaign is planned to trigger at 7PM in 4 waves, then Campaign developer needs to give scheduling as below (by giving 14hrs gap between 1st and 2nd wave, so that 2nd wave will get triggered at next day 9AM)
Views
Likes
Replies
Views
Likes
Replies
Views
Likes
Replies