Hello,
I'm having problems checking and canceling calls that have callbacks
I check at the beginning of the flow if the client has a callback in the queue in question using the following api: /api/v2/analytics/conversations/details/query
query used:
{
"interval": "{input.interval}",
"order": "asc",
"orderBy": "conversationStart",
"paging": {
"pageSize": 25,
"pageNumber": 1
},
"segmentFilters": [
{
"type": "or",
"clauses": [
{
"type": "and",
"predicates": [
{
"type": "dimension",
"dimension": "mediaType",
"operator": "matches",
"value": "callback"
},
{
"type": "dimension",
"dimension": "callbackNumber",
"operator": "matches",
"value": "{input.callbackNumber}"
},
{
"type": "dimension",
"dimension": "queueId",
"operator": "matches",
"value": "${input.queueId}"
}
]
}
]
}
]
}
If it already has, I offer an opportunity to be transferred immediately, in this case I collect all conversationsId that return in the query above and use it as input in the following api: /api/v2/conversations/callbacks/${input.conversationId}
with the body:
{
"state": "disconnected"
}
To cancel.
The problem is that if he reconnects the api
returns that it has callbacks scheduled even though they are cancelled. Is there any way to check callbacks if they are active or not?
Could you help me with this case?
Thanks,