Need to setup a generic logic to stop the recurring deliveries on sunday and holidays

Avatar

Avatar
Validate 1
Level 1
roopals56103587
Level 1

Likes

2 likes

Total Posts

2 posts

Correct reply

0 solutions
Top badges earned
Validate 1
Boost 1
View profile

Avatar
Validate 1
Level 1
roopals56103587
Level 1

Likes

2 likes

Total Posts

2 posts

Correct reply

0 solutions
Top badges earned
Validate 1
Boost 1
View profile
roopals56103587
Level 1

20-09-2019

Hi all,

I need to develop a logic within Adobe campaign classic to stop the recurring delivery on sundays and holidays and delivery should be sent out on next working day in a way that it includes previous day target also. If there is Sunday and holiday in a row then next working day delivery should include all the recipient missed due to holidays.

Is there any way to achieve the same.

Thanks in advance.

Roopal

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar
Validate 1
MVP
Jean-Serge_Biro
MVP

Likes

353 likes

Total Posts

464 posts

Correct reply

153 solutions
Top badges earned
Validate 1
Boost 50
Boost 5
Boost 3
Boost 250
View profile

Avatar
Validate 1
MVP
Jean-Serge_Biro
MVP

Likes

353 likes

Total Posts

464 posts

Correct reply

153 solutions
Top badges earned
Validate 1
Boost 50
Boost 5
Boost 3
Boost 250
View profile
Jean-Serge_Biro
MVP

24-09-2019

1836987_pastedImage_0.png

Answers (3)

Answers (3)

Avatar

Avatar
Contributor
MVP
Raj_bounteous
MVP

Likes

90 likes

Total Posts

97 posts

Correct reply

32 solutions
Top badges earned
Contributor
Shape 1
Give Back 10
Give Back 5
Give Back 3
View profile

Avatar
Contributor
MVP
Raj_bounteous
MVP

Likes

90 likes

Total Posts

97 posts

Correct reply

32 solutions
Top badges earned
Contributor
Shape 1
Give Back 10
Give Back 5
Give Back 3
View profile
Raj_bounteous
MVP

05-10-2019

Hi,

i have used javascript to check if particular day is weekend or US holiday or any company specific holiday and also hard coded few dates based on business rules. Attached is sample code and not the actual code I have used.

var holidays = { // keys are formatted as month,week,day
  
"0,2,1": "Martin Luther King, Jr. Day",
  
"1,2,1": "President's Day",
  
"2,1,0": "Daylight Savings Time Begins",
  
"3,3,3": "Administrative Assistants Day",
  
"4,1,0": "Mother's Day",
  
"4,-1,1": "Memorial Day",
  
"5,2,0": "Father's Day",
  
"6,2,0": "Parents Day",
  
"8,0,1": "Labor Day",
  
"8,1,0": "Grandparents Day",
  
"8,-1,0": "Gold Star Mothers Day",
  
"9,1,1": "Columbus Day",
  
"10,0,0": "Daylight Savings Time Ends",
  
"10,3,4": "Thanksgiving Day"
};
function getDate(year, month, week, day) {
  
var firstDay = 1;
  
if (week < 0) {
  month
++;
  firstDay
--;
  
}
  
var date = new Date(year, month, (week * 7) + firstDay);
  
if (day < date.getDay()) {
  day
+= 7;
  
}
  date
.setDate(date.getDate() - date.getDay() + day);
  
return date;
}
function getHoliday(month, week, day) {
  
return holidays[month + "," + week + "," + day];
}
function getDateString(year, month, week, day) {
  
var date = getDate(year, month, week, day);
  
var holiday = getHoliday(month, week, day);
  
var dateString = date.toLocaleDateString();
  
if (holiday) {
  dateString
+= " \xa0\xa0\xa0" + holiday;
  
}
  
return

Avatar

Avatar
Validate 1
MVP
Jean-Serge_Biro
MVP

Likes

353 likes

Total Posts

464 posts

Correct reply

153 solutions
Top badges earned
Validate 1
Boost 50
Boost 5
Boost 3
Boost 250
View profile

Avatar
Validate 1
MVP
Jean-Serge_Biro
MVP

Likes

353 likes

Total Posts

464 posts

Correct reply

153 solutions
Top badges earned
Validate 1
Boost 50
Boost 5
Boost 3
Boost 250
View profile
Jean-Serge_Biro
MVP

23-09-2019

Hi Roopal,

2 solutions:

  • use of Incremental Query activity in your workflow: each execution takes the data not already treated. So when something is suspended, it takes the old data (your weekend data) to send it at next execution planified; please see the 2nd tab of the activity, it includes the planification for execution, so you must not set an Planification activity before.
  • do it by your own, with an instance variable or an xtk:option (with getOption at the workflow start and setOption at the end) to set the last record treated. And please put the variable in the Query criteria filters.
    Of course with a planification activity must be put before the Query activity.


Regards
J-Serge

Avatar

Avatar
Validate 1
Level 1
roopals56103587
Level 1

Likes

2 likes

Total Posts

2 posts

Correct reply

0 solutions
Top badges earned
Validate 1
Boost 1
View profile

Avatar
Validate 1
Level 1
roopals56103587
Level 1

Likes

2 likes

Total Posts

2 posts

Correct reply

0 solutions
Top badges earned
Validate 1
Boost 1
View profile
roopals56103587
Level 1

23-09-2019

Hi Jean,

Thank you for suggestion.

Could you please explain more on planification activity. May be a screenshot will help.