Outbound Campaign State Transition 409 Conflicts on Atomic PATCH

We’re pushing outbound campaign state transitions via TypeScript and hitting 409s on atomic PATCH to /api/v2/outbound/campaigns/{campaignId}. The JSON includes the target state directive, override matrix, and etag. Local capacity checks pass, but it’s rejecting the payload when WFM webhooks are mid-flight.

const payload = { state: ‘ACTIVE’, overrides: { validation: true }, etag: currentEtag }; await httpClient.patch(/api/v2/outbound/campaigns/${id}, payload); The retry interval keeps exceeding the 300ms threshold. Unclear how to handle the etag refresh without dropping the audit trail.

Cause: PureCloudPlatformClientV2 rejects the PATCH request because the etag drifts while WFM webhooks calculate capacity. Which always trips up the validation. Solution: you’ll need to grab the fresh entity first and pass the updated if_match header directly.

from platform_api_python import PureCloudPlatformClientV2
client = PureCloudPlatformClientV2()
outbound = client.OutboundApi()
current = outbound.get_outbound_campaign(campaign_id)
current.state = 'ACTIVE'
outbound.patch_outbound_campaign(campaign_id, current, if_match=current.etag)