Genesys Cloud - Main

 View Only
Discussion Thread View
  • 1.  API

    Posted 03-28-2023 15:07

    Hello, do you know any genesys cloud API that returns the date and closure of a schedule or if that schedule has a schedule to talk?

    I tried with this /api/v2/architect/schedules/{scheduleId}
    but in the start and end values it does not return today's date

    I want to implement it from a script


    #ArchitectureandDesign

    ------------------------------
    Juan Ayala
    Promotora Kranon S.A. de C.V.
    ------------------------------


  • 2.  RE: API

    Posted 03-28-2023 17:50

    Hi Juan,

    Please note, the API gets the configuration for the scheduleId.  In order to check closure, you should add the logic in your script: 

    • extract the start_hour and end_hour from "start" and "end" and convert them into seconds
    • make a current timestamp in the corresponding timezone (don't forget to use the DST flag)
    • get the frequency of the schedule from rrule (for this use the first parameter FREQ=) 
    • based on the frequency type check if the current time is within start_hour  and end_hour



    ------------------------------
    TatjanaKnezevic

    www.startelecom.cloud

    https://www.linkedin.com/company/star-telecom-www-startelecom-ca-/
    ------------------------------



  • 3.  RE: API

    Posted 03-28-2023 18:22

    Hello Tatjana Knezevic


    Thank you very much for the idea, one more thing, do you know if there is a function in the script to convert a time format ""HH:mm:ss"" to seconds?

    I found this but it doesn't work for me dateToMilliseconds("01/01/2000 12:00:00 am (+00:00)"); since I only use I send you the time



    ------------------------------
    Juan Ayala
    Promotora Kranon S.A. de C.V.
    ------------------------------



  • 4.  RE: API

    Posted 03-29-2023 09:41

    Juan,

    Take a look at this idea. It proposes adding an API endpoint to assist with Schedule / Schedule Group evaluation.



    ------------------------------
    Paul Simpson
    Eventus Solutions Group
    ------------------------------



Need Help finding something?

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