Trying to pull a custom interval report for web messaging sessions using the Analytics Conversations Aggregates endpoint. The goal is to aggregate duration and messageCount grouped by a custom participant attribute customerTier. The query runs without throwing an HTTP error, but the resulting buckets for customerTier are coming back empty or null in the response payload.
Here’s the environment:
- Kotlin 1.8 on Android (running this via a background worker for debugging)
- Genesys Cloud Platform SDK (latest version)
- Using
AnalyticsApiclient
The query structure looks correct based on the docs. I’m setting the interval to PT1H and grouping by conversation:participant:attribute:customerTier. The timeFilter is set to the last 24 hours. When I run this directly in the Postman collection provided by Genesys, it works fine. But when I serialize the query object in Kotlin and send it via the SDK, the aggregation results are missing the group-by keys.
val query = AnalyticsQuery()
.interval("PT1H")
.timeFilter(TimeFilter()
.type("relative")
.from("-P1D")
.to("now"))
.view("conversations-all")
.groupBys(listOf(AnalyticsGroupBy()
.type("string")
.path("conversation:participant:attribute:customerTier")))
.aggregates(listOf(AnalyticsAggregation()
.type("sum")
.path("duration")))
val response = analyticsApi.postAnalyticsConversationsQuery(query)
The response status is 200 OK. The entities list contains interval objects, but the groupBy values are null. I’ve verified the attribute exists and is populated in the conversation logs. Is there a specific serialization issue with the AnalyticsGroupBy object in the Kotlin SDK? Or am I missing a required field in the query structure that makes the grouping fail silently? The JSON payload being sent looks identical to the Postman request that works.