Looking for the cleanest way to map Quality API CSAT survey results back to specific interaction IDs for distributed tracing.
We’re building a pipeline to trace the full lifecycle of customer interactions, including post-call surveys. The goal is to inject the traceparent header from the initial interaction into the CSAT response processing so we can see the full span in Jaeger.
The problem is that the Quality API endpoints for surveys don’t seem to return the original interactionId directly in the response payload. I’m using the Genesys Cloud Python SDK to fetch these responses. Here’s the basic call:
from genesyscloud.quality import QualityApi
quality_api = QualityApi(configuration)
try:
# Fetching survey responses
result = quality_api.post_quality_surveys_responses_query(
body=SurveyQueryRequest(
pageSize=100,
sortBy='dateCreated',
sortAsc=False
)
)
for response in result.responses:
print(f"Survey ID: {response.id}")
# Missing interactionId here?
except Exception as e:
print(f"Error: {e}")
The JSON response contains surveyId and externalId, but no obvious link to the conversation or interaction ID from the /api/v2/conversations namespace. I need that ID to correlate the trace.
Is there a separate call I need to make using the surveyId to get the interaction details? Or is there a query parameter I’m missing in the post_quality_surveys_responses_query method? The docs mention externalId can be used for correlation, but we don’t set a custom external ID on the surveys, so that’s null.
Trying to avoid hitting the Analytics API just for this correlation since the latency adds up when processing high volumes. Any code examples or endpoint hints would be great.