Routing simulation webhook returns empty results array

The simulation endpoint keeps returning a 202 Accepted but the webhook callback fires with a completely empty results array. I’ve already run through the basics.

  1. Validated the schema against the forecast constraints.
  2. Checked the webhook URL for CORS blocks.
const simPayload = {
 simulationType: "routing",
 routingProfileIds: ["profile_882"],
 agentAvailability: { matrix: "live" },
 volumeForecast: { directive: "standard" }
};

The async job just stalls at PROCESSING after the TypeScript client POSTs to /api/v2/wfm/scheduling/simulations. The callback doesn’t push the wait time projection data.

The API docs explicitly state the routing sim endpoint defers webhook dispatch until the async job completes. Queue usually lags. Don’t trust the 202. Try polling the status resource directly instead of wiring another EventBridge rule.

curl -X GET "https://api.mypurecloud.com/api/v2/analytics/queues/routingsimulation/{jobId}" \
-H "Authorization: Bearer $TOKEN"

Watch the state enum before your Lambda times out.

{
 "status": "completed",
 "results": [],
 "error": "POLICY_VIOLATION",
 "trace": "chrome.extension.sendRequest... [LOG TRUNCATED]
}

The point above is correct about the state enum. But empty array often means payload drops during transmission. It’s like the Chrome extension storage quota issue. System rejects data if header missing.

Check network tab in dev tools. You’ll see actual response before webhook callback triggers. I see this pattern in screen recording flows when codec switch happens too fast. Backend drops the buffer.

Ensure webhook URL uses https. Routing sim service forces redirect. If http is used, callback fails silent.

Also check if browser extension blocks request. Ad blockers flag analytics domain. This causes empty result.

curl -v -H "Content-Type: application/json" -H "X-Correlation-Id: test" https://api.mypurecloud.com/api/v2/analytics/queues/routingsimulation/{jobId}

The X-Correlation-Id helps find log in admin portal. Without this, logs disappear.

Is routing profile active? If profile is inactive, sim returns empty.

You can try disabling hardware acceleration in chrome://settings. Sometimes GPU process interferes with network stack. I see this in media recording tools. Packet loss increases.

Also check request body size. If too large, Chrome throttles request. This mimics timeout error.

The routing simulator treat payload like media stream. If buffer flush wrong, result empty. It’s similar to how Chrome handle manifest v3 policy change. System rejects payload if format wrong. You need ensure JSON structure valid.

Log snippet below shows error. But I cut end part. Too long.

What version of Chrome do you use?

nice-cxone-studio-sdk handles routing simulation payloads differently than the standard analytics endpoint. Here is what usually happens when the callback returns an empty array.

  • Checked the webhook signature validation. Failed because the payload hash mismatched.
  • Swapped the routingProfileIds array for a single string. Still got results: [].
  • Added explicit includeHistoricalData: false to the request body. The simulation completes, but the callback strips the array anyway.

The system drops the results object when the agentAvailability matrix exceeds the 500KB limit. You’ll need to truncate that matrix or paginate it before sending. Try passing maxAgentCount: 50 in the config block. It’s worth checking if the backend is silently truncating the JSON. What does the raw event log show for the payloadSize field? The timeout threshold usually kicks in right after that.

403 Forbidden triggers when the simulationType scope isn’t granted. The polling suggestion above works, but you’ll hit a dead end without the right OAuth token. Check your app credentials and update the scopes array.

curl -X POST "https://api.mypurecloud.com/api/v2/oauth/token" -d "grant_type=client_credentials&scope=routing:simulation:read"

Retrying the job clears the cache. Usually fixes it right up.