WFM - Any way to get a user's schedule yet via API

Evening! there doesn't seem to be a way to interact with any of the Workforce Management side of things yet. Any news on API endpoints for this?

Would love to be able to grab x user's schedule

2 Likes

Hi there. I'm a developer on the Workforce Management team. We have some endpoints in the pipeline for Q3 for Time Off Requests and have recently been discussing routes for Agent Schedules.

It would help us if you could give us some information on your use case, such as:

  • How many agents would you be showing this for at once? (Would you want to pass us a bunch of user Ids at once, or just for a single agent)
  • What sort of time range would you want to use? (Single day, week, arbritary range?)
  • What sort of UI/application would you want to display this on? (Graphical/text?)

The first two questions could influence our API design. The last one is to see if there are any holes in our existing user interface, or if you just have requirements that you must show this data outside of PureCloud.

Thanks!

1 Like

Hello Joe,

will there be RTA functionality available within/for the WFM API? And can you point me towards any WFM documentation that goes beyond that available on help.mypurecloud.com?

Thank you kindly,

Carl Cunningham

Hi Carl. We are currently working on RTA. The view should be available in the next 2-3 weeks and the API will appear around that time as well. The API is designed such that you can get the RTA info as a GET as well as subscribe to changes real-time.

RTA will be the first to be API documented here on developer.mypurecloud.com.

Hi Joe,

What's the timeline for WFM agent schedules to be accessible via the API? I can help provide some use cases if you're still looking for that info.

Thanks,
Dave

Same question here. Would like to extract an users schedule via API

Getting a single agent's schedule via API is now released to production. We have a route:
POST /api/v2/workforcemanagement/schedules (documentation)

that can get the schedule for the logged in user. We have another route, soon to be released:
POST /api/v2/workforcemanagement/managementunits/{muId}/schedules/search

that accepts an array of userIds and a date range. I will update this post in the next week or so when the second route is released.

1 Like

The multi-user route is also now available in production here:

https://developer.mypurecloud.com/developer-tools/#/api-explorer?filter=schedules

POST /api/v2/workforcemanagement/managementunits/{muId}/schedules/search

is there a route to get muid's?

Hi @dsouther. To get management units (name, id) you can do this:

GET /api/v2/workforcemanagement/managementunits/

This is not showing up on our docs, I will fix that.

1 Like

I'm working on a page that displays a user's shift, using /api/v2/workforcemanagement/schedules. In order to get the activity codes that correspond, I have make 3+ more calls:

  1. /api/v2/workforcemanagement/managementunits
  2. /api/v2/workforcemanagement/managementunits/{muId}/users
  • a call for each management unit until i find the user
  1. /api/v2/workforcemanagement/managementunits/{muId}/activitycodes

If the response for /api/v2/workforcemanagement/schedules included the muid, then I wouldn't have to search over the management units to find which one had that user.

Hi @dsouther.

This is an oversight on our part. I've discussed with my team and we'll get a fix out in the next couple weeks. I'll update you here when that happens.

Internal tracking ID: WFM-2802

@dsouther - additionally, I'd be curious to hear about your use case, if you don't mind - either here or via private message. I might be able to help, or maybe it might influence other APIs we write.

We are starting to move toward using PureCloud for schedule management, replacing excel. Our biggest motivator is schedule adherence. I'm working on putting together reports using schedule data and presence data for team leads and managers, but we want our agents to be able to see their historical adherence as well. I'm working on page where our agents can view this.

Hi @dsouther. You should be able to call api/v2/workforcemanagement/managementunits/mine to get the management unit ID for the current user. We're still working on getting the documentation for that uploaded, so you won't see it anywhere, but it should work.

Given what I understand about your use case, this will save you from having to do the pointless loops through users to find the right ID, though let me know if I'm mistaken.

  • Joe