Can’t quite understand why the Outbound Campaign API is returning a 409 Conflict error when attempting to pause a campaign programmatically. This is happening specifically during our weekly schedule publication window in the Chicago timezone.
We are using the Genesys Cloud Outbound API v2 to manage campaign states based on workforce availability. The workflow involves checking the WFM schedule adherence metrics via the Analytics API, calculating available agent capacity, and then triggering a pause or resume on the outbound dialing campaigns using PATCH /api/v2/outbound/campaigns/{campaignId}.
The issue occurs when the campaign is actively dialing. The request body includes the standard state change parameters:
{
"state": "PAUSED",
"reasonCode": "WFM_SCHEDULE_ADJUSTMENT"
}
The error response consistently returns a 409 with the message: “Campaign cannot be paused while dialing sequences are in progress.” However, our Architect flow is designed to wait for all active calls to complete before triggering the API call. We have added a 30-second buffer after the last call status updates to “COMPLETED” in the WFM dashboard.
Interestingly, this does not happen when we pause the campaign manually through the UI. The UI seems to handle the state transition differently, possibly queuing the pause request until the current batch completes. We need this automation to work because our shift swaps and time-off requests can change agent availability mid-campaign, and manual intervention is not scalable for our 200+ agent environment.
Is there a specific API parameter or a different endpoint we should be using to queue a state change rather than enforce an immediate stop? Or is there a way to check the internal dialer state to ensure no threads are holding the campaign open before sending the pause request? We are using the latest Python SDK, but the behavior seems consistent across direct REST calls as well.