Outbound Campaign Error 403 on Agent Assignment during Schedule Publish

Stumbled on a weird bug today with the Outbound Dialing module when trying to sync agent availability from WFM. We are using the Genesys Cloud SDK for Python (version 15.2.0) to automate the assignment of agents to our priority outbound campaigns based on their published weekly schedules.

The issue occurs specifically when an agent has a shift swap approved in WFM but the outbound campaign configuration hasn’t been updated to reflect the new timezone offset for that specific day. When the script attempts to call POST /api/v2/outbound/campaigns/{campaignId}/agents to add the agent to the campaign for their shifted hours, we receive a 403 Forbidden error with the message: Agent is not available for outbound dialing in the specified time range.

I have verified that the agent’s schedule is published and active in the WFM dashboard. The shift swap is confirmed. However, the Outbound module seems to be caching the original schedule data or failing to recognize the swap for availability checks. Restarting the campaign doesn’t help.

Is there a specific API endpoint to force a refresh of agent availability data between WFM and Outbound? Or is this a known limitation with shift swaps affecting outbound eligibility? We need this to work automatically to avoid manual intervention every week.

Thanks for the help.

Cause: The SDK sends the agent assignment with a stale timezone offset, triggering a 403 when the campaign validation checks against the WFM schedule.

Solution: Force a refresh of the agent’s availability context before calling the assignment endpoint.

# Refresh agent state before assignment
client.outbound.post_campaigns_campaign_id_agents(agent_id, body=agent_body, refresh_state=True)