Hello,
A callback can be in different "status": scheduled, waiting in ACD queue, connected to a Contact Center Agent.
Let's assume we create/schedule a callback for tomorrow at noon.
When we create this callback (now), we'll get a conversation with two participants (purpose = customer, acd) having a media session of type callback, with an "active" segmentType equal to "scheduled". The callback is scheduled but not submitted yet (not waiting for an available agent).
Then, tomorrow, at noon, the conversation will be updated so that the callback is submitted to the ACD Queue and starts waiting for an available Contact Center Agent.
You'll get a new segment (active) with segmentType equal to "interact" in the "callback" session.
Third status/stage is when the callback is delivered to the Contact Center Agent.
You can also request an immediate callback. In this case, you will not have a media session of type callback with segmentType equal to "scheduled". The conversation will move directly to segmentType equal to "interact" (waiting in ACD Queue).
If you are trying to retrieve callbacks which are scheduled but not submitted yet (i.e. not waiting in ACD queue yet), you can use the following.
I have added a filter on purpose = acd, to focus on this participant structure (as it is easier to detect status scheduled or waiting in queue there).
{
"interval": "2022-07-28T22:00:00.000Z/2022-07-29T22:00:00.000Z",
"order": "desc",
"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": "segmentEnd",
"operator": "notExists",
"value": null
},
{
"type": "dimension",
"dimension": "segmentType",
"operator": "matches",
"value": "scheduled"
},
{
"type": "dimension",
"dimension": "purpose",
"operator": "matches",
"value": "acd"
}
]
}
]
}
],
"conversationFilters": [
{
"type": "and",
"predicates": [
{
"type": "dimension",
"dimension": "conversationEnd",
"operator": "notExists",
"value": null
}
]
}
]
}
If you are trying to retrieve callbacks which are either scheduled or waiting in queue (but not connected to a Contact Center Agent yet), you can use the following.
{
"interval": "2022-07-28T22:00:00.000Z/2022-07-29T22:00:00.000Z",
"order": "desc",
"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": "segmentEnd",
"operator": "notExists",
"value": null
},
{
"type": "dimension",
"dimension": "segmentType",
"operator": "matches",
"value": "scheduled"
},
{
"type": "dimension",
"dimension": "purpose",
"operator": "matches",
"value": "acd"
}
]
},
{
"type": "and",
"predicates": [
{
"type": "dimension",
"dimension": "purpose",
"operator": "matches",
"value": "acd"
},
{
"type": "dimension",
"dimension": "mediaType",
"operator": "matches",
"value": "callback"
},
{
"type": "dimension",
"dimension": "segmentEnd",
"operator": "notExists",
"value": null
},
{
"type": "dimension",
"dimension": "segmentType",
"operator": "matches",
"value": "interact"
}
]
}
]
}
],
"conversationFilters": [
{
"type": "and",
"predicates": [
{
"type": "dimension",
"dimension": "conversationEnd",
"operator": "notExists",
"value": null
}
]
}
]
}
Regards,