cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
808
Views
10
Helpful
9
Replies

queueDuration 0 in Webex CC search API results

kseraphine
Level 5
Level 5

I'm using the Postman collection and the webex-contact-center-api-samples repo (both of which have been very helpful) to familiarize myself with the search API.  I'm getting unexpected results for a task query in that the `queueDuration`  field value is always 0. 

Here's an example query:

task(
    filter: {
      and: [
        { channelType: { equals: telephony } }
        { status: { equals: "parked" } }
        { direction: { equals: "INBOUND" } }
        { isActive: { equals: true } }
      ]
    }
  ) {
    tasks {
      id
      origin
      destination
      isActive
      direction
      totalDuration
      queueDuration
      lastEntryPoint {
        id
        name
      }
    }
  }
}

Which returns:

{
    "data": {
        "task": {
            "tasks": [
                {
                    "id": "75519cf4-253f-437b-a473-f239816756f7",
                    "origin": "+XXXXXXXXXXX",
                    "destination": "+XXXXXXXXXXX",
                    "isActive": true,
                    "direction": "INBOUND",
                    "totalDuration": 0,
                    "queueDuration": 0,
                    "lastEntryPoint": {
                        "id": "AXpoGICUT669fVVELlIA",
                        "name": "Test Tele EP4"
                    }
                }
            ]
        }
    }
}

I'm querying for active calls because ultimately I want to build a query to aggregate the count and max duration of queued calls in realtime.  Even when I query for the same call after the call ends, the queueDuration is still 0 (but the totalDuration is a non-zero value).

Is this expected?  If so, is that another way to do an aggregated query for active tasks? 

 

Thanks!

 

 

 

 

dddd

 

 

 

1 Accepted Solution