Genesys Cloud - Main

 View Only

Discussion Thread View
  • 1.  Compare 2 dates in Architect

    Posted 05-26-2020 04:58
    Hello,

    I would like to know what is the best way for compare 2 dates in Architect with the format YYYY-MM-DDTHH:MM:SS (2020-05-26T07:41:12.492Z)
    My goal is to to find out if  the response to the email interaction is => 3 days for apply a different behavior in Architect.

    thanks
    Jeremy
    #ArchitectureandDesign
    #Implementation
    #Routing(ACD/IVR)
    #Telephony

    ------------------------------
    Jeremy

    ------------------------------


  • 2.  RE: Compare 2 dates in Architect

    GENESYS
    Posted 05-26-2020 10:00

    The ToDateString function supports that format.  If you want to see if a particular date is more than 3 days old

    ToDateTime("2020-05-26T07:41:12.492Z") < AddDays(Flow.StartDateTimeUtc, -3)
    If you want to compare 2 date strings
    ToDateTime("2020-05-26T07:41:12.492Z") < ToDateTime("2019-05-26T07:41:12.492Z")

    https://help.mypurecloud.com/articles/access-functions-help/




    ------------------------------
    Melissa Bailey
    Genesys - Employees
    ------------------------------



  • 3.  RE: Compare 2 dates in Architect

    Posted 05-26-2020 13:58
    If looking at current time, this would work:  AddDays(GetCurrentDateTimeUtc(), 3) > MakeDateTime(2020, 05, 28) where you could replace 2020, 05, 28 with your own variables.

    ------------------------------
    Robert Wakefield-Carl
    Avtex Solutions, LLC
    Contact Center Innovation Architect
    robertwc@avtex.com
    https://www.Avtex.com
    https://RobertWC.Blogspot.com
    ------------------------------



  • 4.  RE: Compare 2 dates in Architect

    Posted 05-27-2020 06:48
    Edited by Jeremy Monzo 05-27-2020 06:50
    thank you all for these tips

    ------------------------------
    Jeremy



  • 5.  RE: Compare 2 dates in Architect

    Posted 06-11-2023 02:02

    @Robert Wakefield-Carl 

    We have been doing maintenance over few weekends and currently we have to enable maintenance announcement  at start of change then remove it at the end of change which is not getting fun. While my date evaluation below work?

    check DST condition flag
            true (
                  Flow.CloseTimeDTSCond = Flow.CloseTime + 6
                  Flow.OpenTimeDTSCond= Flow.OpenTimeDTS + 6
            false
                        Flow.CloseTimeDTSCond = Flow.CloseTime + 7
                        Flow.OpenTimeDTSCond= Flow.OpenTimeDTS + 7
     
    GetCurrentDateTimeUtc() < ToDateTime(Flow.CloseTimeDTSCond) or GetCurrentDateTimeUtc() > ToDateTime(Flow.OpenTimeDTSCond)
              do condition 1
                             Do not play announcement
               else condition 2
                             Play announcement


    ------------------------------
    Vincent Sabolboro
    ATB Financial
    ------------------------------



  • 6.  RE: Compare 2 dates in Architect

    Posted 06-12-2023 00:13

    Where are you that you still require DST?  As for calculating, can't you look at a table that has an open and close time in there and compare that with NOW?  I know you can do the If, then, else calculation, but easier to have a variable for the number of hours on the offset instead of trying to get the different variables all in order and bracketed correctly.  LMK either way and I can get you something that works. 



    ------------------------------
    Robert Wakefield-Carl
    ttec Digital
    Sr. Director - Innovation Architects
    Robert.WC@ttecdigital.com
    https://www.ttecDigital.com
    https://RobertWC.Blogspot.com
    ------------------------------



  • 7.  RE: Compare 2 dates in Architect

    Posted 06-12-2023 10:42

    We are in Alberta, Canada. We did had a non binding plebiscite that was included in the election few years back to remove DST and "Keep DTS" won be a very narrow margin, like it was a little over 1% that wanted to keep DTS. For now we will have to take into account DTS on the design. 

    Yes, planning to do a DB table lookup for the start and end date\time of the maintenance window so we do not have to stay late and up early. 



    ------------------------------
    Vincent Sabolboro
    ATB Financial
    ------------------------------



  • 8.  RE: Compare 2 dates in Architect

    Posted 06-12-2023 03:29

    If you have access to be able to modify the flows, then another is to have it evaluate a schedule or schedule group and just put your maintenance window in there.  If it evaluates it as closed or something else you can then play a maintenance prompt.  The prompt itself could be in a data table but having the schedule do this for you would make it slightly easier.



    ------------------------------
    Vaun McCarthy
    ------------------------------



  • 9.  RE: Compare 2 dates in Architect

    Posted 06-12-2023 11:29

    Hi Vaun,

    Yes, I have flow edit priv and I will try this idea too, just need to check the schedule of the day on the flow then branch out. 



    ------------------------------
    Vincent Sabolboro
    ATB Financial
    ------------------------------



Need Help finding something?

Check out the Genesys Knowledge Network - your all-in-one access point for Genesys resources