Duplicated data on user Details analytics query

Hello.

After monitoring multiple clients for whom we extract user Routing and Presence data, we seem to have found a pattern:

Whenever you query for userDetails in analyticsApi,

{
 "interval": "2022-10-09T22:00:00.000Z/2022-10-10T22:00:00.000Z", //interval is irrelevant, but it is,say, one day
 "order": "asc",
 "paging": {
  "pageSize": "100",
  "pageNumber": "2"
 }
}

you get the following form of response:

{
  "userDetails": [
{
      "userId": "uuid",
      "primaryPresence": [
        {
          "startTime": "2022-10-07T16:19:01.427Z",
          "endTime": "2022-10-10T10:58:21.053Z",
          "systemPresence": "OFFLINE",
          "organizationPresenceId": "uuid"
        },
        {
          "startTime": "2022-10-10T10:58:21.053Z",
          "endTime": "2022-10-10T11:39:51.530Z",
          "systemPresence": "AVAILABLE",
          "organizationPresenceId": "uuid"
        },
        {
          "startTime": "2022-10-10T11:39:51.530Z",
          "endTime": "2022-10-10T12:02:17.511Z",
          "systemPresence": "OFFLINE",
          "organizationPresenceId": "uuid"
        },
        {
          "startTime": "2022-10-10T12:02:17.511Z",
          "endTime": "2022-10-10T16:03:08.694Z",
          "systemPresence": "AVAILABLE",
          "organizationPresenceId": "uuid"
        },
        {
          "startTime": "2022-10-10T16:03:08.694Z",
          "systemPresence": "OFFLINE",
          "organizationPresenceId": "uuid"
        }
      ],
      "routingStatus": [
        {
          "startTime": "2022-10-05T10:36:52.321Z",
          "endTime": "2022-10-10T10:10:33.280Z",
          "routingStatus": "OFF_QUEUE"
        },
        {
          "startTime": "2022-10-10T10:10:33.280Z",
          "endTime": "2022-10-10T10:11:13.229Z",
          "routingStatus": "COMMUNICATING"
        },
        {
          "startTime": "2022-10-10T10:11:13.229Z",
          "endTime": "2022-10-10T10:11:13.230Z",
          "routingStatus": "OFF_QUEUE"
        },
        {
          "startTime": "2022-10-10T10:11:13.230Z",
          "endTime": "2022-10-10T12:55:56.148Z",
          "routingStatus": "OFF_QUEUE"
        },
        {
          "startTime": "2022-10-10T12:55:56.148Z",
          "endTime": "2022-10-10T12:56:36.009Z",
          "routingStatus": "COMMUNICATING"
        },
        {
          "startTime": "2022-10-10T12:56:36.009Z",
          "endTime": "2022-10-10T12:56:36.010Z",
          "routingStatus": "OFF_QUEUE"
        },
        {
          "startTime": "2022-10-10T12:56:36.010Z",
          "endTime": "2022-10-10T15:20:44.289Z",
          "routingStatus": "OFF_QUEUE"
        },
        {
          "startTime": "2022-10-10T15:20:44.289Z",
          "endTime": "2022-10-10T15:20:56.042Z",
          "routingStatus": "COMMUNICATING"
        },
        {
          "startTime": "2022-10-10T15:20:56.042Z",
          "endTime": "2022-10-10T15:20:56.043Z",
          "routingStatus": "OFF_QUEUE"
        },
        {
          "startTime": "2022-10-10T15:20:56.043Z",
          "endTime": "2022-10-10T15:23:29.852Z",
          "routingStatus": "OFF_QUEUE"
        },
        {
          "startTime": "2022-10-10T15:23:29.852Z",
          "endTime": "2022-10-10T15:26:46.730Z",
          "routingStatus": "COMMUNICATING"
        },
        {
          "startTime": "2022-10-10T15:26:46.730Z",
          "routingStatus": "OFF_QUEUE"
        }
      ]
    },
{user2},
{user3}
 ],
  "totalHits": number
}

and in the scenario where one user can occupy more than 100 entities, the rest will be sent through requesting the next page.

It seems that querying this way produces duplicates in the data. You can get either 2 presence Statuses either 2 routing statuses..

Is this a known issue and is there a way for modifying query in such a way that the duplicates are avoided?

Thank you in advance,
Roman

Hello,

We are aware of that behavior. Here is a blog post explaining it and how you can improve your query results: https://developer.genesys.cloud/blog/2022-04-21-Analytics-conversations-api-behavior/

Best

Hello Ebenezer, thank you for your reply, this actually clears everything for us, thank you !

have a great day :slight_smile:

This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.