Legacy Dev Forum Posts

 View Only

Sign Up

  • 1.  Identify frequent caller

    Posted 06-05-2025 19:11

    Giacky91 | 2021-03-02 14:05:44 UTC | #1

    Hi all, is there a way to identify a frequent caller? eg. someone who is calling for the fourth times in the last 24 hours? or, from a caller number, determine how many times he calls in the last 24 hours?

    Or, do you have any tips to try to implements something that che help me to identify frequen caller?

    Thank you Giacomo


    tim.smith | 2021-03-03 16:56:58 UTC | #2

    You can use an analytics query and filter on the caller's phone number.


    Jerome.Saint-Marc | 2021-03-04 10:35:15 UTC | #3

    Hello,

    Method 1 If you know the ANI/CLI of a caller (their phone number) and you want to know how many times he called in last 24 hours (or in a given interval), you can use an Analytics Query for Conversation Details. This is what I described in this post: https://developer.mypurecloud.com/forum/t/number-of-interations-per-ani/10028

    Method 2 I just thought about another way, this time using Analytics Query for Conversation Aggregates, and requesting nOffered or nConnected metrics.

    If you know the telephone number, you could have the following request body:

    {
     "interval": "2021-02-28T23:00:00.000Z/2021-03-04T23:00:00.000Z",
     "groupBy": [
      "ani"
     ],
     "filter": {
      "type": "and",
      "predicates": [
       {
        "type": "dimension",
        "dimension": "mediaType",
        "operator": "matches",
        "value": "voice"
       },
       {
        "type": "dimension",
        "dimension": "ani",
        "operator": "matches",
        "value": "tel:+ 33123456789"
       }
      ]
     },
     "views": [],
     "metrics": [
      "nConnected",
      "nOffered"
     ]
    }

    You can also use this same Analytics Query for Conversation Aggregates to retrieve the number of times each ANI/CLI called in the interval. But you would also get people who have called one time only. So you would need to parse the response and check data/people who have a nOffered or nConnected metric greater than 2, 3 4, ... The aggregate query will group data by ani.

    {
     "interval": "2021-02-28T23:00:00.000Z/2021-03-04T23:00:00.000Z",
     "groupBy": [
      "ani"
     ],
     "filter": {
      "type": "and",
      "predicates": [
       {
        "type": "dimension",
        "dimension": "mediaType",
        "operator": "matches",
        "value": "voice"
       }
      ]
     },
     "views": [],
     "metrics": [
      "nConnected",
      "nOffered"
     ]
    }

    Regards,


    Giacky91 | 2021-03-04 16:33:16 UTC | #4

    That's interesting @Jerome.Saint-Marc. Thank you very much!

    Giacky


    system | 2021-04-04 16:33:18 UTC | #5

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