We are trying to build a custom New Relic dashboard that correlates Genesys Cloud Quality CSAT survey responses with the original interaction metadata. The goal is to ingest these as custom events in NRQL.
The issue is that the Quality API endpoints don’t seem to expose the interactionId directly in the survey response payload. When I query for survey responses, I get the surveyResponseId and score, but nothing that ties it back to the specific interaction record in the Analytics API.
Here is the Python code we are using to fetch the survey responses:
import requests
import json
headers = {
'Authorization': f'Bearer {access_token}',
'Content-Type': 'application/json'
}
url = "https://api.mypurecloud.com/api/v2/quality/surveys/responses"
params = {
'pageSize': 100,
'afterId': 'last_seen_id'
}
response = requests.get(url, headers=headers, params=params)
data = response.json()
for item in data['entities']:
# item structure:
# {
# "id": "survey-response-uuid",
# "score": 4.5,
# "surveyId": "survey-uuid",
# "evaluatorId": "agent-uuid",
# "evaluatedEntityId": "interaction-uuid?" <-- THIS IS MISSING
# }
print(f"Survey: {item['id']}, Score: {item['score']}")
The evaluatedEntityId field is empty or null in the response. I expected this to contain the interaction ID so I could join it with the Analytics API data. Without this link, we can’t attribute the CSAT score to the specific call or chat session in our New Relic dashboards.
Here is what we have tried so far:
- Checked the API documentation for
/api/v2/quality/surveys/responses. It listsevaluatedEntityIdas optional, but it’s always null for us. - Tried querying the Analytics API for interactions with a specific date range, but there is no
surveyResponseIdfield in the interaction entity. - Looked into the Webhook events for
quality:surveyResponseCreated, but the payload is identical to the REST API response. - Verified the OAuth token has the
quality:responses:readscope.
Is there a different endpoint or a specific query parameter I am missing to get the interaction ID? Or is the only way to correlate this data by matching timestamps and agent IDs, which feels unreliable?