Legacy Dev Forum Posts

 View Only

Sign Up

Can we filter completed conversation when calling analytics/conversations/details/query API

  • 1.  Can we filter completed conversation when calling analytics/conversations/details/query API

    Posted 06-05-2025 18:25

    RaghuTejaMattam | 2023-04-11 13:30:19 UTC | #1

    Hi All,

    Greetings!!

    We are calling this api https://api.mypurecloud.com/api/v2/analytics/conversations/details/query and trying to filter out only completed conversation for the day can you advise any how we should filter it out?

    https://api.mypurecloud.com/api/v2/analytics/conversations/details/query"

    payload = "{\r\n \"interval\": \"2023-04-02T06:00:00.000Z/2023-04-03T06:00:00.000Z\",\r\n \"order\": \"asc\",\r\n \"orderBy\": \"conversationStart\",\r\n \"paging\": {\r\n \"pageSize\": 100,\r\n \"pageNumber\": 1\r\n },\r\n \"segmentFilters\": [\r\n {\r\n \"type\": \"or\",\r\n \"predicates\": [\r\n {\r\n \"type\": \"dimension\",\r\n \"dimension\": \"mediaType\",\r\n \"operator\": \"matches\",\r\n \"value\": \"voice\"\r\n }\r\n ]\r\n }\r\n ]\r\n}"

    Regards, Raghu


    SimonBrown | 2023-04-11 17:06:15 UTC | #2

    Hi You have to add predicate for property "conversationEnd" exists. That key/value is only added when a conversation has finished.

    Simon


    RaghuTejaMattam | 2023-04-11 18:26:41 UTC | #3

    Hi Simon

    Thanks for your reply can i use the following way when you said property as "conversationEnd"

    { "conversationFilters": [ null ], "segmentFilters": [ { "predicates": [ { "type": "property", "property": "conversationEnd" } ] } ] }

    Regards, Raghu


    SimonBrown | 2023-04-12 08:27:53 UTC | #4

    If you use the api explorer you can build the query and extract.

    Below is sample for conversationEnd property existing.

    { "conversationFilters": [ { "type": "and", "predicates": [ { "type": "property", "dimension": "conversationEnd", "operator": "exists" } ] } ] }

    Hope that helps Simon


    system | 2023-05-13 08:28:49 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: 19395