How to get Agents weekly schedule

Hi All,

I have a requirement where I need to get all agents weekly schedule and it should return below fields.
ID
Activity Code
Schedule Start Time
Schedule End Time
Time Zone

I have checked below API but it does not return expected fields in response. Do I have to invoke another APIs by using output of this API or is there any other way to get agents weekly schedule? Appreciate your help!!
GET /api/v2/workforcemanagement/businessunits/{businessUnitId}/weeks/{weekId}/schedules

Regards,
Priti

You can instead use https://developer.genesys.cloud/useragentman/workforcemanagement/#post-api-v2-workforcemanagement-businessunits--businessUnitId--agentschedules-search

Or use the scheduleId returned from the API method you mentioned and use https://developer.genesys.cloud/useragentman/workforcemanagement/#post-api-v2-workforcemanagement-businessunits--businessUnitId--weeks--weekId--schedules--scheduleId--agentschedules-query

@brian.trezise, can check my understanding...

1 Like

the purpose of GET /api/v2/workforcemanagement/businessunits/{businessUnitId}/weeks/{weekId}/schedules is to get a list of schedules with top-level details about each (the schedule list view uses that route).

The links provided by Jay provide the data you're requesting, though you may also need this one to get the rest of the metadata on an individual schedule if using the query route as opposed to the search route (which if you're needing to get schedules for all agents I think that's what you'll want)

GET /api/v2/workforcemanagement/businessunits/{businessUnitId}/weeks/{weekId}/schedules/{scheduleId}

Thank you Brian.

I am looking for a API which will give my schedule off all business unit's agents details.
As per provided details by you looks like I have to call multiple API. I dont have all business unit details.
Is there any API which will give schedule of all employess for a week or 2 without providing any agent details or business unit?

No, there is no such API. All WFM data is segmented by business unit (in some cases, further segmented by management unit). To get data for all agents in all business units you would have to iterate over all of the business units in your organization. Keep in mind when writing code to do such a thing you'll need to be sure to handle rate limiting responses and space out your API calls to avoid triggering them.

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