Legacy Dev Forum Posts

 View Only

Sign Up

  • 1.  serviceLevel Metric

    Posted 06-05-2025 18:10

    mayliwk | 2016-07-13 13:38:23 UTC | #1

    What API do I need to call to obtain the service level metric?

    Thanks


    KevinGlinski | 2016-07-13 14:38:38 UTC | #2

    Should be /api/v2/analytics/queues/observations/query


    mayliwk | 2016-07-13 15:25:25 UTC | #3

    This call is only returning the below data:

    Response { "results": [ { "group": { "queueId": "37fcfa74-515c-4d5d-a474-ba9b8a7ec6a0" }, "data": [ { "metric": "oActiveUsers", "stats": { "count": 24 } }, { "metric": "oMemberUsers", "stats": { "count": 24 } } ] }, { "group": { "mediaType": "voice", "queueId": "37fcfa74-515c-4d5d-a474-ba9b8a7ec6a0" }, "data": [ { "metric": "oInteracting", "stats": { "count": 0 } }, { "metric": "oWaiting", "stats": { "count": 0 } } ] }, { "group": { "mediaType": "chat", "queueId": "37fcfa74-515c-4d5d-a474-ba9b8a7ec6a0" }, "data": [ { "metric": "oInteracting", "stats": { "count": 0 } }, { "metric": "oWaiting", "stats": { "count": 0 } } ] }, { "group": { "mediaType": "email", "queueId": "37fcfa74-515c-4d5d-a474-ba9b8a7ec6a0" }, "data": [ { "metric": "oInteracting", "stats": { "count": 0 } }, { "metric": "oWaiting", "stats": { "count": 0 } } ] }, { "group": { "mediaType": "callback", "queueId": "37fcfa74-515c-4d5d-a474-ba9b8a7ec6a0" }, "data": [ { "metric": "oInteracting", "stats": { "count": 0 } }, { "metric": "oWaiting", "stats": { "count": 0 } } ] } ] }


    KevinGlinski | 2016-07-13 15:37:25 UTC | #4

    Have you actually put calls in the queue? I think that stat will only show up if it has a value. This view would also show that value so what you see there for service level if it is a non "-" value https://apps.mypurecloud.com/directory/#/engage/queues


    mayliwk | 2016-07-13 17:45:41 UTC | #5

    The queue I am looking at has calls and it is showing data on the view within the link you posted. The response is still the same and does not have the service level data.


    KevinGlinski | 2016-07-13 18:03:47 UTC | #6

    what does your query look like?


    mayliwk | 2016-07-13 18:08:26 UTC | #7

    { "filter": { "type": "and", "clauses": [ { "type": "and", "predicates": [ { "type": "dimension", "dimension": "queueId", "value": "ae2bc5c5-71de-4a67-a632-a09f93c92594" } ] } ] } }


    KevinGlinski | 2016-07-14 14:02:58 UTC | #8

    Sorry, i was wrong. This is the correct uri /api/v2/analytics/conversations/aggregates/query

    To quote the analytics dev team

    observations are meant to be a snapshot/right now collection of metrics. these are different from the rolling/trailing indicators you get from the aggregate metrics endpoint which service level is. since it is fundamentally based on metrics in aggregate over some interval. observations have no interval

    So my request with this body returns the service level for today 7-14

    { "interval": "2016-07-14T01:00:00.000Z/2016-07-14T23:00:00.000Z", "groupBy": ["queueId"], "filter": { "type": "and", "clauses": [ { "type": "and", "predicates": [ { "type": "dimension", "dimension": "queueId", "value": "1676f201-e3fd-4ed1-be7f-ea6aa0373592" } ] } ] } }


    system | 2017-08-28 19:25:15 UTC | #9


    This post was migrated from the old Developer Forum.

    ref: 130