I have been trying to build a report that links CSAT survey responses directly to the underlying interaction ID in Genesys Cloud. The goal is to pull the evaluation score and tie it back to the specific call or chat session. I am using the genesyscloud Python SDK to make these requests.
The documentation says that GET /api/v2/quality/evaluations should return evaluations associated with interactions. I have the interaction IDs from our internal database, and I know the surveys were submitted because I can see them in the UI under the Quality section. However, when I query the API with the correct interactionId filter, I get an empty list back.
Here is the code snippet I am using:
from genesyscloud.rest import Configuration
from genesyscloud.quality_api import QualityApi
config = Configuration()
config.host = 'https://api.us.genesyscloud.com'
config.access_token = my_access_token
quality_api = QualityApi(Configuration(config))
# I know this interaction exists and has a CSAT result
interaction_id = 'a1b2c3d4-e5f6-7890-abcd-ef1234567890'
try:
resp = quality_api.post_quality_evaluations(
body=EvaluationQueryRequest(
query=EvaluationQuery(
filters=[
EvaluationFilter(
field='interactionId',
op='eq',
value=interaction_id
)
]
)
)
)
print(f"Found {len(resp.entities)} evaluations")
for entity in resp.entities:
print(entity.id)
except Exception as e:
print(f"Error: {e}")
The output is always Found 0 evaluations. No error is thrown, just an empty array. I have verified that the interactionId is correct by checking the UI. I also tried filtering by type: survey but that did not change the result. Is there a specific permission I am missing on the OAuth token, or is the interactionId field in the evaluation object different from the standard interaction ID? I have quality:evaluation:view and analytics:report:view scopes enabled.