I need to add a holiday schedule to my current script. Couple questions, is thier a step for this? If so can I use this one step for a whole year of holiday's or do I have to use this step multiple times in the script?
Any guidance or input would be greatly appreciated!
Take a look at the script repository for few examples on how to deal with holidays:
What kind of script ICM, IPCCX, QM, IPIVR?
If in ICM: there are date nodes you can add to the beginning of the scripts and route the calls accordingly.
If in the others: You can do it by/with reading an XML file using the Document objects. Is very simple, you would need to parse the date with a java string class.
Let me know what system you're using and maybe I can send you a sample.
This is how I did it in IPCC Express 4.
Basically is a java class capturing the day's date then parsing it and subsequently comparing the values against values found in the xml file.
You call this script via a "call subflow" object from your main script using/reading a boolean variable, in this case called "TodayIsAHoliday". Then in your main script you add commands according to the out come.
I don't know if there is a more efficient way of doing it but this worked out pretty well for me specially when adding or changing dates all I had to do is modify the XML file with notepad.
The XML file is located in the IPCC server in "C:\XML\". This directory does not exist by default, you have to created.
Thanks for the info, I have started adding the holiday steps to my script. One additional question though...the whole point of this is so when the script detects that it is truly a Holiday the "Holiday Recording" should play instead of the usual one.
Sounds like I am going to have to add a prompt some where in the new holiday section of the script?
If you use my script you end up with a true or false value on the TodayIsAHoliday boolean so if true you play the greeting and hang up, if false you go on normal.
Thanks for that script. I modified it alitte: I addded an open and close field for each holiday and it returns one of three strings; HolidayOpen, HolidayClose, and noHoliday.
Now, if the day is a holiday, it uses the open and close hours in the XML. That way, the call center can easily have reduced (or extended) hours on certain days without touching the .aef or needed to reload the script.
One thing I would like to add, however, is some error handling if the file doesn't exist or does not parse. If there is any error, I want to have it return noHoliday as a default. Any idea how I can do that? The Exceptions that are in there do not work; the script crashes if the xml is missing.
Check in the exception handling objects, there's probably something in there.
You could also default the values of the variables that wasy if they're not change you know somt thing is wrong.