Genesys Cloud - Main

 View Only

Discussion Thread View
  • 1.  Buildig

    Posted 03-14-2019 13:39
    Is anyone aware of a way to accomplish the following within an in-queue flow .....

    We want to offer a callback but only Monday to Friday between 9:00am - 4:00pm.

    Below is an image of what is currently built - but not working. 

    #ArchitectureandDesign

    ------------------------------
    Kymberli O'Hagan

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


  • 2.  RE: Buildig

    GENESYS
    Posted 03-14-2019 13:48
    Are you taking your timezone offset into account?  Flow.StartDateTimeUtc returns the time in UTC, not your current timezone.  For example, I'm located in Indiana and my offset is +4.  So 1pm my time is actually 17:00 UTC.

    https://help.mypurecloud.com/articles/datetime-values-in-architect-flows-and-daylight-savings-time-dst-calculations/ has a couple examples of how to account for timezone & daylight savings time.

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



  • 3.  RE: Buildig

    Posted 03-14-2019 16:53
    I'll take a look at these articles, thank you

    ------------------------------
    Kymberli O'Hagan
    Alberta Motor Association
    ------------------------------



  • 4.  RE: Buildig

    Posted 03-15-2019 10:43
    Edited by Sven Schiller 04-01-2019 10:19
    I calculate the offset based on the DST rule (here UK):
    Flow.DSToffset = if (Flow.StartDateTimeUtc >= MakeDateTime(Year(Flow.StartDateTimeUtc), 3, 31 - (DayOfWeek(MakeDateTime(Year(Flow.StartDateTimeUtc),3,31))-1)) and Flow.StartDateTimeUtc <= MakeDateTime(Year(Flow.StartDateTimeUtc), 10, 31 - (DayOfWeek(MakeDateTime(Year(Flow.StartDateTimeUtc),10,31))-1)), 1, 0)

    I then check if the time is within my criteria (here M-F after 6pm, Sat after 5pm, or Sun), taking DST offset into account:
    (DayOfWeek(Flow.StartDateTimeUtc) > 1 and DayOfWeek(Flow.StartDateTimeUtc) < 7 and Hour(Flow.StartDateTimeUtc) >= (18-Flow.DSToffset)) or (DayOfWeek(Flow.StartDateTimeUtc) == 7 and Hour(Flow.StartDateTimeUtc) >= (17-Flow.DSToffset)) or (DayOfWeek(Flow.StartDateTimeUtc) == 1)
    (edited for subtraction instead of addition)

    ------------------------------
    Sven Schiller
    Kognitiv
    ------------------------------



Need Help finding something?

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