Genesys Cloud - Main

 View Only
Discussion Thread View
  • 1.  Expression help to close IVR for lunch

    Posted 11-22-2017 14:47

    Could someone help me with a decision task for lunch break between 12:30 to 13:00? Not sure how to write that if code.

     

    if(hour(GetCurrentDateTimeUtc())=12:30 to 13:00,true,false)

     

    Thanks!



  • 2.  RE: Expression help to close IVR for lunch

    Posted 11-22-2017 15:19

    (Hour(GetCurrentDateTimeUtc()) == 12 and Minute(GetCurrentDateTimeUtc()) >= 30) or (Hour(GetCurrentDateTimeUtc()) == 13 and Minute(GetCurrentDateTimeUtc()) == 0)

     

    You don't need to wrap the expression in an If b/c it already returns true or false.

     

    One more very important caveat: you need to know the timezone that your edge is located in, and factor that into the value you use for the hour. For example, my edge is located in Indiana, USA which is currently +5 hours from UTC. So I would use 17/18 instead of 12/13 in my expression. Also remember that this expression will need updated if you use daylight savings time. See https://help.mypurecloud.com/articles/datetime-values-in-architect-flows-and-daylight-savings-time-dst-calculations/ for examples of doing this.

     



  • 3.  RE: Expression help to close IVR for lunch

    Posted 11-22-2017 16:05

    Thanks Melissa!

     

    I added following expression and it works!

    (Hour(GetCurrentDateTimeUtc()) == 11 and Minute(GetCurrentDateTimeUtc())>= 30)

     

    It would be good if Architect could handle time zones in the future. Since we have daylight saving we need to change quite many IVR. We did actually forget to do that a couple of weeks ago.

     

    Thanks for the help and quick answer!



Need Help finding something?

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