Alex_Bangs | 2019-12-04 16:07:00 UTC | #1
We have a nightly process which includes clearing out a contact lists using the following API call:
/api/v2/outbound/contactlists/{contactListId}/clear
In order for this call to succeed, all campaigns using this list must be in a stopped or complete status. We are running into situations where agents are not completing their calls before logging out for the day and preventing the campaigns from stopping.
The manual way to clear out these hanging interactions, https://help.mypurecloud.com/articles/wrap-calls-campaign-details-view/, works but we would like to add this logic into our automated process. We are looking to find the correct API calls to replicate this.
So far we have tried searching for conversations without end times and disconnecting them using the following:
/api/v2/analytics/conversations/details/query /api/v2/conversations/{conversationId}/disconnect
The JSON we use for the query is:
{
"interval": "2019-12-04T06:00:00.000Z/2019-12-05T06:00:00.000Z",
"order": "asc",
"orderBy": "conversationStart",
"paging": {
"pageSize": 25,
"pageNumber": 1
},
"segmentFilters": [
{
"type": "and",
"predicates": [
{
"type": "dimension",
"dimension": "mediaType",
"operator": "matches",
"value": "voice"
}
]
}
],
"conversationFilters": [
{
"type": "and",
"predicates": [
{
"type": "dimension",
"dimension": "conversationEnd",
"operator": "notExists",
"value": null
}
]
}
]
}
however there are several hundred conversations found each night that don't have end times, but are not assigned to an agent so they do not affect the campaign from stopping. These conversations are due to a callback process running throughout the day. The actual hanging conversations are not found using this search.
What is the best way to find and disconnect hanging conversations that are assigned to agents that are preventing a campaign from stopping?
tim.smith | 2019-12-04 17:26:23 UTC | #2
Alex_Bangs, post:1, topic:6632
The actual hanging conversations are not found using this search.
The filter you shared will return all voice calls that had activity during the interval that are not disconnected. How do the "actual hanging conversations" differ from that description? When you retrieve the conversation object from one of those conversations, what's different about it?
Alex_Bangs, post:1, topic:6632
that are preventing a campaign from stopping?
You can also filter on the campaign ID to narrow your results to a specific campaign.
system | 2020-01-04 17:26:24 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: 6632