Quality Evaluation Export Failing with 422 Unprocessable Entity on Custom Fields

Just noticed that our automated quality export process is failing with a 422 Unprocessable Entity error. The issue occurs when requesting evaluations that include specific custom scorecards created in Q4. The API endpoint is /api/v2/analytics/quality/evaluations. The payload specifies filterBy=scorecardId:eq:xyz-123 and requests fields=score,agentName,supervisorName. Standard evaluations export correctly, but these specific custom fields trigger the validation error. The error message states that the requested fields are not available for the selected scorecard version. This is critical for our legal discovery requests as the chain of custody relies on these specific metadata fields being present in the bulk export. We are using the Genesys Cloud Python SDK version 2.0.1. The environment is EU-West-1. The scorecards are active and visible in the UI. The Architect flow logs show the request is sent correctly, but the response body contains the validation error. We have checked the field mappings and they appear correct. Is there a known limitation with exporting custom scorecard fields via the analytics API? Has anyone seen this specific 422 error with custom scorecards? Any insights would be appreciated. Thank you for your help.

It depends, but generally… The 422 error in the Analytics Quality endpoint often stems from a mismatch between the requested field definitions and the actual schema of the custom scorecards, particularly when those scorecards were recently modified or are nested within complex evaluation structures. While the API documentation suggests standard field names, custom scorecards created in Q4 might have underlying data types that differ from the default numeric or string expectations of the export engine. The filter scorecardId:eq:xyz-123 is correct for targeting the specific scorecard, but the fields parameter might be requesting a field that is not directly available at the root level of the evaluation object without explicit expansion. Instead of relying on the generic score field, verify if the custom scorecard requires a specific section ID or metric ID to be included in the request body. The export process may fail if the payload does not explicitly define the structure of the custom metrics being requested. A more robust approach is to first query the scorecard definition endpoint to retrieve the exact metric IDs and their associated data types. Then, construct the export payload to include these specific IDs within the metrics array rather than relying on high-level field names. This ensures the backend can map the requested data to the correct storage schema. Additionally, check if the custom scorecard has any conditional logic that might result in null values for certain metrics, as the export engine might reject payloads that attempt to export undefined or null-able fields without explicit handling. If the issue persists, try reducing the scope of the export to a single evaluation instance to isolate whether the problem is with the filter logic or the field definition itself. This methodical approach helps identify whether the error is due to schema incompatibility or a deeper issue with the scorecard configuration.