Architect schedule API creates repeating schedules incorrectly

Hi all,
I am using the /api/v2/architect/schedules to create schedules and I have 2 problems with the API (using Java Platform SDK):

  • requested division is not honoured (default division is set), for this I have raises a genesys case, it seems to me like a bug
  • recurring event start and stop time can't be set

For the second issue: start and end is provided in the API request in datetime format along with rrule. For example i create this (part of the json):
"start": "2021-12-01T08:00:00.000",
"end": "2021-12-30T18:00:00.000",
"rrule": "FREQ=WEEKLY;INTERVAL=1;BYDAY=MO,TU,WE,TH,FR"
This request should create a weekly recurring event with Mon-Fri between 8 am and 6 pm. However, when this is created the actual start and end date is considered as when this schedule is on so it is fully on from first of Dec 08:00 until 18:00 30th Dec (instead of just from 8 am to 8 pm every weekday).
If you create the schedule in the UI then you can switch between the 2 modes nicely by selecting "set duration" vs "set start/end times".
I can't figure out how to use the schedule API to create the request with start, end and rrule but the schedule should not be on all the time between start and date but only on the required days and between start and end hours.
I even compared the schedule API export of a "working" and "bad" schedule and they pretty much look the same. Is there chance this can't be set at all? If yes then the schedule API is rather useless for this because we can't create proper recurring schedules which are only active between specifc hours (not all the time between start and end dates).

Hello,

Regarding your first issue: "requested division is not honoured"
Are you making the create schedule request setting the division.id?
I don't have Java installed for trying it myself.
If no, please try with this (id is what matters).
If yes, you can possibly update your ticket/let Genesys Care know that the issue is probably with the API endpoint schema defined by Engineering for this endpoint.

The API schema provided by engineering is what is used to create the API descriptions on the Developer Center and to generate the SDKs automatically.
The POST /api/v2/architect/schedules request schema only mentions division.name while it should also list division.id (which is what matters to get the proper division assigned).

Regarding your second question, I am not totally sure I understood.
But if you are trying to create a schedule - recurring on Monday,Tuesday,Wednesday,Thursday,Friday from 8am to 6pm - from December 1st to December 8th, you can try the following.
Not that I have special insights - I just created it via the Genesys Desktop UI to see what request body was used.

{
    "name": "TestCchedule",
    "division": {
        "id":"id_of_my_division"
    },
    "start":"2021-12-01T08:00",
    "end":"2021-12-01T18:00:00",
    "rrule":"FREQ=WEEKLY;INTERVAL=1;BYDAY=MO,TU,WE,TH,FR;UNTIL=20211230T235959Z"
}

The logic seems to be the following.
"start" defines both the first/start date (of the recurring event) and the start time.
"end" is set with the first/start date (of the recurring event) and the end time.
The end date is defined in the rrule - UNTIL=xxxxx

Hope this heps.

Regards,

Hi Jerome,
for the first issue: yes it is very confusing that we usually need ID for the API calls and this one is called (in the Java SDK too) name. Anyway, i suspect this is just wrong documentation so i tried to use both ID and name, in both cases the division was completely ignored so i believe this will be a bug in the API.

for the 2nd issue: i tried to play with the UNTIL rrule option but it only impacts the end of the impact and in both cases the schedule is created to with the same full interval. On the other hand it looks like that if i set the same start and end date but different time then i will get a time range in the schedule and with the UNTIL i can define when the schedule will end. Its a bit confusing because start and end date will be ignored here and only the time is used but I can modify my coding now that i understand how it is interpreted.
thansk, Zsolt

This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.