Does anyone understand why the PUT /api/v2/routing/campaigns/{campaignId} endpoint returns a 400 Bad Request with "error":"invalid_queue_id" when referencing a valid predictive queue? The payload includes the correct routing_profile_id and skill mappings verified in Architect v1.0. This occurs specifically during automated campaign provisioning via ServiceNow Data Actions in the EU1 region.
Make sure you validate the queue’s predictive routing capability before attempting the assignment. The invalid_queue_id error in this context rarely points to a non-existent resource; instead, it typically indicates a mismatch between the queue’s configuration and the campaign’s routing strategy requirements.
When provisioning campaigns via ServiceNow Data Actions, the integration layer must explicitly verify that the target queue has predictiveRoutingEnabled set to true in its configuration payload. A standard manual queue often defaults to longestIdle or roundRobin strategies, which are incompatible with predictive campaign assignments. The API strictly enforces this constraint to prevent misdirected traffic, resulting in the 400 error you are observing.
To resolve this, adjust the ServiceNow workflow to include a preliminary GET /api/v2/routing/queues/{queueId} call. Inspect the response for the routingStrategy field. If it does not match predictive, trigger a PATCH request to update the queue settings before proceeding with the campaign update. This ensures the queue is fully prepared to accept predictive assignments.
Additionally, verify that the skill mappings in the payload align perfectly with the queue’s configured skills. Even if the queue is predictive-enabled, a missing or mismatched skill reference in the routing_profile_id context can trigger the same generic error code. The EU1 region enforces strict schema validation, so ensure the JSON structure matches the latest API documentation exactly. Adding a retry mechanism with exponential backoff in the Data Action can also help manage transient validation states during high-volume provisioning batches. This approach has consistently resolved similar integration failures for our AppFoundry partners managing multi-region deployments.
This looks like a provider version mismatch. The 400 error often stems from the Terraform provider not recognizing the predictiveRoutingEnabled flag in older versions. Check that you are using provider 1.18+ and ensure the queue config includes outboundCampaignSettings explicitly.