Route calls to specific number based on Date and Time

Hi,
UCCX 8.5.1.11001-22
I am trying to create a script that will route calls to a specific number after-hours.  The only catch is the number changes every week and rotates among 4 or 5 people.  I have seen several scripts and xml documents up that give me a good start but I just cant seem to figure out the process with the xml document and call flow of this one.  I do realize this is basically a programing question but if you could get me headed in the right direction it would help.
I am no stranger to UCCX scripting but a novice to xml integration.

I'm not sure what the SM toolkit is.  Could you explain it or provide a link?
If you and your collegaue are admins, then I would say skip the overhead of an XML document for now and just manage the schedule in a subflow.
Example:
Subflow Variables
String oncall_number_current = ""String oncall_number_avholloway = "916125551212"String oncall_number_jsmith = "916125551313"String oncall_number_default = "916125551000"Date today = D[now]
Subflow Script
StartSwitch int (today.month)  January (value == 1)
    /* In Jan, from the first to the fifteenth, Anthony is on call */    If (today.date >= 1 && today.date <= 15)
      True        Set oncall_number_current = oncall_number_avholloway
        Goto End of Script      False
    /* In Jan, from the sixthteenth to the thirty-first, John is on call */    If (today.date >= 16 && today.date <= 31)
      True        Set oncall_number_current = oncall_number_jsmith
        Goto End of Script      False
  Febraury (value == 2)    /* In Feb, from the first to the sixth, Anthony is on call */
    If (today.date >= 1 && today.date <= 6)      True
        Set oncall_number_current = oncall_number_avholloway        Goto End of Script
      False    /* In Feb, on the seventh, from midnight to noon, Anthony is on call */
    If (today.date == 7 && today.hod >= 0 && today.hod <= 11)      True
        Set oncall_number_current = oncall_number_avholloway        Goto End of Script
      False    /* In Feb, on the seventh, from noon to midnight, John is on call */
    If (today.date == 6 && today.hod >= 12 && today.hod <= 23)      True
        Set oncall_number_current = oncall_number_jsmith        Goto End of Script
      False    /* In Feb, from the eighth to the twenty-nineth, John is on call */
    If (today.date >= 8 && today.date <= 29)      True
        Set oncall_number_current = oncall_number_jsmith        Goto End of Script
      False  March (value == 3)
    ..etc, etc, building out the whole year...  Default
    /* Set the default on call number */    Set oncall_number_current = oncall_number_default
    Goto End of ScriptLabel End of Script
End
Main Script Variables
String oncall_number = ""
Main Script Script
...oncall_number = Call Subflow (SCRIPT[oncall-sublfow.aef], oncall_number_current)Call Redirect (--Triggering Contact--, oncall_number)...
In the example of January 3rd, the subflow would execute 4 steps.  That's not much at all.  Of course you would only call the subflow if the hours called for it.  This would eliminate unecessary calls to the subflow.
To update the oncall, just update the script, save, upload, refresh, and then refresh the apps which call it.  No down time at all!
I hope that makes sense.  If not, ask questions.
Anthony Holloway
Please use the star ratings to help drive great content to the top of searches.

