cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1653
Views
0
Helpful
5
Replies

Date/Time conversions for comparisions

GSCiscoSP
Level 1
Level 1

 

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?

 

5 Replies 5

djlundberg
Level 5
Level 5

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

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?

 

 

 

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

pretty simple, just passing the varible CallQue_Status In/Out which works ok, tried initalizing the CurrentDate in parent and also passing it which still calculates wrong.  Added IF statement and variable to parent script, no issues, just don't work as part of subflow.

 

 

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