cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
699
Views
10
Helpful
3
Replies

UCCX Holiday Script shows correct logic but still calls going to open hours:

asifkhan250
Level 1
Level 1

Hello Expert,

 

I have managed to create a Holiday check script and I can see during reactive debug it shows all of the logics correct but call goes to open hours, ideally it should go to closed hours and I am wondering if I did something wrong or required some modification in it. If anyone who is good in scripting please help me out on this as my business need this one out.

 

I did attach the screenshot of the reactive debug, please let me know your advise on this.

 

Regards,

Asif

 

 

 

1 Accepted Solution

Accepted Solutions

Anthony Holloway
Cisco Employee
Cisco Employee

The problem is with your If step:

 

If (holidayClosed == todaysDate) Then
  True
    Goto Closed
  False
    Goto Open

You already know that today is a holiday, because your Get XML Document Data step has found a match, else it would have returned null.

 

Just replace your If step condition with this condition:

 

If (closedForHoliday != null && closedForHoliday.trim().toLowerCase() == "true") Then
  True
    Goto Closed
  False
    Goto Open

View solution in original post

3 Replies 3

Anthony Holloway
Cisco Employee
Cisco Employee

The problem is with your If step:

 

If (holidayClosed == todaysDate) Then
  True
    Goto Closed
  False
    Goto Open

You already know that today is a holiday, because your Get XML Document Data step has found a match, else it would have returned null.

 

Just replace your If step condition with this condition:

 

If (closedForHoliday != null && closedForHoliday.trim().toLowerCase() == "true") Then
  True
    Goto Closed
  False
    Goto Open

Hi Anthony,
It did work :), you are awesome bro! keep up the good work.

Regards,
Asif Khan

Thank you! don't forget to rate the post as helpful too! Those of us who contribute to the forums like the points! :)