Trying to pull CSAT survey results directly from the Quality API for a custom dashboard. The goal is to join evaluation data with the specific interaction ID so we can filter by queue later.
I’m hitting the /api/v2/quality/evaluations endpoint. The docs say the response includes an interaction object with the ID and type. I need the csat score inside that object or linked to it.
Here’s the GET request I’m sending:
GET /api/v2/quality/evaluations?interactionId=12345&includeInteraction=true
The 200 OK response comes back with the evaluation details. The interaction field is present. It has the id and type (which is conversation). But the csat data is missing. The surveyResult field is null.
I checked the actual survey in the admin UI. The survey is active. Responses are coming in. I can see the score in the standard reports.
I tried adding surveyId to the query params. No change.
I tried fetching the survey response directly via /api/v2/surveys/responses. That works. I get the score. But that endpoint doesn’t give me the evaluation ID or the agent name easily. I have to cross reference the interaction ID with the conversation API. That’s expensive.
The Quality API should have this linked. The evaluation record clearly shows it was tied to a survey.
Is there a specific query param to expand the survey data? Or do I have to write a script to loop through evaluations and fetch each survey response individually?
Here’s the JSON from the evaluation response:
{
"id": "eval-123",
"interaction": {
"id": "conv-456",
"type": "conversation"
},
"surveyResult": null,
"evaluations": [
{
"questionId": "q-1",
"score": 5
}
]
}
The surveyResult being null is the issue. Why is it null if the survey was completed? I’ve checked the survey configuration. It’s set to “Include in evaluation”.
Anyone else seen this? The docs are vague on how the survey data populates in this specific endpoint.