Genesys Cloud - Developer Community!

 View Only

Sign Up

  • 1.  Evaluate a schedule group from script

    Posted 06-03-2025 11:06

    Hi All,

    our use case is: before transferring a call to another queue from script (for this we use blind transfer to special flow, not "normal" transfer button of the UI) the system needs to check if the target queue is still open or not. If not script needs to provide a warning message to the Agent: the target queue is closed!

    For this an API endpoint would be great which returns if a given schedule group is open/closed/holiday etc. Checked API explorer, unfortunately couldn't find somethiing like this (only endpoints where I can read the current config of schedule groups or operating schedules).

    Do you know any API providing the above functionality?

    Many thanks in advance!


    #PlatformAPI

    ------------------------------
    Roland Papp
    Geomant-Algotech Zrt.
    ------------------------------


  • 2.  RE: Evaluate a schedule group from script

    Posted 08-22-2025 02:56

    Hi Roland,

    We have the same use case and also ended up implementing our own evaluation logic and service. It can get quite complex to test and maintain, especially when dealing with time zones, overlapping schedules, and caching. It mostly works fine but now and then there are edge cases, and testing this end to end takes time that we rather spend elsewhere, since it adds little value over what Genesys can already do in built in Architect actions, as you say. 

    The only reference I know of for building this yourself is here:
    https://developer.genesys.cloud/routing/architect/architect-schedules-guide

    It works, but it requires multiple API calls to fetch schedules and groups, plus custom logic to evaluate them – not ideal when you just need a quick "is this queue open?" check.

    Having a dedicated API for this would definitely simplify things.

    There is an product request on the ideas portal which is gathering votes but need more I suppose: 
    https://genesyscloud.ideas.aha.io/ideas/OPAPISDK-I-140 Create new API to evaluate a schedule group and return open/closed/holiday in response



    ------------------------------
    Joel Hellman
    tbc
    ------------------------------



  • 3.  RE: Evaluate a schedule group from script

    Posted 08-24-2025 20:40

    It's a bit kludgy...but have you tried setting up a transfer to a Secure Call flow, have the flow do a quick schedule check, set an attribute for the return value, then return it to the agent so the agent can see the result in a field populated by the attribute and decide whether or not to make the final transfer? It should be a real quick call and return...downside is the customer has to go on hold briefly to do the check.



    ------------------------------
    George Ganahl GCCX-AI, GCP, GCSME, ICCE, ICHD, etc.
    Technical Adoption Champion
    Genesys
    2024 Community Member of the Year
    ------------------------------



  • 4.  RE: Evaluate a schedule group from script

    Posted 08-25-2025 21:52

    Thanks George.
    There is no Agent involved in the call.  These calls are arriving after hours when no-one is logged on.



    ------------------------------
    John Laird
    Genesys Solutions Consultant
    ------------------------------



  • 5.  RE: Evaluate a schedule group from script

    Posted 08-26-2025 14:53

    I was going by Roland's description in the original post which involves a script and an agent.



    ------------------------------
    George Ganahl GCCX-AI, GCP, GCSME
    Technical Adoption Champion
    Genesys
    2024 Community Member of the Year
    ------------------------------



  • 6.  RE: Evaluate a schedule group from script

    Posted 08-27-2025 20:12

    Hi Roland -

    How complicated is your schedule group? Most of the time they end up having one open schedule so if you have that ID you can hit that one schedule definition directly but it will be on you to evaluate it (the architect tools don't necessarily do things that map to API calls but there are plenty of undocumented ones so who knows). 

    This may be a thing where just coding the script to do that (if you want it to be fixed to the schedule/schedule group) but if it's not something that changes often it may just be easier to code the script with the schedule and update it any time there's a request to update the schedule groups. 

    If you want to do the former you'll need to understand (play around with a non-used schedule) the possible variants and make sure you understand how to parse them and take into consideration TZ and overnight hours, etc. 

    It may be easiest to make a lightweight web function (AWS Lambda or GCP Cloud Run, etc.) to do the heavy lifting for you and then your script could just call that function with the queue name and let the service do the rest. 



    ------------------------------
    Jason Totten
    Senior Contact Center Engineer
    ------------------------------



  • 7.  RE: Evaluate a schedule group from script

    Posted 08-27-2025 20:15
    Edited by Jason Totten 08-28-2025 07:14

    But to add to what George said, his solution makes sense from your original description. You say "If not script needs to provide a warning message to the Agent: the target queue is closed!" in which case this is the very agent he was referring to. That agent would send it to the secure flow which would evaluate the schedule group and return a value in an attribute and you could work from there. 

    It would be a lot simpler and elegant than making a parser.



    ------------------------------
    Jason Totten
    Senior Contact Center Engineer
    ------------------------------