Genesys Cloud - Main

 View Only

Sign Up

  Thread closed by the administrator, not accepting new replies.
  • 1.  Business days and include holidays question

    Posted 01-28-2025 16:06
    No replies, thread closed.

    Hello, we have a new requirement where we need to post a date 7 business days in advance of current date, but account for holidays.  any thoughts on how to accomplish that?


    #ArchitectureandDesign

    ------------------------------
    Clayton Curtis
    Tech manager
    ------------------------------


  • 2.  RE: Business days and include holidays question

    Posted 01-29-2025 09:08
    No replies, thread closed.

    Hello Clayton, 

    I am not really sure what you are talking about and could use more context but we do have our operating scheduling that you can use in architect. 

    Additional Documentation: Operating Schedule Groups

    Cheers, 



    ------------------------------
    Cameron
    Online Community Manager/Moderator
    ------------------------------



  • 3.  RE: Business days and include holidays question

    Posted 01-29-2025 09:17
    No replies, thread closed.

    Thanks for replying Cameron.  Basically here is the requirement.  We do a back end api call for a due date adjustment on a payment.  This is a chat workflow in Architect.  the call may reply with 3 dates.  I want to select a date that is at least 7 business days (so don't include weekend or holidays) from current date.  Was thinking about operating schedules but not sure i can get there.  I know the logic should be in the reply but due to time constraints, our back end api team can't make this change in time needed. was hoping i could figure out a way in genesys.



    ------------------------------
    Clayton Curtis
    Tech manager
    ------------------------------



  • 4.  RE: Business days and include holidays question

    Posted 01-29-2025 10:54
    No replies, thread closed.

    Thanks for the clarification! Operating schedules may not be able to get you there and I can't think of a way outside of doing some dev work. As you currently are doing. 



    ------------------------------
    Cameron
    Online Community Manager/Moderator
    ------------------------------



  • 5.  RE: Business days and include holidays question

    Posted 01-29-2025 12:40
      |   view attached
    No replies, thread closed.

    Here's an example using a message flow.  I start by initializing a date tomorrow at start of business hours (14 = 9AM EST in my example, figure out what to use for your time zone).  Use a loop to evaluate the schedule group to see if it's a business day, keeping tracking on how many business days have been hit, and add a day to the date each time.  Once I've gotten to 7 business days, break out of the loop.  Where I have a send message at the end for debugging, you'll want to replace that with logic to select which of your backend's 3 dates are >= to the date that's been found.

    https://help.mypurecloud.com/articles/import-export-call-flow/



    ------------------------------
    Melissa Bailey
    Software Engineer
    ------------------------------

    Attachment(s)



  • 6.  RE: Business days and include holidays question
    Best Answer

    Posted 01-29-2025 13:10
    No replies, thread closed.

    Here is what I would do:

    1. Get your current date plus 7 days using the AddDays function.
    2. Create a Data Action for a webservice like https://kayaposoft.com/enrico/json/
    3. Get the date in question and query enrico using IsPublicHoliday something like this: kayaposoft.com/enrico/json/v2.0/?action=isPublicHoliday&date=05-07-2025&country=usa
    4. Get JSON response of True or False
    5. Use a Decision tool to route accordingly.  


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