Quality API interaction_id filter returning empty CSAT results

Why does this setting return zero records when I know responses exist for the session?

Using the Quality API to pull CSAT scores tied to specific interactions. The docs suggest passing the interaction_id in the filter array, but the response body is consistently empty even when I hardcode a known interaction ID that has a completed survey.

curl -X POST 'https://{{env}}.mygenesys.cloud/api/v2/quality/evaluations/query' \
-H 'Authorization: Bearer {{token}}' \
-H 'Content-Type: application/json' \
-d '{
 "filter": [
 {
 "field": "interactionId",
 "op": "eq",
 "value": "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
 }
 ],
 "orderBy": [
 {
 "field": "createdDate",
 "direction": "desc"
 }
 ]
}'

The endpoint returns 200 OK with an empty items array. I’ve verified the interaction ID exists in the conversation history and the survey was completed. Is the interactionId field mapped incorrectly in the filter payload, or is there a specific scope required for this query that I’m missing in the OAuth token?

I think the Quality Evaluation API does not support direct filtering by interaction_id in the standard query endpoint. The filter parameter expects evaluation-specific attributes like evaluatorId or dateRange, not the underlying interaction UUID. You are likely hitting an empty result because the schema rejects the unknown key silently or filters out everything since no evaluation has an attribute named interaction_id.

To get CSAT scores for a specific interaction, you need to query the interaction details first, then filter evaluations by the sessionId or use the interaction endpoint to retrieve associated scores directly. Here is the correct approach using the Interaction API to get the CSAT score:

curl -X GET 'https://{{env}}.mygenesys.cloud/api/v2/interactions/details/{{interaction_id}}' \
-H 'Authorization: Bearer {{access_token}}' \
-H 'Accept: application/json'

Look for the csat object in the response payload. If you strictly need to use the Quality API, you must first retrieve the evaluation IDs linked to that interaction by querying the interaction details, then query evaluations by those specific IDs. However, the Interaction Details endpoint is more direct for CSAT.

Reference: Genesys Cloud Interaction Details API

In my n8n pipelines, I avoid the Quality API for simple CSAT lookups unless I need the full evaluation form data. The latency on the Quality query is significantly higher, and the filtering logic is less intuitive. If you are building a dashboard, pull the interaction details and extract the csat.score directly from the response body. This bypasses the need for complex filter arrays and reduces API calls by half.

1 Like

It’s worth reviewing at using the POST /api/v2/quality/evaluations/scoring endpoint with the appropriate scoring payload instead of trying to force a filter on interaction_id. The scoring endpoint does not index the interaction ID directly for retrieval, which is why your previous attempts returned empty sets.

In Go, I typically handle this by submitting the scoring request via the ScoreEvaluation method in the PureCloudPlatformClientV2 SDK. This avoids the ambiguity of the general query filter. If you need to batch process these, construct a concurrent worker pool to submit scoring requests for a slice of interaction IDs. Ensure your HTTP client has a proper timeout and retry middleware, as the Quality API can be rate-limited.

_, _, err := platformClient.QualityClient.ScoreEvaluation(scoringRequest)
if err != nil {
 log.Printf("Error scoring evaluation: %v", err)
}

This approach guarantees you get the correct scoring result tied to the specific evaluation session.

2 Likes

Yep, this is a known issue… The query endpoint silently drops unknown filters. Use the specific interaction endpoint instead.

  • GET /api/v2/quality/conversations/{conversationId}/evaluations/{evaluationId}
  • Include quality:evaluation:read scope in your Postman pre-request.
  • Newman tests confirm this returns the evaluation object directly.

Ah, yeah, this is a known issue… the query endpoint silently drops unknown filters. Use the specific interaction endpoint instead.

  • GET /api/v2/quality/conversations/{conversationId}/evaluations
  • Include quality:evaluation:read scope in your Postman pre-request.
  • Newman tests confirm this returns the evaluation object directly.
2 Likes