Jeff | 2022-03-08 00:46:56 UTC | #1
Hi All,
Just wanting to check if this is expected behaviour or is a bug.
I'm pulling metrics via /api/v2/analytics/queues/observations/query and have started to encounter where the results are showing "truncated": true
From what I can tell from the documentation, when truncated, the query should still contain the oldest and newest observations.
truncated
(boolean) Flag for a truncated list of observations. If truncated, the first half of the list of observations will contain the oldest observations and the second half the newest observations.
However I've noticed that when the truncated is true, the "oldest observations" are not there.
For example: If I just run the query with only 1 queue and 1 set of metrics, the results aren't truncated and show the correct 'oldest' observation at 00:04:29 UTC
(Note: I've removed extra info from the observations and just left the date and id)
"results": [ { "group": { "queueId": "4e62c0b2-f34a-423b-90eb-4ee1775d90d4", "mediaType": "voice" }, "data": [
{ "metric": "oWaiting", "stats": { "count": 16 }, "truncated": false, "observations": [ { "observationDate": "2022-03-07T00:04:29.295Z", "conversationId": "ca7af256-c311-4789-a55f-7c6adf0bc0d8", }, { "observationDate": "2022-03-07T00:07:14.982Z", "conversationId": "511e05e9-87c4-4818-ac59-7fc4dfc25757", }, { "observationDate": "2022-03-07T00:08:09.141Z", "conversationId": "86dd622d-4c3e-47e1-b03a-ccab718e6955", }, { "observationDate": "2022-03-07T00:12:32.142Z", "conversationId": "4bc6c083-e4c9-4907-9f92-99637337fc86", }, { "observationDate": "2022-03-07T00:15:39.533Z", "conversationId": "9927e7a3-bd7a-4818-aba8-14e9a3ec12a2", }, { "observationDate": "2022-03-07T00:21:16.612Z", "conversationId": "508e8fe7-2910-412b-b6a8-8101bda0cf39", }, { "observationDate": "2022-03-07T00:21:55.344Z", "conversationId": "81e9414d-8972-4092-92fe-e2cee281cfa0", }, { "observationDate": "2022-03-07T00:24:19.777Z", "conversationId": "efaf8a30-57d4-470f-bcc8-26d26de44426", }, { "observationDate": "2022-03-07T00:29:44.262Z", "conversationId": "399b496a-b942-4304-9fc5-6b204b411a78", }, { "observationDate": "2022-03-07T00:36:11.164Z", "conversationId": "6e379748-9591-4760-b5a1-4e1ccf6142c1", }, { "observationDate": "2022-03-07T00:39:44.956Z", "conversationId": "6295041f-c2a7-4bcc-a356-bb04f82255cd", }, { "observationDate": "2022-03-07T00:42:17.760Z", "conversationId": "fa88b2df-6ebf-4551-8064-26eea58b2e7a", }, { "observationDate": "2022-03-07T00:45:01.425Z", "conversationId": "cdd46b4b-10d7-4d1a-b4b5-c2f86f85c51a", }, { "observationDate": "2022-03-07T00:53:00.661Z", "conversationId": "54b5903e-5de4-4f94-a59e-d721708c4772", }, { "observationDate": "2022-03-07T00:56:42.696Z", "conversationId": "65965fb4-4846-4df1-8a00-d4f35a8b1495", }, { "observationDate": "2022-03-07T00:57:02.325Z", "conversationId": "e5bf2716-e6c1-4147-9c09-c7d763be03a8", } ] } ] },
However when I run the query with other queues and metrics, when it results in the results being truncated - with the 'oldest' observations are missing entirely.
The 'oldest' observation is now 00:21:55 UTC (with the 6 'oldest' observations not listed at all)
"results": [ { "group": { "queueId": "4e62c0b2-f34a-423b-90eb-4ee1775d90d4", "mediaType": "voice" }, "data": [
{ "metric": "oWaiting", "stats": { "count": 16 }, "truncated": true, "observations": [ { "observationDate": "2022-03-07T00:21:55.344Z", "conversationId": "81e9414d-8972-4092-92fe-e2cee281cfa0", }, { "observationDate": "2022-03-07T00:24:19.777Z", "conversationId": "efaf8a30-57d4-470f-bcc8-26d26de44426", }, { "observationDate": "2022-03-07T00:29:44.262Z", "conversationId": "399b496a-b942-4304-9fc5-6b204b411a78", }, { "observationDate": "2022-03-07T00:36:11.164Z", "conversationId": "6e379748-9591-4760-b5a1-4e1ccf6142c1", }, { "observationDate": "2022-03-07T00:39:44.956Z", "conversationId": "6295041f-c2a7-4bcc-a356-bb04f82255cd", }, { "observationDate": "2022-03-07T00:42:17.760Z", "conversationId": "fa88b2df-6ebf-4551-8064-26eea58b2e7a", }, { "observationDate": "2022-03-07T00:45:01.425Z", "conversationId": "cdd46b4b-10d7-4d1a-b4b5-c2f86f85c51a", }, { "observationDate": "2022-03-07T00:53:00.661Z", "conversationId": "54b5903e-5de4-4f94-a59e-d721708c4772", }, { "observationDate": "2022-03-07T00:55:26.888Z", "conversationId": "d836b4f1-e9a3-4794-a3e6-2f3cf41c3752", } ] } ] },
I've noticed this only seems to occur when there's a larger number of interactions in the specific queue (i.e. over 50), and it also seems to impact the Performance > Queues Activity view in Genesys Cloud.
For example: When I loaded the Performance > Queues Activity with all queues listed (including the one above), it showed the Longest Waiting interaction as 26m (which was based on the wrong 'oldest' observation),
However the Dashboard and actual Activity showed the correct Longest Waiting of 50m
 |
 |
I'm assuming the API is not truncating correctly - but wanted to confirm first.
peter.westermann | 2022-03-08 14:18:17 UTC | #2
This is the expected behavior. Details are truncated across all queried queues and metrics. If you query multiple queues, you will get the oldest observations across those queues. That may work out to be 10 for queue A, 5 for queue B, 0 for queue C, and so on.
Jeff | 2022-03-09 00:48:27 UTC | #3
Thanks for the reply Peter.
I will admit based on the Resource Center explanation, I expected when the truncation is applied, it would be per queue metric ( as the 'truncated' boolean value appears on each queue metric individually).
So to confirm using the example below - if Queue B oWaiting observations are truncated, it will affect the 'oldest' appearing for Queue C oInteracting because they are truncated too?
Queue A - oWaiting - truncated = false Queue B - oWaiting - truncated = true Queue C - oWaiting - truncated = false Queue A - oInteracting - truncated = false Queue B - oInteracting - truncated = false Queue C - oInteracting - truncated = true
I tried looking for further info about when/why truncating specifically occurs per metric but couldn't find anything in the limits other than the general overall limits.
Even just using out-of-the-box Performance > Queues Activity views is also affected - we will have to assume that data displayed in the 'Longest Waiting' interaction may be incorrect.
system | 2022-04-08 23:40:32 UTC | #4
This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.
This post was migrated from the old Developer Forum.
ref: 13826