<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: queueDuration 0 in Webex CC search API results in Webex for Developers</title>
    <link>https://community.cisco.com/t5/webex-for-developers/queueduration-0-in-webex-cc-search-api-results/m-p/4659576#M3232</link>
    <description>&lt;P&gt;Yes, calculating the duration using the createdTime is a suitable workaround. Thanks for you help.&lt;/P&gt;</description>
    <pubDate>Thu, 28 Jul 2022 17:14:14 GMT</pubDate>
    <dc:creator>kseraphine</dc:creator>
    <dc:date>2022-07-28T17:14:14Z</dc:date>
    <item>
      <title>queueDuration 0 in Webex CC search API results</title>
      <link>https://community.cisco.com/t5/webex-for-developers/queueduration-0-in-webex-cc-search-api-results/m-p/4657823#M3224</link>
      <description>&lt;P&gt;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.&amp;nbsp; I'm getting unexpected results for a task query in that the `queueDuration`&amp;nbsp; field value is always 0.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here's an example query:&lt;/P&gt;
&lt;LI-CODE lang="javascript"&gt;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
      }
    }
  }
}&lt;/LI-CODE&gt;
&lt;P&gt;Which returns:&lt;/P&gt;
&lt;LI-CODE lang="javascript"&gt;{
    "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"
                    }
                }
            ]
        }
    }
}&lt;/LI-CODE&gt;
&lt;P&gt;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.&amp;nbsp; 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).&lt;/P&gt;
&lt;P&gt;Is this expected?&amp;nbsp; If so, is that another way to do an aggregated query for active tasks?&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;dddd&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 26 Jul 2022 19:45:35 GMT</pubDate>
      <guid>https://community.cisco.com/t5/webex-for-developers/queueduration-0-in-webex-cc-search-api-results/m-p/4657823#M3224</guid>
      <dc:creator>kseraphine</dc:creator>
      <dc:date>2022-07-26T19:45:35Z</dc:date>
    </item>
    <item>
      <title>Re: queueDuration 0 in Webex CC search API results</title>
      <link>https://community.cisco.com/t5/webex-for-developers/queueduration-0-in-webex-cc-search-api-results/m-p/4657870#M3225</link>
      <description>&lt;P&gt;If you have unique callerID with Timestamp, this can be implemented using Finesse Gadget.&lt;/P&gt;</description>
      <pubDate>Tue, 26 Jul 2022 20:22:46 GMT</pubDate>
      <guid>https://community.cisco.com/t5/webex-for-developers/queueduration-0-in-webex-cc-search-api-results/m-p/4657870#M3225</guid>
      <dc:creator>smeegada1</dc:creator>
      <dc:date>2022-07-26T20:22:46Z</dc:date>
    </item>
    <item>
      <title>Re: queueDuration 0 in Webex CC search API results</title>
      <link>https://community.cisco.com/t5/webex-for-developers/queueduration-0-in-webex-cc-search-api-results/m-p/4657898#M3226</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.cisco.com/t5/user/viewprofilepage/user-id/250038"&gt;@kseraphine&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;From an internal discussion, these durations are only being calculated if the call has exited the parked state.&lt;/P&gt;
&lt;P&gt;Hence it shows up after the status isActive = &lt;STRONG&gt;false&amp;nbsp;&lt;/STRONG&gt;from the contact session.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This is from all the events in the contact session record that help calculate aggregates post processing.&lt;/P&gt;
&lt;P&gt;Could you please confirm the use case? Are you polling for queueTime of Active / realtime contacts in the queue?&lt;/P&gt;
&lt;P&gt;This API will need to be enhanced to allow for Realtime queue durations - at this point it is a session record (task = contact session) and the metrics are being calculated after the fact.&lt;/P&gt;
&lt;P&gt;We currently do not have a Contact Activity endpoint, (CAR) that would give you the events of new, ivr-connected, parked so that one can calculate the timestamps between them to find out the ivr Duration (selfServeDuration) or queueDuration.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks &amp;amp; Regards,&lt;/P&gt;
&lt;P&gt;Arunabh.&lt;/P&gt;</description>
      <pubDate>Tue, 26 Jul 2022 21:27:04 GMT</pubDate>
      <guid>https://community.cisco.com/t5/webex-for-developers/queueduration-0-in-webex-cc-search-api-results/m-p/4657898#M3226</guid>
      <dc:creator>Arunabh Bhattacharjee</dc:creator>
      <dc:date>2022-07-26T21:27:04Z</dc:date>
    </item>
    <item>
      <title>Re: queueDuration 0 in Webex CC search API results</title>
      <link>https://community.cisco.com/t5/webex-for-developers/queueduration-0-in-webex-cc-search-api-results/m-p/4657903#M3227</link>
      <description>&lt;P&gt;Another important aspect is that the queueDuration does return correctly for voice Queues.&lt;/P&gt;
