Delete calls under X amount of time using /api/v2/recording/jobs

Hi All,
We are looking to use the /api/v2/recording/jobs api to delete outbound calls from a particular queue and was wondering if it's possible to add filter for calls under a certain amount of time?
This is the schema we have been using but would like to add a duration filter.

{
"action": "DELETE",
"actionDate": "2024-08-13T03:26:00.414Z",
"conversationQuery": {
"interval": "2018-01-01T00:00:00Z/2024-05-31T23:59:00Z",
"segmentFilters": [
{
"type": "and",
"clauses": [
{
"type": "and",
"predicates": [
{
"type": "dimension",
"dimension": "direction",
"operator": "matches",
"value": "outbound"
}
]
},
{
"type": "and",
"predicates": [
{
"type": "dimension",
"dimension": "queueId",
"operator": "matches",
"value": "XXXXXX-XXXXXXXXXXXXXX-XXXXXXXXX"
}
]
}
]
}
]
}
}

Thanks in advance!

Hi,

You can include a conversational filter for the duration parameter in addition to the segment filters

Just a sample below:

"conversationFilters": [
  {
    "type": "and",
    "predicates": [
      {
        "type": "metric",
        "range": {
          "lte": 500
        },
        "metric": "tConversationDuration"
      }
    ]
  }
]

You are a lifesaver Sriram,
Exactly what I was looking for

Many thanks!

1 Like

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