Legacy Dev Forum Posts

 View Only

Sign Up

When can't I get primaryPresence?

  • 1.  When can't I get primaryPresence?

    Posted 06-05-2025 18:02

    1115 | 2021-01-28 09:13:48 UTC | #1

    【API】 /api/v2/analytics/users/details/query

    【Request Body】 { interval: <7 days before>/<now> userFilters: [ { type: "or", predicates: [ { dimension: "userId", value: <user ID> } ] } ], paging: { pageSize: 1, pageNumber: 1 }, order:"desc" }

    【One Response Body (userDetails)】 [ { "userId”:”<user ID>”, ”primaryPresence": [ { "startTime": "2021-01-18T03:37:15.410Z", "systemPresence": "OFFLINE", "organizationPresenceId": "ccf3c10a-aa2c-4845-8e8d-f59fa48c58e5" } ] } ]

    【Another Response Body (userDetails)】 [ { "userId”:”<user ID>”, ”routingStatus": [ { "startTime": "2021-01-18T02:45:17.607Z", "routingStatus": "NOT_RESPONDING" } ] } ]

    【Question】 What are the conditions for acquiring data that does not include primaryPresence?

    【Remarks】 When I received the response body, I checked the data only for userDetails, so the only data I can present is userDetails.


    anon11147534 | 2021-01-28 10:13:19 UTC | #2

    Hi,

    Applying these presence filters will remove primaryPresence:

    {
     "interval": "2021-01-22T00:00:00.000Z/2021-01-29T00:00:00.000Z",
     "order": "asc",
     "paging": {
      "pageSize": 25,
      "pageNumber": 1
     },
     "presenceFilters": [
      {
       "type": "or",
       "predicates": [
        {
         "type": "dimension",
         "dimension": "organizationPresenceId",
         "operator": "notExists",
         "value": null
        },
        {
         "type": "dimension",
         "dimension": "systemPresence",
         "operator": "notExists",
         "value": null
        }
       ]
      }
     ]
    }

    FYI, the analytics query builder is useful for building these analytics queries.


    1115 | 2021-02-02 06:10:22 UTC | #3

    Thank you for your reply.

    I don't use precenseFilters when I request, so it doesn't meet this requirement.

    Please let me know if there are other conditions that make it impossible to obtain primaryPresence.


    tim.smith | 2021-02-03 16:57:54 UTC | #4

    1115, post:3, topic:9828
    Please let me know if there are other conditions that make it impossible to obtain primaryPresence.

    Are you saying you don't want the response data to contain presence information? Applying filters is the only way to constrain the data in the response; you cannot alter the format of the response.


    system | 2021-03-06 17:10:19 UTC | #5

    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: 9828