cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
891
Views
5
Helpful
3
Replies

TOD routing during a Holiday

Mark Verwey
Level 1
Level 1

I'm working on a change to one of my call center scripts that will 1st check to see if the date matches a list of holidays (holiday.xlm) then look at the time of day.  If the TOD is a match then the statement would be true otherwise it would be false.  I have the holiday date check already working, it looks at the xml file and if it finds a match then sets a flag to true, other wise its false.  My problem is when the flag is true I need to match the date to a time of day before saying its true.  Each of the dates has different times they want it to be true.

Hope this makes since, if not please ask so I can try and clairify.

1 Accepted Solution

Accepted Solutions

If this schedule only applies to these dates and hours, then try this... 

Add the following variable;

sTodaysDate [String] = ""

Within your script, add the following steps;

Set sTodaysDate = D[now].month + "/" + D[now].dom

Followed by;

Switch String ( sTodaysDate )

Within the Switch statement, add the following values;

"11/23"

"11/24"

   *Make sure you include the " " as well.

Under the Connections column, type whatever name you want to help you identify this branch... for example, the connection for "11/23" might be Nov23.

Under each branch of the Switch statement, you can insert the Time of Day step and determine the hours of operation.

If you want, you can declare the D[now].year as well. That way, if you forget to remove these steps... you won't have to worry about these rogue steps implementing on the same date/time next year.

 

View solution in original post

3 Replies 3

Mark Verwey
Level 1
Level 1

More information to attempt to clarify what I am asking.  Here are a couple of the dates and times:

11/23/17 from 5pm to 12am

11/24/17 from 12am to 6am

12/24/17 9pm to 12am

I think you get the idea, is there a way to write it in IF statement that if the date_strg = D(Now) and TOD = 5pm - 11:59pm the entire if statement is true.

 

With this in mind I'm guessing I would need to have multiple IF statements back to back.

 

 

If this schedule only applies to these dates and hours, then try this... 

Add the following variable;

sTodaysDate [String] = ""

Within your script, add the following steps;

Set sTodaysDate = D[now].month + "/" + D[now].dom

Followed by;

Switch String ( sTodaysDate )

Within the Switch statement, add the following values;

"11/23"

"11/24"

   *Make sure you include the " " as well.

Under the Connections column, type whatever name you want to help you identify this branch... for example, the connection for "11/23" might be Nov23.

Under each branch of the Switch statement, you can insert the Time of Day step and determine the hours of operation.

If you want, you can declare the D[now].year as well. That way, if you forget to remove these steps... you won't have to worry about these rogue steps implementing on the same date/time next year.

 

your answer is the exact thing I ended up doing before you posted it.  It was easy to write and just a simple to implement.

 

Thanks for your assistance.