Analytics Detail Query: wrapUpCode always null despite filtering

Running a GET request to /api/v2/analytics/interactions/summary with the granularity set to INTERACTION keeps returning null for the wrapUpCode field. I’ve checked the raw data in the UI and the agents are definitely selecting wrap-up codes. It’s not a data issue, it’s something in how the query is structured or a limitation I’m missing.

Here’s the request body I’m sending:

{
 "dateFrom": "2023-10-01T00:00:00.000Z",
 "dateTo": "2023-10-02T00:00:00.000Z",
 "granularity": "INTERACTION",
 "metrics": [
 "wrapUpCode"
 ],
 "filters": {
 "dimensions": [
 {
 "dimension": "wrapUpCode",
 "type": "STRING",
 "operator": "EQ",
 "value": "Transfer"
 }
 ]
 }
}

The response comes back with a 200 OK, but the wrapUpCode in the interaction details is consistently null.

{
 "interactions": [
 {
 "id": "abc-123-def",
 "wrapUpCode": null,
 "duration": 120000
 }
 ]
}

I’ve tried a few things:

  • Switched the wrapUpCode metric to wrapUpCodeName just to see if the string name works. Still null.
  • Removed the filter to see if it’s a filtering issue. No change, all interactions show null.
  • Checked the queryId for any known limitations in the docs. The docs mention that some metrics aren’t available at the INTERACTION granularity, but wrapUpCode isn’t listed as one of them.

Is this a known limitation with the Analytics API for detail queries? Or am I missing a specific parameter to force the inclusion of the wrap-up code? The SDK method getInteractionsSummary behaves the same way, so it’s not a client-side issue.

Any pointers would be appreciated. The deadline for this report is tight.