Quick question about the Schedule Publish endpoint. We are hitting a 422 Unprocessable Entity error when trying to finalize our weekly schedule via the API. This happens specifically when the schedule includes agents with conflicting shift swap requests that were approved in the UI but not reflected in the draft state.
Environment details:
- Genesys Cloud Version: 2024.1
- Timezone: America/Chicago
- API Endpoint:
POST /api/v2/wfm/schedules/schedule/{scheduleId}/publish
The request body includes the standard publish parameters, but the response payload indicates a validation failure on agent availability overrides. We have verified that the schedule is in DRAFT mode and that all shift swaps have been approved by supervisors.
Here is the YAML configuration for the schedule settings:
scheduleId: "sch_12345678-90ab-cdef-1234-567890abcdef"
publishType: "FULL"
includeAdherence: true
agentPreferences:
- agentId: "agent_001"
shiftSwap: true
timeOff: false
The error message returned is:
{"message": "Validation failed for agent overrides. Check shift swap conflicts."}
Has anyone seen this specific validation error during the publish window? We are running this process every Friday at 16:30 CST. The UI publish works fine, but the API fails consistently. Looking for insights on why the API state differs from the UI state regarding shift swaps.