09-30-2014 11:33 AM - edited 03-15-2019 06:02 AM
I have the need of assigning a future start date/time and future end date/time via parameter values for special events outside of normal operating hours, which a ccx script can compare to the current date/time to determine next course of action. The comparison is done in a 4 level nested IF statements
IF currentdate >=parameterstartdate Then
IF currenttime >= parameterstarttime Then
IF currenttime <= parameterendtime Then
IF currentdate <=parameterenddate Then
set CallQue_Status = "open"
False
False
False
False
As a vb programmer, I wanting to create variables that convert date and time into intergers for the comparison, however I see CCX is java base and the GUI value expression builder date methods for assigning values are not making sense to me.
Is there a good video or doc for how to use the GUI expression builder or should I be trying to make these comparions with strings?
09-30-2014 03:05 PM
Hello-
You can take a look at the programming guides for the version you're running here:
http://www.cisco.com/en/US/products/sw/custcosw/ps1846/products_programming_reference_guides_list.html
The main docs you'll want to look at are:
Cisco Unified Contact Center Express Editor Step Reference Guide
Cisco Unified Contact Center Express Expression Language Reference Guide
Cisco Unified Contact Center Express Getting Started with Scripts
You can also take a look at the screenshot that I attached which is how I would approach it, but note that this does not take Timezone into account.
You can also search for "holiday schedule" and there are a few additional ways to expand this.
DJ
10-06-2014 12:37 PM
That works in most instances, as you can see in the attached jpg, comparing hours seperately with end hour before a start time in relation to existing time does not awlays work. 11am > 10am AND 11am <3am =bad logic. This is resolve by just using the full date/time and ensuring you enter it correctly, second jpg.
Oddly however, removing the accept and terminate and making the second example a subflow from the priamry script does not do the comparision in the If statement correctly and leaves the CallQue_Status = "Debug"
Do I need to initalize the CurrentDate in the parent script and pass that to the subflow as well?
10-06-2014 01:02 PM
I see. I was under the assumption that you would only need to be open each day within that time-frame from say 8:00AM-10:00PM, not going partly into the next day.
You shouldn't need to. What does your Call Subflow step look like?
DJ
10-06-2014 01:48 PM
10-06-2014 02:11 PM
Try passing the special date / time information as well. I assume it's still hard coded for testing, but parameters are not checked for a script called as a subflow. The input mapping should be Start/End Date/Time and the output mapping should be callque_status.
DJ
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide