Cisco Support Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Announcements
Users might experience few discrepancies in Search results. We are working on this on our side. We apologize for the inconvenience it may have caused.
New Member

Current Wait Time - HTML WallBoard

I am in the process of making a Wall Board for a new call center we’re putting in. One of the metrics I’d like to be able to show to the group would be the current wait time on the various queues.

I have created a script that goes out reads a simple HTML file. Pulls out CSQ Reporting statistics stores them in various variables. Then does a keyword trans form with the results from the variable back into the HTML document. Very simple and working fine for all metrics except current wait time, this always shows as -1. Ideally it would output in hh:mm:ss format. I’m not sure how to take an integer and output back into the desired format.

Thanks in advance.

UCCX 7.0(1)SR05_Build504

wallboard.jpg

script.jpg

~~~ Rate helpful posts Blog - http://tripplehelix.net
1 ACCEPTED SOLUTION

Accepted Solutions

Re: Current Wait Time - HTML WallBoard

Without going into a lot of detail, a -1 means the system cannot determine a metric at that instance.  So you can either treat it as a wati time of 0 or Invalid.

Your challenge seems to be, how to convert seconds into MM:SS.

Script:

wait_time = get reporting stats()

set wait_time = (wait_time < 1) ? 0 : wait_time

set conv_wait_time = "" + (wait_time / 60) + ":" +  (wait_time % 60)

Or if you want to pad single digits, change the last set to this:

set conv_wait_time = {

     int minutes = wait_time / 60;

     int seconds = wait_time % 60;

     return ((minutes < 10) ? "0" : "") + minutes + ":" + ((seconds < 10) ? "0" : "") + seconds;

}

Anthony Holloway

Please use the star ratings to help drive great content to the top of searches.
4 REPLIES

Re: Current Wait Time - HTML WallBoard

Without going into a lot of detail, a -1 means the system cannot determine a metric at that instance.  So you can either treat it as a wati time of 0 or Invalid.

Your challenge seems to be, how to convert seconds into MM:SS.

Script:

wait_time = get reporting stats()

set wait_time = (wait_time < 1) ? 0 : wait_time

set conv_wait_time = "" + (wait_time / 60) + ":" +  (wait_time % 60)

Or if you want to pad single digits, change the last set to this:

set conv_wait_time = {

     int minutes = wait_time / 60;

     int seconds = wait_time % 60;

     return ((minutes < 10) ? "0" : "") + minutes + ":" + ((seconds < 10) ? "0" : "") + seconds;

}

Anthony Holloway

Please use the star ratings to help drive great content to the top of searches.
New Member

Re: Current Wait Time - HTML WallBoard

Thanks for the information, now what may seem like a dumb question. Where does this script get placed at? Is this a custom script in the UCCX wallboard script or does this go into my HTML file?

If I'm following the top half of your post you've definded two variable:

conv_wait_time

and wait_time

Are these int variables? My guess would be that wait_time is as you're storing the reporting statistics into it.

Thanks

~~~ Rate helpful posts Blog - http://tripplehelix.net
New Member

Re: Current Wait Time - HTML WallBoard

I've spent some more time looking at this and I follow what you posted. It all goes into the script and I do define two new variables.

~~~ Rate helpful posts Blog - http://tripplehelix.net

Re: Current Wait Time - HTML WallBoard

That is correct.  Glad you were able to work it out on your own.  If this solved your question, would you mind updating the post to reflect that?

Anthony Holloway

Please use the star ratings to help drive great content to the top of searches.
1086
Views
0
Helpful
4
Replies
CreatePlease to create content