getting 422 Unprocessable Entity when hitting the adherence endpoint. the payload looks valid but the API rejects the interval grouping.
curl -X POST https://myorg.mygenesyscloud.com/api/v2/analytics/wfm/adherence \
-H 'Authorization: Bearer <token>' \
-H 'Content-Type: application/json' \
-d '{
"start": "2023-10-01T08:00:00-04:00",
"end": "2023-10-01T17:00:00-04:00",
"interval": "PT15M",
"group_by": ["agent"],
"filter": {
"shiftScheduleId": "abc-123-def-456"
}
}'
response is {"code":"invalid_request","message":"Filter criteria conflict with grouping parameters"}.
tried removing shiftScheduleId and it works fine. data comes back for all agents. problem is we’ve got a need for adherence against the specific shift schedule for the WFM dashboard sync. the shift is defined in WEM, status is active. checked the shift schedule API, returns correct JSON.
interval is standard 15 minutes. group_by agent is standard.
looking at the docs, shiftScheduleId should be valid with agent grouping. maybe it’s the timezone offset? using US/Eastern explicitly in the start/end time. tried UTC too. same 422.
did a test with group_by set to none. same 422 error.
tried using agentId instead of shiftScheduleId. works. so the API hates the shift filter when combined with agent grouping? or is there a hidden restriction on shift schedules that span midnight? this one starts at 08:00 EST so no midnight issue.
verified the token has wem:workforce-management:reporting:read and wem:workforce-management:shift-schedules:read. permissions aren’t the problem.
also tried adding include: ["shiftSchedule"] in the params. no change.
weirdly, if i expand the date range to 48 hours, it starts returning data but the adherence values are zeroed out for that shift. like the system can’t find the shift in that window even though the shift ID is hardcoded in the filter.
forgot to mention, didn’t include type in the payload. docs say it defaults to agent. tried explicitly setting type: "agent" and type: "shift". both throw 422.
checked the network tab in WEM. the UI call looks slightly different. they pass groupBy: ["agent","shiftSchedule"]. tried that. still 422.
feels like a backend validation bug on the filter object. the error message gives zero context on what conflicts with what. API is doing jack all to help.
is there a known bug with adherence reports and shift filters in the current patch? nothing in the developer docs about this specific combo failing.