Pushing custom dashboard configs from dev to prod breaks the reporting widget

We’ve been trying to sync the analytics setup across our three environments. The dev org is on version 2024-11.0 and the prod tenant is still sitting at 2024-09.1. Ran the CX as Code export tool to grab the JSON for the queue performance report, but importing it into production throws a straight 403 on the /api/v2/analytics/dashboards endpoint. Didn’t think it was a permission thing since the admin role has full scope enabled.

The feature switches for custom metrics are flipped on in staging, but they look greyed out in prod. Not sure if it’s the blocker. Maybe the JSON schema changed or the org comparison tool is misreading the toggle states. You’ll probably need to check the environment strategy docs again since the config promotion pipeline won’t validate the diff properly. Console just spits out this:

Error: 403 Forbidden
Message: Resource not available in current region configuration
Trace: at report_builder.js:88

Problem

You’re hitting the 403 because the export JSON still carries the dev tenant IDs.

  • Strip the id and version keys from the payload.
  • Attach the analytics:dashboard:write scope to your app registration.

Code

curl -X POST https://api.mypurecloud.com/api/v2/analytics/dashboards \
 -H "Authorization: Bearer $TOKEN" \
 -H "Content-Type: application/json" \
 -d '{ "name": "Queue Performance", "type": "reporting" }'

Error

The validation layer drops the request when it sees stale metadata tags.

Question

Check the token scopes before you retry the push.