Legacy Dev Forum Posts

 View Only

Sign Up

Conversation detail query - make segmentFilter match all segments

  • 1.  Conversation detail query - make segmentFilter match all segments

    Posted 06-05-2025 18:17

    edenmitchell | 2020-04-22 02:14:30 UTC | #1

    I am trying to run a Conversation detail query (/api/v2/analytics/conversations/details/query) to return all conversations that were in IVR but never entered a queue. The way I thought to achieve this was a segment filter on queueId with the operator notExists. This query is not effective for my use case since it's possible for a conversation to have a segment with no queueId, while having another segment with a queueId. Therefore the query returns any conversation that has even one segment with no queueId. I need conversations where all segments do not have a queueId.

    I was unable to find documentation on querying this endpoint so that ALL segments must match the segment filter. Is this kind of filter possible? I have included the JSON for the detail query below.

    { "interval": "2020-04-14T01:38:45.000Z/2020-04-21T01:38:45.000Z", "paging": { "pageSize": 50, "pageNumber": 1 }, "segmentFilters": [ { "type": "or", "predicates": [ { "type": "dimension", "dimension": "queueId", "operator": "notExists" } ] } ] }


    Jerome.Saint-Marc | 2020-04-22 06:02:37 UTC | #2

    Hello,

    I just tried with a different approach - to get calls that didn't go to queue - leveraging metrics instead of dimensions. If the call doesn't go to queue, it appears that tAcd will not be present (I mean is not "attached" to the conversation details - rather than having tAcd == 0).

    So I have used the following format for my query:

    { "interval": "2020-04-21T22:00:00.000Z/2020-04-22T22:00:00.000Z", "order": "asc", "orderBy": "conversationStart", "paging": { "pageSize": 25, "pageNumber": 1 }, "conversationFilters": [ { "type": "or", "predicates": [ { "type": "metric", "metric": "tAcd", "operator": "NotExists", "value": null } ] } ] }

    Hope this helps.


    system | 2020-05-23 06:02:38 UTC | #3

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