Time comparison in UCCX scripting

Hi,
Need help in UCCX 8.5 scripting with opening and clsoing hours. I need to check for any incoming call if current system time is between 8 am to 5 pm then call should route to  CSQ otherwise it should route to voice mail.
Regards,
Dinesh Joshi

Hi Dinesh,
You can use the script and holiday xml file attached to this support forum as i recently worked on it.
Please make sure to change the dates according to you needs in the XML file.
https://supportforums.cisco.com/message/3930967
In you original script you will need to use "call subflow step" this way the call will go to that script check for holiday and return to your original script.
Use output mapping ( its available in the properties of call subflow step) to take the value of variable "todayIsAHoliday" and tore the value in a variable in the original script.
Once that i done use "if step" to in properties todayIsAHoliday==ture
true
go to holiday prompt
false
go to continue with time of day check
Regards,
Chuck
Please rate helpful posts and identify correct answers.

Similar Messages

  • 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.  

  • 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

  • Use of Time in UCCX scripting

    Hi,
        We are working on UCCX7.0(1) and have a scripting question. The requirement I have is to play a prompt for a defined set of time, say 5 minutes, in a loop. On the expiry of the time, the call should end. Following is the steps that I need to achieve-
    1) Play a message , Prompt1, asking the user to enter a digit.
    2) On timeout or invalid entry, loop through the Prompt1 unlimited number of times.
    3) But once the duration of the play reaches 5 minutes, end the call.
    I am not aware of checking this timer/duration within the script. This seems pretty basic but Iam a novice to scripting, so any help is highly appreciated.
    Thanks,
    DM

    It works!! You are right, I will not be able to time it to exactly 5 minutes but the customer is fine with it.
    I just had to tweek the code a tiny but in oder to compare 2 Long values :
    if (EndTime - StartTime) >= (300000.longvalue()) then
         Goto End
    Else
         Goto Prompt_Label.
    Thanks a ton!!
    DM

  • 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.

  • 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

  • Wait time announcement on UCCX

    Hi all,
    Our customer have a requirement to play back the wait time using UCCX IVR, in short when the customer calls and placed in to queue, IVR has to playback the wait time to the customer , which will help them to know how long they need to wait in queue until to get an available agent.
    Let me know how this can be done using the UCCX script.
    UCCX Version: 7.1
    Any help would be highly appreciated.
    Thanks,
    Shaijal

    HI Shaijal
    Yes, this is possible. The attached link gives a very brief overview of what you need to do:
    http://www.learnios.com/viewtopic.php?f=9&t=26675
    Basically your script can use the "Get Reporting Statistic" on the CSQ to retrieve the estimated wait time (in seconds). Once you have this information in variable within a script you can then play a prompt etc. I would use your script to round up to the nearest minute.
    The above forum post is from back in 2006 and version 4.x, however still looks valid to me.
    There's a good point in the post about replaying wait times / queue positions if the caller is on hold. If you have implemented priority queuing for incoming callers there is a chance that people's queue times could increase if higher priority calls come in so be careful.
    Hope this helps. Barry

  • Time Comparison PHP

    Hi There
    I am trying to create a time comparison for a website I am building.
    I have the following so far
    <?php
    $date=$_POST ['daydropdown'];
    $month=$_POST ['monthdropdown'];
    $year=$_POST ['yeardropdown'];
    $datevalue="$date/$month/$year";
    $booking=strtotime ("now + 24 hours");
    if ($date_value > $booking)
    echo ("lovey");
    else
    echo ("tut tut");
    ?>
    which is pulling its date info from
              <form action="timetest.php" method="post">
              <table>
      <tr>
        <td class="tableheight">
          Party Size</td>
        <td>
          <select name="partysize" size="1" id="partysize">
          <option>1</option>
          <option selected="selected">2</option>
          <option>3</option>
          <option>4</option>
          <option>5</option>
          <option>6</option>
          <option>7</option>
          <option>8</option>
          <option>9</option>
          <option>10</option>
          <option>11</option>
          <option>12</option>
          <option>13</option>
          <option>14</option>
          <option>15</option>
          <option>16</option>
          <option>17</option>
          <option>18</option>
          <option>19</option>
          <option>20</option>
        </select>
        </td>
      </tr>
      <tr>
        <td class="tableheight">Date</td>
        <td>
    <select name="daydropdown" id="daydropdown">
    </select>
    <select name="monthdropdown" id="monthdropdown">
    </select>
    <select name="yeardropdown" id="yeardropdown">
    </select>
    </td>
      </tr>
      <tr>
        <td class="tableheight">Time</td>
        <td><select name="time">
          <option>12 noon</option>
          <option>12:15pm</option>
          <option>12:30pm</option>
          <option>12:45pm</option>
          <option>1:00pm</option>
          <option>1:15pm</option>
          <option>1:30pm</option>
          <option>1:45pm</option>
          <option>2:00pm</option>
          <option>2:15pm</option>
          <option>2:30pm</option>
          <option>2:45pm</option>
          <option>3:00pm</option>
          <option>3:15pm</option>
          <option>3:30pm</option>
          <option>3:45pm</option>
          <option>4:00pm</option>
          <option>4:15pm</option>
          <option>4:30pm</option>
          <option>4:45pm</option>
          <option>5:00pm</option>
          <option>5:15pm</option>
          <option>5:30pm</option>
          <option>5:45pm</option>
          <option>6:00pm</option>
          <option>6:15pm</option>
          <option>6:30pm</option>
          <option>6:45pm</option>
          <option>7:00pm</option>
          <option>7:15pm</option>
          <option>7:30pm</option>
          <option>7:45pm</option>
          <option>8:00pm</option>
          <option>8:15pm</option>
          <option>8:30pm</option>
          <option>8:45pm</option>
          <option>9:00pm</option>
          <option>9:15pm</option>     
    </select></td>
      </tr>
      <tr>
        <td class="tableheight">First Name</td>
        <td><input name="firstname" type="text" placeholder="Your First Name" /></td>
      </tr>
      <tr>
        <td class="tableheight">Surname</td>
        <td><input name="surname" type="text" placeholder="Your Last Name"/></td>
      </tr>
      <tr>
        <td class="tableheight">Email Address</td>
        <td><input name="email" type="email" placeholder="Your Email Address"/></td>
      </tr>
      <tr>
        <td class="tableheight">Confirm Email </td>
        <td><input name="confirm" type="email"  placeholder="Confirm Email"/></td>
      </tr>
      <tr>
        <td class="tableheight">Contact Number</td>
        <td><input name="contactnumber" type="text" placeholder="Your Contact Number"/></td>
      </tr>
      <tr>
        <td style="padding-top:0px"><input name="Book Now" type="submit" value="Book Now" /></td>
        <td></td>
      </tr>
    </table>
              </form>
              <script type="text/javascript">
    //populatedropdown(id_of_day_select, id_of_month_select, id_of_year_select)
    window.onload=function(){
    populatedropdown("daydropdown", "monthdropdown", "yeardropdown")
    </script>
    What I want to happen is if a booking for a table is made for more than 24hours in advance then its fine and sends the reservation to the restaurant aka "Lovely" where as if its for within the next 24 hours then "tut tut" they are told to ring the restaurant.
    Does anyone have any pointers for me please.
    G

    You need to change the $datevalue variable to a timestamp like you did with $booking.
    $dateTried = strtotime($datevalue); 
    Then you can compare them.
    if ($dateTried < $booking) {      // this is what to do if the time chosen was within 24 hours } else {      // this is what to do if the time chosen was a valid value (24 hours or more from current time) } 
    BTW, it looked like your form fields are populated using JavaScript. If I were you I would switch that to be PHP driven. The code will be very similar in PHP as your JavaScript code, but it will work for all your visitors, not just the ones that have JavaScript enabled.
    -Jason
    Sorry the code didn't line up. I used the wrong code insert options.
    Message was edited by: UteFanJason

  • 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

  • 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.

  • 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

  • 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

  • Download all UCCX scripts from Contact Center

    Hey all,
    I'm faced w/ a particular problem that I haven't been able to solve yet: I'm trying to download all the scripts that live on our UCCX server to create a backup. In the past, when our Contact Center was windows-based (pre-8), I would just navigate to the AVVID folder and grab them, but now we're on the application model (8.5.1SU1) and I don't see a corollary to that here.
    Is there any way to download all the Scripts at one time, instead of going script by script and hitting download?
    Much appreciated. Thanks guys!
    Kyler
    Fort Collins, CO

    Amre,
    I was never able to get to this before leaving my position.
    I very much suspect a full export of the tar file will contain an unencrypted copy of the scripts and all associated files, but I'm not certain.
    Good luck!
    kyler

  • 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...

Maybe you are looking for