Why does the WEM API is returning a 500 Internal Server Error when patching agent schedules from ServiceNow?
The integration uses a ServiceNow REST API to trigger a Genesys Cloud Data Action.
The payload is validated against the OpenAPI spec.
It targets the PATCH /api/v2/wem/schedules/agent endpoint.
The request includes the correct scheduleId and availability segments.
Authentication is handled via OAuth 2.0 client credentials.
The token is valid and has the wem:write scope.
Other WEM endpoints like GET /schedules work fine with the same token.
The error occurs specifically on the PATCH operation.
The response body is empty.
This happens consistently for all agents in the test group.
The ServiceNow instance is London (Kyoto).
Genesys Cloud is UK Prod.
I have checked the WEM documentation for required fields.
The JSON structure matches the example exactly.
No 400 Bad Request errors are returned.
Just a hard 500.
Is there a known issue with bulk schedule updates via Data Actions?
Or is this a backend service outage?
Logs show the Data Action executes successfully.
The failure is at the Genesys API level.