Running into a weird issue where the Quality API returns interaction data, but the surveyResults array is always empty, even though I can see the CSAT scores in the Genesys Cloud UI.
I’m using the C# SDK (genesyscloud_quality_api) to fetch interactions. The goal is to tie the CSAT score back to the specific conversation ID for a custom report. Here is the code snippet I’m using:
var apiInstance = new InteractionApi();
var opts = new GetInteractionsOpts
{
PageSize = 25,
SortBy = "createdDate",
SortOrder = "desc"
};
var result = await apiInstance.GetInteractions(opts);
foreach (var interaction in result.Entities)
{
Console.WriteLine($"Interaction ID: {interaction.Id}");
Console.WriteLine($"Survey Count: {interaction.SurveyResults?.Count ?? 0}");
if (interaction.SurveyResults != null && interaction.SurveyResults.Any())
{
foreach (var survey in interaction.SurveyResults)
{
Console.WriteLine($"Score: {survey.Score}");
}
}
}
The output shows Survey Count: 0 for every single interaction. I’ve verified that these interactions definitely have completed surveys. The interaction.SurveyResults property is just null or an empty list.
I tried switching to the raw REST endpoint /api/v2/quality/interactions using HttpClient with the same OAuth token, but the JSON response looks identical:
{
"entities": [
{
"id": "12345-abcde",
"interactionType": "webchat",
"surveyResults": []
}
]
}
Is there a specific filter or header required to populate the survey data? The documentation for the Interaction object mentions the field exists, but doesn’t explain why it might be empty. I’ve also checked the survey field on the interaction object itself, which contains metadata like surveyId and status, but not the actual response scores.
I need the numeric score to calculate averages. Right now I’m stuck trying to figure out if I need to make a second call to /api/v2/quality/surveys/{surveyId} for every single interaction, which seems inefficient for large datasets.
Any idea why the inline survey results aren’t coming through? I’ve tried adding expand query parameters but nothing changed. The timezone is US/Pacific if that matters for data availability windows.