Legacy Dev Forum Posts

 View Only

Sign Up

API to check current total incoming calls regardless queue

  • 1.  API to check current total incoming calls regardless queue

    Posted 06-05-2025 18:14

    Johnson_Lu1 | 2018-09-18 07:39:17 UTC | #1

    Hi,

    I have a request from customer to check total incoming calls and apply different actions based on the total calls.

    May I know any API can return me the total calls in real time?

    Regards,

    Johnson


    tim.smith | 2018-09-18 12:19:45 UTC | #2

    Analytics conversation detail query. You may have to page through the results.


    Johnson_Lu1 | 2018-09-28 08:48:14 UTC | #3

    Thanks, Tim,

    However, I am new to this API. I try hard to get understand from the API, but I need further advice from you.

    May I know what should be my input parameters? Only start Time & End Time? Possible to get the current total calls?

    I found this from the mentioned API description.

    Metrics

    A metric filter includes:

    • Metric-A summary of overall contact center activity during interval of time. The following metrics are supported currently:
      • tSegmentDuration
      • oTotalCriticalScore
      • oTotalScore
    • numericRange-Specifies how to filter results. You can choose:
      • lt-Less than.
      • lte-Less than or equal to.
      • gt-Greater than.
      • gte-Greater than or equal to.For example, you can build a filter to show interactions with a tSegmentDuration (segment duration) value of greater than 5 minutes.
    • Value- The metric value.

    AGGREGATIONS

    You can use aggregations to apply faceted search and roll-ups to your query results. Aggregations do not remove data, but provide additional data. The following example shows an example aggregation which will return the conversation counts for the top 10 wrapup codes in the search results.

    "aggregations": [
      {
        "type": "termFrequency",
        "dimension": "wrapUpCode",
        "size": 10
      }
    ]

    Don't mind to help me to get the pieces of puzzle completed.

    Many thanks.

    Regards,

    Johnson


    tim.smith | 2018-09-28 14:32:19 UTC | #4

    Use the Analytics Query Builder to develop your queries. Start with just picking a type of query and running it to see what it returns. You can further refine it from there by adding filters and changing the interval.

    Can you explain what you're trying to accomplish or the data you're trying to get in more detail? "total incoming calls" could mean a lot of different things depending on your use case.


    Johnson_Lu1 | 2018-09-30 04:53:43 UTC | #5

    Thanks, Tim,

    I will explore the Analytics Query Builder.

    Actually, what I wish to archive is simple.

    Basically, I just want to check how many total incoming calls received, same as the information displayed on the Trunk line.

    Then, in IVR call flow, I will set a threshold says, if total calls is 70, then I will play a voice prompt to alert next caller. If over 80, another voice prompt will played to caller.

    Regards,

    Johnson


    tim.smith | 2018-10-01 14:27:04 UTC | #6

    That specific piece of data comes from GET /api/v2/telephony/providers/edges/trunks/{trunkId}/metrics or GET /api/v2/telephony/providers/edges/trunks/metrics to query multiple trunks, not analytics. You can use whichever works best for your use case though.


    Johnson_Lu1 | 2018-10-02 01:15:00 UTC | #7

    Thank you very much, Tim


    system | 2018-11-02 01:15:02 UTC | #8

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