Julien_Machon | 2018-07-24 12:49:20 UTC | #1
Hi there
In the UK, the law requires us not to call a number for 72h if that call was abandoned (the client picked up the phone, but no agents are on the line so the client hangs up).
We are struggling to set those rules up from the interface and it has been suggested to us that we can develop an custom service in order to achieve that (even though, this is an Ofcom rule, so surely any of your customers in the UK require that functionality too).
Now, I'm trying to figure out how to get a list of abandoned conversation. Using the analytics conversation query api /api/v2/analytics/conversations/details/query, I've come up with something like:
{
"interval": "2018-07-23T23:00:00.000Z/2018-07-23T23:00:01.000Z",
"order": "asc",
"orderBy": "conversationStart",
"paging": {
"pageSize": "25",
"pageNumber": 1
},
"segmentFilters": [
{
"type": "and",
"clauses": [
{
"type": "and",
"predicates": [
{
"type": "dimension",
"dimension": "purpose",
"operator": "matches",
"value": "acd"
},
{
"type": "dimension",
"dimension": "direction",
"operator": "matches",
"value": "outbound"
}
]
},
{
"type": "and",
"predicates": [
{
"type": "dimension",
"dimension": "wrapUpCode",
"operator": "matches",
"value": "ININ-OUTBOUND-FAILED-TO-REACH-AGENT"
}
]
}
]
}
]
}
Could anyone tell me if what I'm doing is correct?
This actually returns no result. I'm not sure if that's because I need to add more conditions in terms of what the wrap-up code needs to be. At the moment, I'm only looking for the automatically assigned wrap-up code by the dialler.
Any help would be highly appreciated.
Thanks Julien
tim.smith | 2018-07-24 12:51:50 UTC | #2
https://developer.mypurecloud.com/forum/t/how-to-get-conversation-details-for-abandoned-calls/279/2?u=tim.smith
Julien_Machon | 2018-07-25 08:19:05 UTC | #3
Thanks for your response, I'll give it a try.
If that works, I've solve the "identify abandoned calls" task.
Now I need to append them to a DNC list, which is fine.
The tricky bit it is scheduling the deletion. I have an idea for the schedule part but it appears that deletion is quite complex, as it's not supported? (I base that statement on the API documentation)
The only work around I have for this is:
- dowload current list and rename it with a temporary name
- create new list with the same name and upload all numbers or the current list, excluding the ones we want to delete
- get all campaigns using the current list (btw, the filter doesn't seem to work with the JS SDK, see bottom of my post)
- point all campaings to new list
- delete current list
Is it correct? It seems a little over the top. Plus, we loose the DNC list ID that we are planning to use as a correlation ID for some audit logs, etc...
Thanks for your help.
PS: The bug I was talking about:
I'm expecting:
outboundApi.getOutboundCampaigns({ dncListId: dncListId });
To only return campaigns using my dncList dncListId, but it returns them all.
Instead I have to do something like:
// the dncListId filter doesn't seem to work... So filtering myself
outboundApi.getOutboundCampaigns({ dncListId: dncListId })
.then(campaigns => campaigns.entities.filter(campaign => campaign.dncLists.filter(d => d.id === dncListId).length > 0))
tim.smith | 2018-07-25 13:32:16 UTC | #4
You are correct about how to manage DNC lists. That is the intended behavior as there is no way to remove a number from a DNC list.
I've opened CD-5964 for the issue of the dncListId filter parameter not working. I observed the same behavior as you.
system | 2018-08-25 13:32:18 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: 3233