UCCX Scripting, Time variable

I am looking for  guidance on UCCX scripting. I have searched all the forums but can't  find what I am looking for. I want to be able to close Contact Center at  different times for different Service Queues on Holidays. For example,  Customer Service closes 5 pm on the day before holiday, but Helpdesk  does not close till 11:30 on the day before holiday. How can i  incorporate time in my script. I am using XML file with Holiday dates as  of now. Any help will be appreciated.
Scenario:
Sales: Close 12/23/13 at 5:00 PM and re-open 12/26/13 at 7:00 AM
Help Desk: Close 12/24/13 at 1:30 AM and re-open 12/26/13 at 6:00 AM

Take a look at the examples available from script repository:
Cisco Unified Contact Center Express Script Repository 9.0(2)
Chris

Similar Messages

  • UCCX changing time variables from AM to PM and vice-versa

    Hi all.
    I have an extremely irritating issue that I'm hoping someone can shed some light on.
    I'm currently making improvements to one of our contact centre scripts. We require to activate redirection on the fly quite often, and in the past I used a modified script with different time of day tests.Going forward I wanted to provide the ability for this to be activated and times set through the GUI.
    So I made some variables as parameters, of note these are RedirectOperation (boolean), RedirectFrom (Time) and RedirectUntil(Time).
    The flow is that if RedirectOperation is true, a time test is performed to dictate when we redirect - this is in the form of:
    (T[now] >= RedirectFrom) && (T[now] <= RedirectUntil)
    Now I know I can use T[now].before(xxx) etc but the operation itself isn't the issue, it does work perfectly fine this way, but the times change from AM <<>> PM under certain conditions.
    To explain:
    I set the default (on the script itself) RedirectFrom to "T[6:00:00 PM]" and RedirectUntil to "T[11:59:59 PM]".
    When debugging the script, I can see that the system changes the times from PM to AM (under the variable list on CCX editor during a reactive debug) ! That's if I've not selected these parameters on the GUI. If however, I do select the parameters and still use the default values, when debugging, they stay as PM!!
    This is surely a bug??
    To try something else, I changed my time format to 24 hour clock - so 18:00:00 and 23:59:59 respectively. I can set these on the script itself, and if the parameters are unchecked and left at default, it works fine. However when I select the parameter and try to change the times to (for example) 19:00:00 and 22:59:59, the GUI spits an error saying:"* Please enter a valid date for the Date configurable variable." I can only assume there is a mismatch between what you're allowed to put into the script and what the GUI thinks you're allowed to.
    But certainly the script surely should not be changing between AM and PM when a variable is left to default??
    Any ideas would be greatly appreciated!
    Thanks in advance.
    Scotty

    After choosing your start time you should be able to click to the right to change from AM to PM or vice versa by using the up/down button.  I just did it.
    If your DVR is not cooperating, try rebooting it.

  • UCCX scripting time comparison

    hello all,
    I need your assistance.
    my customer wants to know for how long a call is been in the queue.
    I know how to get the time and keep track of the  time since the call was in the queue until the call was indeed anwered.
    my question is how do i make the math here
    when i grab the time the format is
    1:00:00 AM/PM
    I don't think i can just substract the time. do i need to divide the number into hours, minutes and seconds and then substract each of them individually and them put them together ? or whats the most efficient way to do it ?
    thanks
    I'm working on UCCX 8.5.1 SU3

    It's possible to do math on time values, but it's very cumbersome and it's difficult to do correctly. Bear in mind things like seasonal time changes, timezones, leap years, leap seconds, etc. The "Get Reporting Statistic" step would answer your question easily and directly.
    You can call that at any point during your caller's hold loop to see how long they've been waiting, in seconds. Naturally, if you'd like minutes, just divide the result by 60. If you're using that for some sort of holding-too-long escalation threshold, then that should be all you need. If there's some reason you need the hold time at the moment the call goes to the agent, you should be able to use Select Resource with Connect set to "no" and call it in the Selected branch, and then Connect the call, but I'm not sure why you would need that.
    If this doesn't solve your problem, please let us know exactly why and when you need the time in queue and we might be able to help more.

  • UCCX Scripting - Open/Close time of day is different on some days

    All,
    I currently have a simple UCCX script with a DOW and TOD variable set, but need to make an adjustment to accommodate a new schedule for a call center queue.  My DOW is Monday - Friday, and TOD is set to 8am-5pm.  I need to make a change to where say Wednesday is set to not close the queue until 10pm.  How do I make that happen?
    This is the way it shows in the editor:
    DOW: Monday-Friday
     +open:
      ++8am-5pm:
       +++Goto yadayada
      ++TheRest
     +Closed
    If I need Wednesday's queue to stay open between the hours of 8am and 10pm, what logic do I need to put in?  I'm thinking I'll have to add an IF Statement, but not sure where to start.  Any ideas?

    I was able to figure this out.  Below is what I did:
    Created two new Day of Week options and selected the corresponding days.  Under each, I moved the Time of Day statement and assigned the time ranges, then selected the goto statement and assigned it as needed per my script.  
    This should provide the logic I was needed.  

  • Working with TimeZone variables in UCCx script

    Hi Team
    I'm wondering if you guys could help me to find out the best way to work with TZ variables in UCCx script.
    Because of different countries customer has a branches, I need to setup different TimeZones for each country handled by the same centralized UCCx.
    In this post they use Java to work with TZ, however, but I prefer another way to work with TZ variables:
    https://supportforums.cisco.com/discussion/11851751/how-make-uccx-holiday-script-timezone-aware
    My idea is to work with Time Zone variables in the script, so what I did was to create different TZ variables and each one of the them assigned the proper timezone based on the country, so depending of the Trigger involved (DNIS), I can find witch country this call came from and give the right timezone.
    The problem I have is that at the time I want to add or subtract two variables of TZ, I got an error because of the syntax. I've been trying different options, but until now, no luck.
    Would you mind you guys who had been working on this let me know what is the right syntax to add or subtract TimeZone variables un UCCx?
    Thanking you in advance
    Martin

    Hi
    I've been working on TZ's recently... see this post:
    https://supportforums.cisco.com/discussion/12474756/how-check-daylight-saving-within-uccx-script
    My approach in the scripts was that basically I allow the department to set their opening hours in the timezone of their choice.
    They have a management web page served from CCX that accepts start/end times each day, and a timezone. That all gets stored in XML.
    In the script, based on that information I get the current time in whatever timezone is set, and compare that to the XML open/close times.
    Similarly for holidays, I get the current date/time in the holiday TZ and compare the holidays to that.
    Aaron

  • DB Read error from UCCX Script

    Hi All,
    We are running uccx 7.0.
    Trying to return data from DB using stored procedure from the uccx script.
    We are able to run this when we pass explicit value instead of variable ANI.
    But whenever we provide variable ANI, we get below
    error: SQL statement varible not defined : ANI
    Query which provided in the DB Read as below,
    select * from  table(credit_back.fun_select_point($ANI));
    Request your help on it..
    Regards,
    Shalid K.C

    Yes Gergely.
    we have created new script and when i add DB Read function in the script, it is not allow to apply it, same time it is giveing the above mentioned error.
    but when i test it with explicite value it is working.. .not working by providing variable name
    Regards,
    Shalid

  • UCCX scripting, Voicemail?

    I'm creating a new UCCX script and I have a question regarding voicemail fwd when no
    agents are available. I know that I need to add the 'Get Reporting' stat before the menu,
    but I'm not sure where to place it. Also, I wanted to make sure that I wouldn't be using
    to many uccx ports. I have attached the script . I will appreciate if someone can edit it for me.

    mislam2
    I place my get reporting step right before a caller would go to the queue.  If not agents are available or the average queue time is too high I set a transfer string variable and send the caller to the voice mail box.
    You should not have to worry about using too many ports.  Once the caller is transferred the uccx port is done with the call.
    HTH

  • UCCX Scripting issue

    Hello,
    I'm desiging a UCCX Script ,  If  No agents Logged In -> Yes, There will be a prompt  -> End
    If  No agents Logged In -> No, There will be two prompts
    Prompt1: If you are calling for CC issue, press 1
    Prompt2: If you have TS question, press 2
    If caller press either 1 or  2  there will be a prompt : Please note call may be monitored for QA -> then call will be in the Queue to agents
    If caller won't press neither 1 nor 2 call should move to Receptionist Ready status check and if receptionist avalable, there will be a prompt :If you have other inquiries ,press 0 and then call will be in Queue to Receptionist.
    If Receptionist is not avaialable, there will be  a prompt : Thank you for calling please call back at a later time -> End
    Hope you understood, If caller didnt press either 1 or 2 call should jump to Receptionist ready status check .
    How can I accomplish this within the script  after playing two prompts if No agents Logged In -> No?
    Can any body suggest me which step to be used on this occation?
    If would appreciate if you can explain me in details.

    You will need at minimum 1 variable: an Integer and named something like "logged_in_agents"
    You will need at minimum 3 steps: a Get Reporting Stats step, an If step, and a Menu Step.
    Looks something like this:
    Variables
    int logged_in_agents = 0
    Script
    ...your beginning script steps are omitted...logged_in_agents = Get Reporting Statistics (Logged In Agents in "HelpDesk_CSQ")if (logged_in_agents == 0)  true    menu      option 1    ...whatever menu options you have...  false    menu      option 1    ...whatver other menu options you have...

  • How to update XML file through UCCX script ?

    Hi,
    I have an UCCX script with MENU step. One of the step is for technical support team. When caller chose this step, information about date and time of the call and calling number should be recorded on a XML file located on the web server.
    This XML is uploaded into the web server , but I don't know how to update it through UCCX script.
    Here is how the XML file looks like:
    <?xml version="1.0" ?>
    <rss version="2.0">
    <channel>
    <title>CALL LOG</title>
    <link></link>
    <description>Support Call log</description>
    <ttl>1</ttl>
    <item>
    <title>2011-08-24 14:56:39 - 00044 123 123 123</title>
    <link></link>
    <description></description>
    </item
    </channel>
    </rss>
    Any idea?
    Thanks,
    O

    Hi
    The 'keyword transform' step uses the template XML file to generate the actual XML file you want to post... the template would be a plain text file uploaded to the repository, and would look like so:
    <?xml version="1.0" ?>
    CALL LOG
    Support Call log
    1
    %%calldatetime%% - %%clinumber%%
    Now - if you had that bit of XML, with correct time/number in it - have you verified know that you can definately just post that XML to a certain URL to get it on the server? Check with whoever manages that server exactly what you need to do to get it to appear - then worry about how you do that from UCCX. It may not be a matter of posting up that XML, you may need it in a different format or something..
    Aaron

  • UCCX script editor not working

    1-The loading bar down of the screen always loading and never finishes.Please  take a look to the attached picture.
    2-When i go to the uccx and want to change the server from hostname to ip address,i always get update failed.
    I am so new in uccx,help is appreciated.
    Thanks in advance.

    Hello,
    You have come to the right place to ask questions on UCCX.
    Please take some time to read through the product manuals, as they are full of good information and will answer most of your questions.
    UCCX Documentation Home Page
    http://www.cisco.com/en/US/customer/products/sw/custcosw/ps1846/tsd_products_support_series_home.html
    On to your two questions:
    1.  This is not a loading bar.  This bar is completely useless, and all it's telling you is how much memory the Editor has available to it in order to process things.  The button to the right is simply a "garbage collector" which will attempt to free up any abandoned memory, but mostly it just sits there looking pretty.  You really don't need to bother with either of these too status bar items, and can ignore them.
    Source: UCCX Scripting Volume 1 - Getting Started with Scripts
    2. It's been about two years since I've completed an install of UCCX, and therefore don't have this information fresh in my head.  I did spend  few minutes trying to find documentation on the topic, but to no avail.  I was only really able to read the Help page for that specific page (Help > For This Page), however, it didn't make a big deal about changing the value.  It simply says, change it and then click Save.
    Could you post the exact error message you are receiving?  Also, what is your intention with changing the hostname to IP?  Unlike CUCM where you may want to remove DNS dependency on the phones to communicate with the server, UCCX clients use the IP address regardless.  So perhaps it's not a necessary step?
    Anthony Holloway
    Please use the star ratings to help drive great content to the top of searches.

  • Procedure of mapping new UCCX script

    Hi Guys,
    Can you please tell me the procedure of correctly creating a trigger for a UCCX script?
    do I need to create a separate call control group all together or I can use existing one?

    Hi Shyam,
    Make sure before testing a script you have checked below:
    1. Unified CTI telephony Subsystem is InService
    2. The validation of Script is successful before uploading in script management.
    Yes , You can do a reactive script to check if trigger is hitting the script.
    Set the reactive script, once you make a call the script will reloaded and you will come to know that the script is triggered.
    Step 1: in Script Editor , go to Debug-->Reactive script
    Step 2: Select the Script you want to monitor from dropdown and set the timer timer
    Step 3: Call the Route point (trigger), the script will reloaded with the red mark. So you can to know the script is triggered.
    Step 4: You can debug the script by click step over button to check if any error is there in the script.

  • "Subroutines" in an UCCX script

    My days as a former programmer are showing through. I always preferred structured code. So in that regard, does anyone have a mechanism for creating a pseudo subroutine inside a UCCX script? I realize that I can create a subscript and call it from my original script, but I really don't want to do that for the few lines of code I need to execute.
    I have a few lines of code that I need to execute from various points in my script. I'm looking for a mechanism to allow me to "call" that from a point in my script and then return to that point.
    I could set a string variable with a value that defines where I'm at within my script, and then use a switch statement based on that string variable with a bunch of goto statements that will return me to the proper point. What would be better is the capability to modify the destination of a goto statement based on the variable. Does anybody have any other suggestions?

    Sadly you cannot reference a variable within the Goto step. The way you can do this within the same script is to set a variable, Goto the function, and then check the variable value at the end of the function to decide where to return to. You can use a Match step to evaluate that variable and have a different Goto step within each case.
    You may also want to read up on Trigger Application method instead of using subflows. This was a great improvment introduced in CCX5+. My answer to another thread gave a crash-course explaination of why it's better:
    http://forums.cisco.com/eforum/servlet/NetProf?page=netprof&forum=Unified%20Communications%20and%20Video&topic=Contact%20Center&topicID=.ee6fe12&fromOutline=&CommCmd=MB%3Fcmd%3Ddisplay_location%26location%3D.2cd3f333

  • Global time variable

    what syntax should I use to run a function within a script in variable time intervals? Would like to avoid having to use cron, iCal etc.

    Is this in Script Editor, or AppleScript Studio? AppleScript Studio is, as I mentioned, different. AppleScript Studio does not automatically enable the idle handler; you have to go to the main nib file, choose "File's Owner", and turn on the idle handler in the inspector, similar to the way you would handle a click on a button. It seems to use the same mechanics, though.
    As for getting it to work, let's see...
    Well, first off, get rid of the brackets after "on idle". You don't need them, and they may be screwing things up.
    Next, you probably don't want idle to get called every second, which is what this example is going to do. (It's returning nHours * nMins * nSecs, which is 1 * 1 * 1, which is 1.)
    Make sure you're saving the thing as a "Stay-Open" program in Script Editor.
    And, finally: keep in mind that the idle handler will only be called if you run the program stand-alone. If you're running it in Script Editor, the idle handler will never be called.

  • UCCX script to pull XML data

    Hello,
    My goal is to create a UCCX script that will run on a Standard license server. Basically, when a user dials a four digit "speed dial", I want them to be translated to a UCCX route point, that will take the original called number, and the calling number, and use that to create a URL that it will then query and retrieve the actual number that will need to be dialed.
    So my plan currently is to have a phone inside of a partition that has a translation pattern of XXXX. The called number gets translated to 1158, which is the trigger of the application on UCCX.
    The url I want to query will be something like this:
    http://localhost:35798/RestServiceImpl.svc/XML/1017/6314
    "Localhost" will eventually become the IP address of the server hosting IIS application that will provide the XML output. 1017 is the "speed dial" or the original called number, 6314 is the calling number.
    Going to that URL should return me this output:
    <XMLDataResponse xmlns="http://tempuri.org/">
      <XMLDataResult>
      <CallingXML>
      <Extension>6300</Extension>
      <SpeedDial>1001</SpeedDial>
      <PhoneNumber>918005551212</PhoneNumber>
      </CallingXML>
      </XMLDataResult>
    </XMLDataResponse>
    This is the script as I have written it out so far:
    It does not seem to like what I have put together thus far when I try to validate it. I'm just wondering if I'm doing something that's obviously wrong.
    The end goal will be to take the NewNumber and dial it, while hiding it from the phone.
    Thanks,
    Mark

    Here's an update: I have the script retrieving the correct numbers and formulating the URL correctly. It also appears to be delivering the query from the XML.
    Here's what the XML looks like when I hit it from my browser:
    http://tempuri.org/
    ">
      http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">63141017918003551111
    When I do an Interactive Script Debug session and dial the number, I can see that there are two problems: 1) the NewNumber string is "null" by the time it gets to the step to do a Call Consult Transfer, and 2) the script just shows up a blank Exception.
    This tells me I am not parsing the XML correctly.
    Here is what I have currently:
    NewNumber = Get XML Data (xml, "/descendant::XMLDataResponse/child::XMLDataResult/child::PhoneNumber")
    Which based upon what I've read in Cisco's Volume 2 and elsewhere, should be correct.
    Notice in the screenshot that the XML data that UCCX pulls in looks different from when I look at it from my browser. I've also attached the script.
    Thanks,
    Mark

  • How to get tomorrows date in UCCX script

    I am trying to determine how to get tomorrow's date in UCCX. I am wanting to determine if today is the last day of the month by checking if tomorrow is the 1st day of the month. I currently use D[now].date to get today's date in some scripts. I tried the set command tomorrowDate = D[now].date + 1 and it showed 28 when today is the 27th, but I was thinking this was just adding 1 to the number returned by D[now].date and not actually showing the next day's date. I am thinking this might return 32 on Jan. 31st.
    Does anyone know how to get an acurate tomorrow's date in UCCX scripting?
    Thank you,
    Mark

    I got this to work after reading nowcommsupports' post. I hadn't thought of setting a date for a month with 31 days to 32 and having it converted to the 1st day of the next month. I did it something like the below:
    variables:
    todaysDay     int     D[now].date
    todaysMonth  int     D[now].month
    todaysYear     int     D[now].year
    tomorrowsDate     String     ""
    tomorrowsDay     int     0
    set tomorrowsDay = todaysDay + 1
    set tomorrowsDate = D[todaysMonth + "/" + tomorrowsDay + "/" + todaysYear]
    set tomorrowsDay = D[tomorrowsDate].date
    If the date is past the last day of the current month, it will role over to the next month. For example, 1/31/11 + 1 = 1/32/11 which is converted to 2/1/11 by the system.
    Now I use the int variable "tomorrowsDay" in the routing logic of my script knowing if it equals 1 then today is the last day of the month.
    I put this here in case it may help someone else and for my own records. I needed to know if it was the last day of the month for different hours of operation in our help desk script.
    Mark

Maybe you are looking for