Similar Messages

  • How to get the most current file based on date and time stamp using SSIS?

    Hello,
    Let us assume that files get copied in a specific directory. We need to pick up a file and load data. Can you guys let me know how to get the most current file based on date and time stamp using SSIS?
    Thanks
    thx regards dinesh vv

    hi simon
    i excuted this script it is giving error..
       Microsoft SQL Server Integration Services Script Task
       Write scripts using Microsoft Visual C# 2008.
       The ScriptMain is the entry point class of the script.
    using System;
    using System.Data;
    using Microsoft.SqlServer.Dts.Runtime;
    using System.Windows.Forms;
    namespace ST_9a6d985a04b249c2addd766b58fee890.csproj
        [System.AddIn.AddIn("ScriptMain", Version = "1.0", Publisher = "", Description = "")]
        public partial class ScriptMain : Microsoft.SqlServer.Dts.Tasks.ScriptTask.VSTARTScriptObjectModelBase
            #region VSTA generated code
            enum ScriptResults
                Success = Microsoft.SqlServer.Dts.Runtime.DTSExecResult.Success,
                Failure = Microsoft.SqlServer.Dts.Runtime.DTSExecResult.Failure
            #endregion
            The execution engine calls this method when the task executes.
            To access the object model, use the Dts property. Connections, variables, events,
            and logging features are available as members of the Dts property as shown in the following examples.
            To reference a variable, call Dts.Variables["MyCaseSensitiveVariableName"].Value;
            To post a log entry, call Dts.Log("This is my log text", 999, null);
            To fire an event, call Dts.Events.FireInformation(99, "test", "hit the help message", "", 0, true);
            To use the connections collection use something like the following:
            ConnectionManager cm = Dts.Connections.Add("OLEDB");
            cm.ConnectionString = "Data Source=localhost;Initial Catalog=AdventureWorks;Provider=SQLNCLI10;Integrated Security=SSPI;Auto Translate=False;";
            Before returning from this method, set the value of Dts.TaskResult to indicate success or failure.
            To open Help, press F1.
            public void Main()
                string file = Dts.Variables["User::FolderName"].Value.ToString();
                string[] files = System.IO.Directory.GetFiles(Dts.Variables["User::FolderName"].Value.ToString());
                System.IO.FileInfo finf;
                DateTime currentDate = new DateTime();
                string lastFile = string.Empty;
                foreach (string f in files)
                    finf = new System.IO.FileInfo(f);
                    if (finf.CreationTime >= currentDate)
                        currentDate = finf.CreationTime;
                        lastFile = f;
                Dts.Variables["User::LastFile"].Value = lastFile;
                Dts.TaskResult = (int)ScriptResults.Success;
    thx regards dinesh vv

  • Create condition based on date and time

    Hi everyone,
    I'm using Discoverer Plus 10g. I want to create a condition in my worksheet using StageTime (consists of date and time) as the parameter, i.e. StageTime > StartTimeParameter and StageTime < EndTimeParameter.
    I am able to create condition based on the date, but unable to create based on the time. I need to limit the data up to the hour, e.g.
    StageTime > 11-NOV-2005 1 AM and StageTime < 11-NOV-2005 3 AM.
    But so far I am unable to create a condition for the hour element.
    I try to use this:
    TO_DATE(TO_CHAR(:Start Date Parameter,'mm-dd-yyyy')||' '||:Start Hour||':00:00','mm-dd-yyyy hh24:mi:ss')
    Start Date Parameter is selected using the date picker in Discoverer Plus
    and the Start Hour is in the format '00' to '23'
    but was prompted with the error: ORA-015858 a non numeric character was found where a numeric was expected.
    Would really appreciate anyone's help on this! :)
    Thanks,
    Angeline :)

    how about, if :Start Date Parameter is of type DATE and :Start Hour is of type varchar2(2) to simply do
    :Start Date Parameter + to_number(:Start Hour)/24
    ?

  • How can I put current date and time in Photo Info (Print module)?

    I often use the Photo Info option in the Print Module to caption my proofs with File Number plus the date and time the print is made.  This allows me to match up the print to the History state for the image, so I know which print version I'm looking at.  I've always wanted to get Lightroom to automatically enter the date and time the print is made.  It obviously knows this info, since it stamps the History state with date and time.  Currently I have to modify my caption manually with Custom text each time I make a print.  This is a major PITA.  Has anyone figured out how to get Lightroom to do this?

    There is a Date/Time title in the titles browser, does just what it says...

  • Handling DATE and TIME in SELECT Statment

    Hey pros,
    I have this problem where I want to execute a select query based on date and time, but I want it to be handled in such a way which is better explained with this example:
    User enters a date range of Apr. 10 and Apr. 12
    User enters a time range of 9:00am - 10:00am
    The results I want would be from April 10 9:00am to Apr. 12 10am.
    The way I have it working today is that it shows me all data from Apr. 10-12 from 9am-10am on all days.
    Is there an easy way to do this?
    Here is my code (see the 3rd last and 2nd last line)  Thanks!
    SELECT vepowerks vepolgort vepo~matnr
              mara~mtart
              vepovenum vepovepos
              vekperdat vekperuhr vekpstatus vekpexidv
              "gc_bwart as bwart
              vepovemng vepovemeh
              vepo/cwm/vemng vepo/cwm/vemeh
        INTO CORRESPONDING FIELDS OF TABLE gt_tran
    INTO CORRESPONDING FIELDS OF TABLE itab
        FROM vepo
          INNER JOIN vekp ON
              vepovenum = vekpvenum
          INNER JOIN mara ON
              vepomatnr = maramatnr
        WHERE
              vepo~werks = p_werks    AND
              vepo~lgort IN s_lgort   AND
              vepo~matnr IN s_matnr   AND
              vepo~bestq = gc_bestq   AND
              NOT ( vepovemng = 0 AND vepo/cwm/vemng = 0 ) AND
              vekp~status = gc_status AND
              vekp~erdat IN s_erdat   AND
              vekp~eruhr IN s_eruhr   AND
              mara~mtart IN s_mtart.

    I think you might just have to select the date range, then do a loop and read table.
    select xx where date in date_range from x into table y.
    loop at y into wa_y.
      if wa_y-date = lower_date_limit. "this day has the 9am limit
        "only pick those records that have wa_y-time GE 9am.
        <your logic here>
      elseif wa_y-date = upper_date_limit. "this day has teh 12pm limit
        "only pick those records that have wa_y-time LE 12pm.
        <your logic here>
      else. "every day in between the dates
        "get all data no matter what the time is
        <your logic here>
      endif.
    I honestly don't know if there is a select-where clause that will do this automatically, but the above solution should work..hope this helps.
    --Juan
    Edited by: takeabyte on Apr 29, 2010 8:36 PM

  • Date and time stamp of user status does not appear

    Hi, gurus.
    For a specific transaction type, the date and time stamps for certain user statuses do not appear within the transaction although these missing date/time stamps are captured in the database upon checking by our ABAP.  It seems that this problem started when I added several statuses and rearranged their status numbers in the status profile last year.
    I'd also like to ask if it's really necessary that the statuses within the status profile and date profile should maintained in the same positions. 
    E.g.
    Status Profile                                                                               
    Status No.     ---       Status Code      ---            Short Text                                       
    10            ---                    IP1L                   ---       In Process 1st Level                        
    20            ---                    IP2L                   ---       In Process 2nd Level                          
    Date Profile
    Display Position   ---       Date Type
    1                          ---       In Process 1st Level       
    2                          ---       In Process 2nd Level
    We're going to create and assign a new status profile for the concerned transaction type.  We'll make sure that this status profile is sychronized with the date profile.  Hopefully, the date/time stamps will all be displayed in prospective transactions but the problem on the missing date/time stamps in historical transactions will still remain.
    Pls. help us.
    Thanks in advance,
    Theresa

    I'd also like to ask if it's really necessary that the statuses within the status profile and date profile should maintained in the same positions.
    No

  • Date and time for background job

    Hi,
    I am creating a program with out selection screen . This program runs based on date and time . so I need to create a table
    with date and time fileds.
    Program runs based on FROM DATE FROM TIME  TO DATE  TO TIME....... FROM DATE and FROM TIME  will get it from ztable and TO DATE & TO TIME values as SY-DATUM & SY-UZEIT. In the end I will update sy-datum and sy-uzeit values in the custom table to get the values ( Use it for from date from time ) for next run of the program.
    This program is mainly used for background job so how do we get the values of from date and from time for the first run of the program ? how do we update the latest date and time details by deleting old date and time details.
    Thanks ,
    Vinay.
    Edited by: Vinay parakala on Apr 22, 2010 9:18 AM

    First of all, I'll suggest to maintain TVARVC instead of doing it in custom table unless you need a complete log.
    As per my understanding, you are trying to fetch some records based on the time period(Delta loads).
    So, you will do an initial run to load the complete data then you will run it for time periods. For example,
    1st Load- 01/01/1991(earliest date possible) - today's date say 03/22/2010
    2nd load- 03/22/2010 - today's date
    so on............
    You have to move the to date values to from date values and to date value needs to be updated by the latest one for each load.
    Do you have any dependency on background job? Please let me know if my understanding is correct or specify your requirement in detail.

  • Search Bill for Phone Number. Date and Times?

    Hello-
    I am having a problem doing a search over the past 12 months for an individual number.
    Is there a quick and easy way to display the dates and times that I've placed a call to one specific number over the past 12 months?
    Thank you!

    YPP wrote:
    I was hoping for a way to search online and get a line by line display of dates for the calls made.
    If I have to download each pdf into a spreadsheet, combine them and do a search it will take a considerable amount of time.
    To reinforce Spiral's suggestion, if you go to the Usage Details tab you can download your data in csv format. Granted, downloading 12 files and stitching them together isn't as convenient as an online search. However, it's much easier to do this with csv downloads than it would be if you had to do the pdf-to-spreadsheet conversion yourself. And once you've pieced things together, the data are a lot of fun to play with.

  • Incrementing a string number for date and time

    There are probably a lot of ways to do this, but I only want to use a bunch of if - else loops if I really need to.
    I have a date and time for input, let's say 2006-04-19 22:00. In Java, if I convert that to 3 integers (year, month, day), it will output 2006-4-19. I need to be able to increment in a loop for every day and month from one date to the next. If I keep it as a string, I won't be able to increment the value though, (at least I'm not sure how). I'm thinking that even if I converted it to an integer and back to a string, that the leading zero would be removed.
    I found a post here that said something about formatting the number with 2 numbers, by using:
    DecimalFormat format = new DecimalFormat("00");
    format.format(1, sb, new FieldPosition(0));
    Or is there a way to use the gregorianCalendar stuff that would output the date with all of the zeros in place, while incrementing and looping correctly?
    Thanks.

    I would get a Date object--you can use java.text.SimpleDateFormat if you're starting with a String--and use that to create a GregorianCalendar. Then you can just call Calendar's add method to add one to whichever field you want. Use the SimpleDateFormat to turn the date back into a String for display again.
    Calculating Java dates: Take the time to learn how to create and use dates
    Working in Java time: Learn the basics of calculating elapsed time in Java
    Formatting a Date Using a Custom Format
    Parsing a Date Using a Custom Format

  • How to get fiscal period based on date and Fiscal year?

    Hi Guys,
               Can anybody tell me how to get Fiscal period based on date and Fiscal Year or fiscal year variant?
    Thanks,
    Gopi.

    Hi,
    Please refer the code below:
    *: Report:  ZFISCALYR                                                  :
    *: Date  :  2004                                                       :
    *: Description: Demonstrates how to return the corresponding fiscal    :
    *:              year and posting period for a company code and posting :
    *:              date or posting date and fiscal year variant.          :
    REPORT  zfiscalyr NO STANDARD PAGE HEADING.
    TABLES: ekko.
    PARAMETERS:     p_bukrs TYPE ekko-bukrs,
                    p_bedat TYPE ekko-bedat.
    DATA: gd_fiscalyr  TYPE bapi0002_4-fiscal_year,
          gd_fiscalp   TYPE bapi0002_4-fiscal_period.
    DATA: gd_fiscalyr2 TYPE T009B-BDATJ,
          gd_fiscalp2  TYPE bapi0002_4-fiscal_period.
    DATA: gd_periv     TYPE t009-periv.
    *START-OF-SELECTION.
    START-OF-SELECTION.
    * get fiscal year and period - (requires date and company code)
      CALL FUNCTION 'BAPI_COMPANYCODE_GET_PERIOD'
        EXPORTING
          companycodeid = p_bukrs
          posting_date  = p_bedat
        IMPORTING
          fiscal_year   = gd_fiscalyr
          fiscal_period = gd_fiscalp.
    * Alternative fiscal year function module
    * - (requires date and fiscal year variant code from T009 table)
    * gets first entry in fiscal year variant table (will need to choose
    * correct one from table rather than just using first entry)
      SELECT SINGLE periv
        FROM t009
        INTO gd_periv.
    * get fiscal year and period
      CALL FUNCTION 'DETERMINE_PERIOD'
        EXPORTING
          date                      = p_bedat
    *    PERIOD_IN                 = '000'
          version                   = gd_periv
       IMPORTING
          period                    = gd_fiscalp2
          year                      = gd_fiscalyr2
       EXCEPTIONS
          period_in_not_valid       = 1
          period_not_assigned       = 2
          version_undefined         = 3
          OTHERS                    = 4.
    *END-OF-SELECTION.
    END-OF-SELECTION.
      WRITE:/ 'From function module: BAPI_COMPANYCODE_GET_PERIOD',
            / 'Fiscal year is:', gd_fiscalyr,
            / 'Fiscal period is:', gd_fiscalp.
      SKIP.
      WRITE:/ 'From function module: DETERMINE_PERIOD',
            / 'Fiscal year is:', gd_fiscalyr2,
            / 'Fiscal period is:', gd_fiscalp2.
    Thanks,
    Sriram Ponna.
    Edited by: Sriram Ponna on Apr 17, 2008 8:59 PM

  • Convert this number (2454664,29112) to Date and Time.

    Hi,
    I want to convert this number (2454664,29112) to Date and Time.
    I wrote the query :
    select to_date(2454664,'J')+ numtodsinterval(29112,'second') from dual
    It give the results 16/07/2008 08:05:12
    but the correct results is 15/07/2008 08:05:12
    Is it correct?
    Please help me.

    Don't know whether the result is correct or not, but has select to_char(sysdate,'J') from dual to do anything with it?
    Regards
    Etbin
    to be more specific
    select to_char(now,'J') || ',' || to_char(now,'sssss') the_number
      from (select sysdate now from dual)Message was edited by:
    Etbin

  • Although my ipod shows the number of steps, calories, and time, it no longer is saving it to the history. also when I open the history it takes me to May 2010 instead of the current date. Any ideas on how to get it to start recording the history again?

    Although my ipod shows the number of steps, calories, and time, it no longer is saving it to the history. Also when I open the history it takes me to May 2010 instead of the current date. Any ideas on how to get it to start recording the history again?

    Try:                                               
    - iOS: Not responding or does not turn on           
    - Also try DFU mode after try recovery mode
    How to put iPod touch / iPhone into DFU mode « Karthik's scribblings
    - If not successful and you can't fully turn the iOS device fully off, let the battery fully drain. After charging for an least an hour try the above again.
    - Try another cable                     
    - Try on another computer                                                       
    - If still not successful that usually indicates a hardware problem and an appointment at the Genius Bar of an Apple store is in order.
    Apple Retail Store - Genius Bar
    The missing apps could have been done by setting the Restrictions that can hid those apps. If the backup was made with those retrictions set the the Restrictions are also restored.
    Thus, if you get it to work restore to factory settings/new iPod, not from backup                               
    You can redownload most iTunes purchases by:        
      Downloading past purchases from the App Store, iBookstore, and iTunes Store

  • There is something wrong with the volumes buttons in my macbook pro, every time i pressed the one who raises the volume, it leads me to the screen where (i do not no what its called) the background is black with the date and time and a calculator.

    There is something wrong with the volumes buttons in my macbook pro, every time i pressed the one who raises the volume, it leads me to the screen where (i do not no what its called) the background is black with the date and time and a calculator. However, when i lower it, my safari tab goes out of the screen. What do you guys think i should do? I'm getting very nervous.

    hey HAbrakian!
    You may want to try using the information in this article to adjust the behavior of your function keys to see if that resolves the behavior:
    Mac OS X: How to change the behavior of function keys
    http://support.apple.com/kb/ht3399
    Take care, and thanks for visiting the Apple Support Communities.
    -Braden

  • HT4623 I have an IPhone4 and is updated with version 6.1.3 and I am not able to connect with face time calls. I have checked the date ant time. I used to be able to use face time with no problem. since the late os upgrace I have not been able to connect w

    I have an IPhone4 and is updated with version 6.1.3 and I am not able to connect with face time calls. I have checked the date ant time. I used to be able to use face time with no problem. Since the late os upgrace I have not been able to connect with face time.

    Read http://support.apple.com/kb/ts3367

  • On the initial set up for apple tv it just sits there trying to set the date and time . it is a wireless setup and the ipaddress and router address is correct . I can't get by this screen

    On the initial set up for apple tv it just sits there trying to set the date and time . it is a wireless setup and the ipaddress and router address is correct . I can't get by this screen. The setting is on automatic and I have picked a city in my time zone yet it still tries to set a time and date but fails.
    thanks

    Make sure router is up to date. Try ethernet to rule out any wifi issues. Reboot ATV and router.

Maybe you are looking for