Genesys Cloud - Main

 View Only

Discussion Thread View
  • 1.  Why can't I filter conversations by external tag in conversations aggregates query?

    Posted 24 days ago

    Hello

    I want to get total conversations count for a long period (over one month) for my application's dashboard.

    I'm using /api/v2/analytics/conversations/aggregates/query endpoint for this with following query:

    {
       "filter":{
          "type":"and",
          "clauses":[
             {
                "type":"or",
                "predicates":[
                   {
                      "dimension":"queueId",
                      "value":"4a9fdde5-38da-4916-9cd9-98cb4347aded"
                   }
                ]
             },
             {
                "type":"or",
                "predicates":[
                   {
                      "dimension":"mediaType",
                      "value":"email"
                   },
                   {
                      "dimension":"mediaType",
                      "value":"voice"
                   },
                   {
                      "dimension":"mediaType",
                      "value":"message"
                   }
                ]
             }
          ]
       },
       "metrics":[
          "nOffered",
       ],
       "groupBy":[
          "queueId"
       ],
       "granularity":"P1D",
       "interval":"2024-09-30T21:00:00.000Z/2024-11-01T21:00:00.000Z"
    }

    But when I adding filter by external tag then response is empy: {}

    Filter by tag looks like:

    {
                "type":"or",
                "predicates":[
                   {
                      "dimension":"externalTag",
                      "value":"AI"
                   }
                ]
             }

    Am I doing something wrong or it is impossible to filter conversations aggregates query by external tag?

    Also, I'm successfully can filter by external tag with /api/v2/analytics/conversations/details/query, but I need analytics for period more than 1 month.


    #Reporting/Analytics

    ------------------------------
    Sergey Dzyuba
    ------------------------------


  • 2.  RE: Why can't I filter conversations by external tag in conversations aggregates query?

    GENESYS
    Posted 24 days ago

    Hi Sergey,

    I think this would be a good question for the Genesys Cloud Developer Forum to clarify how the aggregate query needs to be built to provide the response you need.



    ------------------------------
    Sam Jillard
    Online Community Manager/Moderator
    Genesys - Employees
    ------------------------------



  • 3.  RE: Why can't I filter conversations by external tag in conversations aggregates query?
    Best Answer

    Top 25 Contributor
    Posted 24 days ago

    Couple of things from my end;

    - Try changing the metrics to something like nConnected. It worked for me when I selected nConnected vs nOffered.
    - Try changing the predicate to "type":"dimension", "dimension":"externalTag", "operator":"exists"
    - As the externalTag is a 36-char field, so not sure if it is able to search part of the tag value or the whole tag value, so the "operator":"exists" gives you more information that you require, but still better than nothing.



    ------------------------------
    Vineet Kakroo
    Senior Technical Consultant
    ------------------------------



  • 4.  RE: Why can't I filter conversations by external tag in conversations aggregates query?

    Posted 23 days ago

    Thanks everyone. Somehow my query works now, but yesterday I cannot get expected response (even when set filters in the Genesys Performance Dashboard)

    Topic may be closed.



    ------------------------------
    Sergey Dzyuba
    ------------------------------



Need Help finding something?

Check out the Genesys Knowledge Network - your all-in-one access point for Genesys resources