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

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

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

Simon

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

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

This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.