Workforce Management Schedule API

Hi
I am trying to get the workforce management schedule for users for a specific date range.
I tried executing the query

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

on the developer tools. However, when I execute this query for a user Id and a date range when the user has a schedule published, I get only on activity code and description for the user while he has multiple schedules and multiple activity codes updated. These details are not coming out of this query. Is this how the query is built to behave or is there any other query where I can get all the shifts,schedules and activities published for the users ?

Here is the request json :
{
"userIds": [
"b5dac275-5e10-4074-b7cd-a6ba7610c200",
"04280365-8295-484b-95bc-44ac1b992c55"
],
"startDate": "2017-10-20",
"endDate": "2017-11-01"
}

Reponse Json :

{
"managementUnitTimeZone": "Australia/Brisbane",
"userSchedules": {
"b5dac275-5e10-4074-b7cd-a6ba7610c200": {
"shifts": [
{
"startDate": "2017-10-22T21:45:00Z",
"lengthInMinutes": 120,
"activities": [
{
"activityCodeId": "0",
"startDate": "2017-10-22T21:45:00Z",
"lengthInMinutes": 120,
"description": "",
"countsAsPaidTime": true,
"isDstFallback": false
}
]
}
],
"fullDayTimeOffMarkers": []
},
"04280365-8295-484b-95bc-44ac1b992c55": {
"shifts": [
{
"startDate": "2017-10-22T23:30:00Z",
"lengthInMinutes": 120,
"activities": [
{
"activityCodeId": "0",
"startDate": "2017-10-22T23:30:00Z",
"lengthInMinutes": 120,
"description": "",
"countsAsPaidTime": true,
"isDstFallback": false
}
]
}
],
"fullDayTimeOffMarkers": []
}
}
}

Hi Anil.

I think you're correct in your understanding of what this query returns. It should return activities for each activity that you see in your schedule view under Workforce Management for the agents you asked for. Our API is saying that you have a 120 minute activity at 21:45 for the b5d... agent and nothing else for that time period.

Could you go to that view for the published schedule that includes 2017-10-22 and take a screenshot of the activities for one of those two agents? Use this link to make sure we're talking about the same thing, just in case. Make sure you get the right agents but don't include their names in the screenshot you share here.

Hi,

My bad... I was looking at a different schedule on purecloud other than the dates provided here in the request. When I give the correct dates, I get all the data.. 

Thanks,
Anil

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