Genesys Cloud - Main

 View Only


Discussion Thread View
  • 1.  Decisions - Custom Expression

    Posted 04-10-2024 09:33

    Afternoon,

    I am trying to create a decision within an in-queue flow that would check the current time and follow a different route based on this. 

    i.e. if it is before 16:30pm it would follow a standard route, if it is 16:30pm or later it would follow another.

    Can anyone share how i might be able to configure this within an in-queue call flow?


    #ArchitectureandDesign

    ------------------------------
    Lewis Staffa
    Liberata
    ------------------------------


  • 2.  RE: Decisions - Custom Expression

    GENESYS
    Posted 04-10-2024 10:11

    Notice GetCurrentDateTimeUtc gets the datetime in UTC, you will need to figure out your timezone offset.  For example if you're are in EDT with an offset of -4, you would check the hour is <= 20 instead of <= 16

    Hour(GetCurrentDateTimeUtc()) <= 16 AND Minute(GetCurrentDateTimeUtc()) < 30



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



  • 3.  RE: Decisions - Custom Expression

    Posted 04-15-2024 09:51

    Hi Melissa. I have inserted the above, however, when testing it seems as though once the decision has been evaluated it always seems to go down the "No" Leg of the In-Queue Call Flow rather than evaluating the time and going down the relevant leg dependant on time. Am I doing everything right?



    ------------------------------
    Lewis Staffa
    Liberata
    ------------------------------



  • 4.  RE: Decisions - Custom Expression

    Posted 04-15-2024 16:11

    Hi Lewis,

    You'll need to adjust the expression since in that case any hour between 0-15 can still have minutes higher than 30 and return false.
    It would be something like this

    (Hour(GetCurrentDateTimeUtc()) < 15)
    OR
    (Hour(GetCurrentDateTimeUtc()) == 15 AND Minute(GetCurrentDateTimeUtc()) < 30)

    Which would be true if hour is less than 15, or if hour is 15 and minutes are less than 30



    ------------------------------
    Jan Heinonen
    Contact Center Specialist
    GlobalConnect AB
    ------------------------------



  • 5.  RE: Decisions - Custom Expression

    Posted 04-16-2024 04:42

    Just to provide an update, i have managed to find a solution by using "Evaluate a Schedule" as suggested, thank you for everyone's help and time. 



    ------------------------------
    Lewis Staffa
    Liberata
    ------------------------------



  • 6.  RE: Decisions - Custom Expression
    Best Answer

    Posted 04-11-2024 01:59

    you can use what Melissa suggested, also you may want to check evaluate schedule it can be use in in-queue flow if you only got few time conditions you can use it as well.



    ------------------------------
    Ernest John Nuque
    ------------------------------



  • 7.  RE: Decisions - Custom Expression

    Posted 04-15-2024 16:07

    I second the suggestion of using a Schedule or Schedule Group. The problem with Melissa's suggestion is that it won't account for Daylight Savings, meaning you will have to go in and edit the expression twice a year!

    HTH



    ------------------------------
    Paul Simpson
    Views expressed are my own and do not necessarily reflect those of my employer.
    ------------------------------



Need Help finding something?

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