Hey everyone,
I’m running into a weird issue with the Genesys Cloud Analytics API. I’ve got a Python script pulling detail records for our support queue, but the wrapUpCode field is coming back as null for almost every record. This is frustrating because I know agents are selecting wrap-up codes. The web UI shows them just fine.
Here’s the query payload I’m sending to /api/v2/analytics/details/query:
{
"view": "interaction",
"interval": "P7D",
"where": [
{
"type": "equals",
"path": "queue.id",
"value": "12345678-1234-1234-1234-123456789012"
}
],
"groupBy": [],
"select": [
"id",
"startTime",
"wrapUpCode.name",
"wrapUpCode.id",
"agent.name"
]
}
The response looks like this:
{
"totalCount": 150,
"items": [
{
"id": "abc-123",
"startTime": "2023-10-27T14:30:00Z",
"wrapUpCode": {
"name": null,
"id": null
},
"agent": {
"name": "Jane Doe"
}
}
]
}
I’ve verified the division ID and token scopes. I have analytics:detail:read and analytics:report:read. The agent.name populates correctly, so the query isn’t totally broken.
Is this a known limitation with the detail view? Or am I missing a specific where clause filter? I tried adding wrapUpCode.id != null to the where clause, but that just returned zero results.
Any ideas on why the API is stripping this data out? I need this for a custom reporting dashboard we’re building. It’s driving me nuts since the raw interaction data seems to exist elsewhere.