PureCloud

Expand all | Collapse all

Buildig

  • 1.  Buildig

    GCAP Member
    Posted 6 days ago
    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

    Top 25 Contributor
    Posted 6 days ago
    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

    GCAP Member
    Posted 6 days ago
    I'll take a look at these articles, thank you

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



  • 4.  RE: Buildig

    Top 25 Contributor
    Posted 5 days ago
    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)


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