Legacy Dev Forum Posts

 View Only

Sign Up

Number of abandoned and handled calls

  • 1.  Number of abandoned and handled calls

    Posted 06-05-2025 18:14

    margolles | 2018-11-19 15:45:07 UTC | #1

    Hello,

    is it possible to retrieve the number of abandoned and handled calls by agent?

    I've seen the post

    https://developer.mypurecloud.ie/forum/t/how-to-get-conversation-details-for-abandoned-calls/279

    where it is described how to get the details of abandoned calls, and it includes "participantId". Is it the way to retrieve all conversation details - given an interval - and search for a userId?

    And what about handled calls?

    Thanks!


    Becky_Powell | 2018-11-19 15:33:28 UTC | #2

    Hi there Jorge,

    Have you tried using the Analytics Query Builder in our Developer Tools to generate your query?

    You can use this tool to generate a conversation aggregate query that returns conversation metrics grouped by agent for a specified time period.


    margolles | 2018-11-19 15:41:49 UTC | #3

    Hi Becky,

    thank you for your answer.

    I've tried to use User Detail, with this request:

        {
         "interval": "2018-11-18T23:00:00.000Z/2018-11-19T23:00:00.000Z",
         "order": "asc",
         "paging": {
          "pageSize": 25,
          "pageNumber": 1
         },
         "userFilters": [
          {
           "type": "and",
           "predicates": [
            {
             "type": "dimension",
             "dimension": "userId",
             "operator": "matches",
             "value": "557d8bba-8cc9-4563-xxxxxxxxxx"
            }
           ]
          }
         ]
        }

    Getting this answer:

        {
          "userDetails": [
            {
              "userId": "557d8bba-8cc9-4563-a951-xxxxxxxxxx",
              "primaryPresence": [
                {
                  "startTime": "2018-11-09T08:28:40.683Z",
                  "endTime": "2018-11-19T09:08:28.072Z",
                  "systemPresence": "OFFLINE",
                  "organizationPresenceId": "ccf3c10a-aa2c-4845-xxxxxxxx"
                },
                {
                  "startTime": "2018-11-19T09:08:28.072Z",
                  "endTime": "2018-11-19T09:55:11.598Z",
                  "systemPresence": "AVAILABLE",
                  "organizationPresenceId": "6a3af858-942f-489d-xxxxxxxxxxx"
                },
                {
                  "startTime": "2018-11-19T09:55:11.598Z",
                  "systemPresence": "OFFLINE",
                  "organizationPresenceId": "ccf3c10a-aa2c-4845-xxxxxxxxxxxxx"
                }
              ]
            }
          ]
        }

    So, nothing I can use...

    I have also tried User Observation, searching by userId, and the answer is not what I need either. What am I doing wrong?


    Becky_Powell | 2018-11-19 16:04:50 UTC | #4

    Hi Jorge,

    You can get stats grouped by agent with the following query: { "interval": "2018-11-01T04:00:00.000Z/2018-11-20T05:00:00.000Z", "groupBy": [ "userId" ] }

    If you want stats for a particular agent, you might try this query: { "interval": "2018-11-01T04:00:00.000Z/2018-11-20T05:00:00.000Z", "filter": { "type": "and", "predicates": [ { "type": "dimension", "dimension": "userId", "operator": "matches", "value": "135c20a3-fae1-4479-b365-xxxxxxxxx" } ] } }

    I hope this helps!


    margolles | 2018-11-20 10:04:53 UTC | #5

    Hi Becky,

    dou you mean the user stats or conversation stats? I mean, which query type?

    I guess you mean user queries, cause I can't find "userId" in the conversation ones. But, at the same time I tried the user queries with those parameters and can't find the info I need.

    Thank you!


    margolles | 2018-11-20 10:29:42 UTC | #6

    And there is another requirement I forgot to mention: I need the stats only for inbound calls.

    Thank you again.


    Becky_Powell | 2018-11-20 16:38:06 UTC | #7

    Hi Jorge,

    These are both query type: Conversation Aggregate.


    Becky_Powell | 2018-11-20 16:54:24 UTC | #8

    To get the stats for only inbound calls, you can apply the following filter to your query:

     "filter": {
      "type": "and",
      "predicates": [
       {
        "type": "dimension",
        "dimension": "direction",
        "operator": "matches",
        "value": "inbound"
       }
      ]
    }

    margolles | 2018-11-22 11:17:40 UTC | #9

    Thank you, Becky, that was very helpful!


    system | 2018-12-23 11:17:42 UTC | #10

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