Trying to stitch together CSAT survey results with the actual call details, but the data models seem to live in different universes. I’m pulling CSAT responses via the Quality API, but I can’t find a direct interactionId or conversationId in the response payload to link back to the specific call in the Interaction History.
Here’s the flow I’ve built so far. First, I grab the survey responses:
response = genesys_client.quality_api.get_survey_responses(
survey_definition_id='my-survey-id',
expand=['responses', 'agent'],
page_size=100
)
The JSON I get back looks something like this:
{
"id": "response-uuid-123",
"surveyDefinitionId": "survey-uuid-456",
"responses": [
{
"questionId": "q1",
"answer": "5"
}
],
"createdDate": "2023-10-27T14:30:00.000Z"
}
There’s no field that screams “this belongs to interaction UUID XYZ”. I tried looking at the createdDate and trying to match it to interactions within a 10-minute window, but that feels brittle, especially if multiple calls happen at once or if there are delays in survey submission.
I checked the API docs for getSurveyResponse and getSurveyResponses, but nothing obvious jumps out. Is there a hidden field I’m missing? Or do I need to query the Interaction History API with the survey’s createdDate and filter by agent ID? That seems expensive if I’m doing this for thousands of records.
Also, I noticed the expand parameter doesn’t accept interaction as a valid value, which is weird. Am I supposed to parse the survey URL or something?
Anyone solved this cleanly without writing a custom job to cross-reference timestamps? Feels like I’m missing a simple join key.