I am building a custom analytics dashboard for our team using the Genesys Cloud Analytics API. The goal is to pull detailed interaction data and map it to our internal reporting system. I am using the Python SDK to make the calls, specifically post_analytics_interactions_details_query.
The query works fine for most fields. I get start times, agent names, and duration. But the wrapUpCode field is always coming back as null. This is confusing because I know the agents are setting wrap-up codes. I checked the PureCloud UI and the codes are there.
Here is the query payload I am sending:
query_body = {
"dateFrom": "2023-10-01T00:00:00.000Z",
"dateTo": "2023-10-31T23:59:59.999Z",
"size": 100,
"groupBy": "agentId",
"filter": {
"type": "and",
"predicates": [
{
"field": "mediaType",
"operator": "equal",
"value": "voice"
}
]
},
"select": [
"agentId",
"wrapUpCode",
"duration",
"startTime"
]
}
I am getting a 200 OK response. The JSON response looks like this:
{
"entities": [
{
"agentId": "12345",
"wrapUpCode": null,
"duration": 120,
"startTime": "2023-10-01T10:00:00.000Z"
}
]
}
I tried changing the select field to wrapUpCodeId and wrapUpCodeName just in case, but they are also null. I thought maybe it was a permissions issue, but I am using a service account with full analytics read access.
Is this a known limitation with the detail query endpoint? Or am I missing a filter predicate? I have tried adding wrapUpCode to the filter but that just returns empty results.
The documentation says wrapUpCode is a valid metric for voice interactions. I am stuck on this. Any ideas?