AP does not return Workplan and schedule data for history dates

Hi,

I am implementing workplan and agent schedule API calls to bring data into our system. In that I am facing following problems

PROBLEM 1

https://api.usw2.pure.cloud/api/v2/workforcemanagement/managementunits/XXXXXXX-13d7-4854-b45d-f0271cea953e/agentschedules/search

above API calls does not return data if I supply dates of previous weeks. It only returns from current weeks start date.

This was working fine few days before, as I could fetch data from 1st Feb to till date but today when I give date range of feb it returns no data

{
"status": "Complete",
"operationId": "XXXXXXXXXX-7ec3-41e8-9153-afd30a55d285",
"result": {
"agentSchedules": [
{
"user": {
"id": "XXXXXXXXXX-3c98-4c61-adbe-bb7d9652574f",
"selfUri": "/api/v2/users/XXXXXXXXXX-3c98-4c61-adbe-bb7d9652574f"
},
"shifts": [],
"fullDayTimeOffMarkers": []
}
],
"businessUnitTimeZone": "America/New_York",
"publishedSchedules": []
}
}

PROBLEM 2

https://api.usw2.pure.cloud/api/v2/workforcemanagement/managementunits/XXXXXXXXXX-13d7-4854-b45d-f0271cea953e/agents/workplans/query

Above query returns current workplan id only.

e.g my query was

{
"agentIds": [
"XXXXXXXXXX-ec3a-4f7b-bdb7-bcfbaf4e8f00"
],
"startDate": "2024-12-02",
"weekCount": 11
}

It gave me following output

{
"result": {
"entities": [
{
"user": {
"id": "XXXXXXXXXX-ec3a-4f7b-bdb7-bcfbaf4e8f00",
"selfUri": "/api/v2/users/XXXXXXXXXX-ec3a-4f7b-bdb7-bcfbaf4e8f00"
},
"workPlanLookupKeysPerWeek": [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
]
}
],
"referenceStartWeekDate": "2024-12-02",
"workPlanLookup": {
"0": {
"id": "XXXXXXXXXX-ccab-4cc5-b082-ae88070293fe",
"managementUnit": {
"id": "XXXXXXXXXX-13d7-4854-b45d-f0271cea953e",
"selfUri": "/api/v2/workforcemanagement/managementunits/XXXXXXXXXX-13d7-4854-b45d-f0271cea953e"
},
"selfUri": "/api/v2/workforcemanagement/managementunits/XXXXXXXXXX-13d7-4854-b45d-f0271cea953e/workplans/c7775d46-ccab-4cc5-b082-ae88070293fe"
}
}
}
}

as per this result this agent has same workplan for all 11 weeks but actually this user had workplan changes in this duration.

Can any one help?

Jignesh

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