Genesys Cloud - Main

 View Only


Discussion Thread View
Expand all | Collapse all

Using date expressions for holiday

  • 1.  Using date expressions for holiday

    Posted 02-12-2024 13:11

    Hello - I am using the template for holiday routing available from the resource centre. Download Architect flow examples - Genesys Cloud Resource Center

    I am having trouble figuring out what expression to use in the holiday variable. The first variable I believe is point to todays date and the second is looking for the holiday date - but the expression in that variable is not prefilled. Anyone have any experience with this?

    Genesys Cloud Resource Center remove preview
    Download Architect flow examples - Genesys Cloud Resource Center
    This page provides example call flow templates available to download and import... [More]
    View this on Genesys Cloud Resource Center >


    #Routing(ACD/IVR)
    #Telephony

    ------------------------------
    Melanie Williams
    Camis Inc
    ------------------------------


  • 2.  RE: Using date expressions for holiday

    Posted 02-13-2024 02:18

    Hi Melanie,
    without having seen your flow-example: Best way to check for holidays is defining schedules (under Admin --> Routing) and use "Evaluate Schedule Group" in Architect.
    Best regards
    Christoph



    ------------------------------
    Christoph Domaschke
    CRONBANK AG
    ------------------------------



  • 3.  RE: Using date expressions for holiday

    Posted 02-13-2024 10:04

    Hello Christoph - the flow/expression I am using is in the link I posted. 



    ------------------------------
    Melanie Williams
    Camis Inc
    ------------------------------



  • 4.  RE: Using date expressions for holiday

    Posted 02-14-2024 07:00

    Hello Melanie,
    I have never seen that before. As mentions I suggest to use Schedule Groups / Schedules in Genesys CX and the  "Evaluate Schedule Group"-Action in Architect. It is nearly self-Explaining.

    Create an operating schedule group - Genesys Cloud Resource Center (mypurecloud.com)

    Best regards
    Christoph



    ------------------------------
    Christoph Domaschke
    CRONBANK AG
    ------------------------------



  • 5.  RE: Using date expressions for holiday

    Posted 02-14-2024 15:09

    Hello Christoph,

    Thanks again for your reply. I am aware if this option but I don't think it will meet my business needs. Looking for help with the expression text. 



    ------------------------------
    Melanie Williams
    Camis Inc
    ------------------------------



  • 6.  RE: Using date expressions for holiday

    GENESYS
    Posted 02-14-2024 15:15

    I can't see your screenshot, but I assume you're asking about the Flow.Holidays variable.  It's an integer collection with 3 items in it: 101, 704, and 1225.  They're using that to represent January 1st, July 4th, and Christmas.



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



  • 7.  RE: Using date expressions for holiday

    Posted 02-14-2024 15:30
    Edited by Melanie Williams 02-14-2024 15:31

    Thanks Melissa! I didn't post a screenshot but here is one if that helps. The expression line reads MakeEmptyList(ToInt(NOT_SET)) for the holiday check. It was part of the templates posted on the above link I mentioned.   Can you let me know how to change those holidays? I have four I need to configure for this check for this year



    ------------------------------
    Melanie Williams
    Camis Inc
    ------------------------------



  • 8.  RE: Using date expressions for holiday

    GENESYS
    Posted 02-14-2024 16:06

    I just downloaded the Holiday Routing Example flow from https://help.mypurecloud.com/articles/download-architect-flow-examples/.  Flow.Holidays in the example uses the expression MakeList(101,704,1225)
    101 = January (month=1, day = 01)
    704  =July 4th (month=7, day = 04)
    1225 = Christmas (month=12, day = 25)
    So for whatever holiday you want, figure out the number of the month and the day of that month, and append them together.   Repeat for your other holidays, and use MakeList to create a collection with those values.



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



  • 9.  RE: Using date expressions for holiday

    Posted 02-14-2024 16:29

    Thanks Melissa! I tried that and it still seems to be reading the expression values as true - suggestions? Here is the screenshot of my flow 



    ------------------------------
    Melanie Williams
    Camis Inc
    ------------------------------



  • 10.  RE: Using date expressions for holiday

    GENESYS
    Posted 02-14-2024 16:38

    Your decision action is hardcoded to true



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



  • 11.  RE: Using date expressions for holiday

    Posted 02-14-2024 16:44

    Can you clarify what that means or the alternatives to using that?



    ------------------------------
    Melanie Williams
    Camis Inc
    ------------------------------



  • 12.  RE: Using date expressions for holiday

    GENESYS
    Posted 02-14-2024 16:55

    Use expression the example holiday flow uses.  Go download the example again and import it to a flow in your org so you can see what it has in it.



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



  • 13.  RE: Using date expressions for holiday

    Posted 02-15-2024 09:29

    Great thanks for pointing that out. Works now! The only thing now that is a bit concerning is that I noticed the Flow.DateToday isn't updating the date in a timely manner. I only noticed it updated to the current date in the afternoon yesterday.



    ------------------------------
    Melanie Williams
    Camis Inc
    ------------------------------



  • 14.  RE: Using date expressions for holiday

    GENESYS
    Posted 02-15-2024 09:57

    You are hardcoding Flow.DateToday to Feb 12, 2024 at midnight UTC.  Which means from now until eternity, the flow will keep using Feb 12, 2024 midnight UTC.  The example flow uses the expression AddHours(Flow.StartDateTimeUtc,-5)
    Flow.StartDateTimeUtc is a built in variable, that contains the time the flow started in UTC.
    https://help.mypurecloud.com/articles/architect-default-variables/
    The example is adjusting the value -5 hours to US Eastern time zone.  You need to adjust to whatever timezone you are in.
    https://help.mypurecloud.com/articles/datetime-values-in-architect-flows-and-daylight-savings-time-dst-calculations/



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



  • 15.  RE: Using date expressions for holiday

    Posted 02-15-2024 10:06

    Thanks so much Melissa - works now! What a learning experience. 



    ------------------------------
    Melanie Williams
    Camis Inc
    ------------------------------



  • 16.  RE: Using date expressions for holiday

    GENESYS
    Posted 02-15-2024 11:21

    Hey @Melanie Williams - we covered your question on the latest episode of the Q&A Show at the 18:00 minute mark. Hope this helps! 



    ------------------------------
    Nicole Milliken
    Genesys - Employees
    ------------------------------



  • 17.  RE: Using date expressions for holiday
    Best Answer

    GENESYS
    Posted 02-15-2024 13:09

    Also, @Melanie Williams, as a couple of other folks noted above the example is not the best way to do it these days. That example was created before we had the Evaluate Schedule Group action. In the Q&A video I answered your direct question, but I did not take the extra time to show the better way.

    You might want to try this other method:

    The expression I used in the Specific field under Schedule Evaluation DateTime (UTC) is AddHours(GetCurrentDateTimeUtc(),-5)

    This example presumes that you have a Schedule Group and Schedules set up in your organization set to use EST (America/New York) for the Time Zone on the Schedule Group:



    ------------------------------
    George Ganahl GCP, GCSME, ICCE, ICHD, etc.
    Senior Principal PS Consultant
    Genesys
    ------------------------------



  • 18.  RE: Using date expressions for holiday

    Posted 02-16-2024 10:08

    Thanks @George Ganahl. The previous template seems to be working during my testing - unless you can give me specific issues you've seen using the other method? I had not realized that by toggling between literal and expression view it actually changes the expression line completely. Which is where I think I ran into trouble.  

    The limitations with the schedules and schedule groups we are seeing is that we need to have three different messages play for different scenarios. Regular closure, seasonal closure and stat holiday closure. With the current configuration capabilities - you can only choose two flows in the call route in the case of closed and holidays. A third option would be helpful for seasonal businesses. 



    ------------------------------
    Melanie Williams
    Camis Inc
    ------------------------------



  • 19.  RE: Using date expressions for holiday

    Posted 02-16-2024 11:26

    Melanie,

    You could account for this by adding the Regular Closure and Seasonal Closure schedules to the Closed set of schedules in the Schedule group.  Then, under the closed path in evaluate schedule group, you can add an evaluate schedule for your Seasonal Closure Schedule, and if it's active play your Seasonal Closed message and if it's not, play your regular closed message.  That's a way to account for 3 separate closed messages.

    Thank you,



    ------------------------------
    Jason Tripp
    Independent Health Association, Inc.
    ------------------------------



  • 20.  RE: Using date expressions for holiday

    GENESYS
    Posted 02-16-2024 12:11

    Architect has a lot of flexibility, and I don't want to overwhelm you with options...

    As a small example, you can use a variable to hold the prompt to play, and use a Data Table to hold the prompt to play based upon the Schedule which determines the Closed or Holiday path.

    Different folks have different ways of customizing which prompt to play for the various situations.

    Do what you are comfortable with for now, but try to leave room in the flow configuration to allow for future additions or changes. Ask questions here as needed to increase your understanding. It's an ever-learning process :-)

    Have you already taken the Architect course in Beyond?



    ------------------------------
    George Ganahl GCP, GCSME, ICCE, ICHD, etc.
    Senior Principal PS Consultant
    Genesys
    ------------------------------



  • 21.  RE: Using date expressions for holiday

    Posted 02-16-2024 12:27

    Thanks! Not yet but its on my todo. I have engineering experience in other ACDs (not cloud solutions) - which are somewhat transferrable. 



    ------------------------------
    Melanie Williams
    Camis Inc
    ------------------------------



  • 22.  RE: Using date expressions for holiday

    GENESYS
    Posted 02-16-2024 12:38

    Great! Yes, basic functionality and theory is usually transferrable. Architect capability overall is always growing, but the basics don't change much.



    ------------------------------
    George Ganahl GCP, GCSME, ICCE, ICHD, etc.
    Senior Principal PS Consultant
    Genesys
    ------------------------------



Need Help finding something?

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