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.
------------------------------
Original Message:
Sent: 03-28-2023 17:50
From: Tatjana Knezevic
Subject: API
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-/
Original Message:
Sent: 03-28-2023 15:07
From: Juan Ayala
Subject: API
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.
------------------------------