&lt;P&gt;From your screenshot, it seems like the queue was created with an older backend service.&lt;/P&gt;
&lt;P&gt;Please try this out:&lt;/P&gt;
&lt;P&gt;- Create a new queue. QueueID should be in the GUID format.&lt;/P&gt;
&lt;P&gt;- Recreate the same test with isActive=false (post call end or post exiting the parked state.&lt;/P&gt;
&lt;P&gt;It should return a value. Attaching some screenshots from internal testing.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I would suggest opening a TAC case if you're not getting queueDurations for a specific Queue ID (e.g the queue ID in your screenshot was an older queue created on WebexCC before a cutover took place last year)&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screen Shot 2022-07-26 at 4.44.05 PM.png" style="width: 670px;"&gt;&lt;img src="https://community.cisco.com/t5/image/serverpage/image-id/158205i92E5D9CA5A357AD5/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screen Shot 2022-07-26 at 4.44.05 PM.png" alt="Screen Shot 2022-07-26 at 4.44.05 PM.png" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screen Shot 2022-07-26 at 4.44.58 PM.png" style="width: 663px;"&gt;&lt;img src="https://community.cisco.com/t5/image/serverpage/image-id/158204iD8CDEAEE29B3292E/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screen Shot 2022-07-26 at 4.44.58 PM.png" alt="Screen Shot 2022-07-26 at 4.44.58 PM.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 26 Jul 2022 21:33:00 GMT</pubDate>
      <guid>https://community.cisco.com/t5/webex-for-developers/queueduration-0-in-webex-cc-search-api-results/m-p/4657903#M3227</guid>
      <dc:creator>Arunabh Bhattacharjee</dc:creator>
      <dc:date>2022-07-26T21:33:00Z</dc:date>
    </item>
    <item>
      <title>Re: queueDuration 0 in Webex CC search API results</title>
      <link>https://community.cisco.com/t5/webex-for-developers/queueduration-0-in-webex-cc-search-api-results/m-p/4657925#M3228</link>
      <description>&lt;P&gt;Thanks for the quick reply.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I created a new queue and updated the flow. I'm still a bit confused on what to expect because you say "Recreate the same test with isActive=false (post call end or post exiting the parked state" however your first screenshot shows an active, parked call with a queueDuration value. &lt;/P&gt;
&lt;P&gt;Below are the results for the same queries with an active call and after. I do not have queueDuration for my parked call as you did. Can you clarify if I should see queueDuration for the parked query?&amp;nbsp; If so, I can open a TAC case as you suggested.&lt;/P&gt;
&lt;P&gt;Also, do you know why the direction ins "INBOUND" (upper case) for active tasks but "inbound" (lower case) for inactive tasks? That seems odd and doesn't match your examples.&lt;/P&gt;
&lt;P&gt;Thanks&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="parked.png" style="width: 999px;"&gt;&lt;img src="https://community.cisco.com/t5/image/serverpage/image-id/158212i5C7D091996E07B70/image-size/large?v=v2&amp;amp;px=999" role="button" title="parked.png" alt="parked.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt; &lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="after.png" style="width: 999px;"&gt;&lt;img src="https://community.cisco.com/t5/image/serverpage/image-id/158213iD1097753ED14F0A6/image-size/large?v=v2&amp;amp;px=999" role="button" title="after.png" alt="after.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt; &lt;/P&gt;</description>
      <pubDate>Tue, 26 Jul 2022 22:20:15 GMT</pubDate>
      <guid>https://community.cisco.com/t5/webex-for-developers/queueduration-0-in-webex-cc-search-api-results/m-p/4657925#M3228</guid>
      <dc:creator>kseraphine</dc:creator>
      <dc:date>2022-07-26T22:20:15Z</dc:date>
    </item>
    <item>
      <title>Re: queueDuration 0 in Webex CC search API results</title>
      <link>https://community.cisco.com/t5/webex-for-developers/queueduration-0-in-webex-cc-search-api-results/m-p/4657931#M3229</link>
      <description>&lt;P&gt;The use case is:&lt;/P&gt;
&lt;P&gt;Customer wants a dashboard that shows in real-time the number of contacts and the longest hold time for each queue. They will use this information to reskill agents on the fly to adjust to conditions.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I don't think the customer needs to differentiate IVR duration from queue duration so, if necessary, I can use the `createdTime` of each contact to determine the longest hold time. It would just be more convenient to use a aggregate/group by query.&lt;/P&gt;
&lt;P&gt;Also, if it takes multiple pages to get all the active contacts, API throttling may become a problem because the customer will want the data to refresh frequently.&lt;/P&gt;</description>
      <pubDate>Tue, 26 Jul 2022 22:43:42 GMT</pubDate>
      <guid>https://community.cisco.com/t5/webex-for-developers/queueduration-0-in-webex-cc-search-api-results/m-p/4657931#M3229</guid>
      <dc:creator>kseraphine</dc:creator>
      <dc:date>2022-07-26T22:43:42Z</dc:date>
    </item>
    <item>
      <title>Re: queueDuration 0 in Webex CC search API results</title>
      <link>https://community.cisco.com/t5/webex-for-developers/queueduration-0-in-webex-cc-search-api-results/m-p/4659572#M3230</link>
      <description>&lt;P&gt;The issue with the different cases can possible be an existing defect, if possible it would be good to raise a TAC case for the data integrity issue on your system.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For the durations, the consensus today is that the metrics for contact Session is calculated post call.&lt;/P&gt;
&lt;P&gt;For events in task:parked - perhaps you can use the webhook for task:new to task:parked to maintain the durations.&lt;/P&gt;
&lt;P&gt;Other idea is to use Date.now() - createdTime to calculate durations since you get the CSR data.&lt;/P&gt;
&lt;P&gt;Let me know if those are suitable workarounds.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Realtime websocket push based notifications are still on the roadmap and published in the coming soon for Webex Contact Center.&lt;/P&gt;</description>
      <pubDate>Thu, 28 Jul 2022 17:00:59 GMT</pubDate>
      <guid>https://community.cisco.com/t5/webex-for-developers/queueduration-0-in-webex-cc-search-api-results/m-p/4659572#M3230</guid>
      <dc:creator>Arunabh Bhattacharjee</dc:creator>
      <dc:date>2022-07-28T17:00:59Z</dc:date>
    </item>
    <item>
      <title>Re: queueDuration 0 in Webex CC search API results</title>
      <link>https://community.cisco.com/t5/webex-for-developers/queueduration-0-in-webex-cc-search-api-results/m-p/4659573#M3231</link>
      <description>&lt;P&gt;True, today the total Contacts per page is limited to 300 - with a maximum of 33 pages.&lt;/P&gt;
&lt;P&gt;is it possible to get more than 300 active calls per queue?&lt;/P&gt;
&lt;P&gt;I believe this threshold would be difficult to achieve based on SMB sizing and BHCA - if you filter by queue level.&lt;/P&gt;
&lt;P&gt;Today the rate limit is set at 50 requests per minute as a default and it can be increased based on the Client ID level with a request to Cisco - permitting the use case is reviewed internally.&lt;/P&gt;
&lt;P&gt;So you can still pull 33 pages worth of data in a single batch of search API calls without breaching the rate limit.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 28 Jul 2022 17:03:28 GMT</pubDate>
      <guid>https://community.cisco.com/t5/webex-for-developers/queueduration-0-in-webex-cc-search-api-results/m-p/4659573#M3231</guid>
      <dc:creator>Arunabh Bhattacharjee</dc:creator>
      <dc:date>2022-07-28T17:03:28Z</dc:date>
    </item>
    <item>
      <title>Re: queueDuration 0 in Webex CC search API results</title>
      <link>https://community.cisco.com/t5/webex-for-developers/queueduration-0-in-webex-cc-search-api-results/m-p/4659576#M3232</link>
      <description>&lt;P&gt;Yes, calculating the duration using the createdTime is a suitable workaround. Thanks for you help.&lt;/P&gt;</description>
      <pubDate>Thu, 28 Jul 2022 17:14:14 GMT</pubDate>
      <guid>https://community.cisco.com/t5/webex-for-developers/queueduration-0-in-webex-cc-search-api-results/m-p/4659576#M3232</guid>
      <dc:creator>kseraphine</dc:creator>
      <dc:date>2022-07-28T17:14:14Z</dc:date>
    </item>
    <item>
      <title>Re: queueDuration 0 in Webex CC search API results</title>
      <link>https://community.cisco.com/t5/webex-for-developers/queueduration-0-in-webex-cc-search-api-results/m-p/4659582#M3233</link>
      <description>&lt;P&gt;This use case will be implemented in a desktop widget so my concern was requests from multiple instances.&amp;nbsp; For example, 20 instances refreshing every 30 seconds would fall under the 50 request limit only if the results are contained in a single page.&lt;/P&gt;
&lt;P&gt;That said I don't think this system will approach 300 active contacts so it shouldn't be a problem in this case.&amp;nbsp; I thought the per page limit was 100 but now see that applies to agent session.&lt;/P&gt;
&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Thu, 28 Jul 2022 17:27:01 GMT</pubDate>
      <guid>https://community.cisco.com/t5/webex-for-developers/queueduration-0-in-webex-cc-search-api-results/m-p/4659582#M3233</guid>
      <dc:creator>kseraphine</dc:creator>
      <dc:date>2022-07-28T17:27:01Z</dc:date>
    </item>
  </channel>
</rss>

