This works now, apparently the data action was limited to the home division and not the QA division in which the callbacks were queued. I am able to get the numbers as needed with appropriate filters. Thank you, Johan, for all your help.!
Original Message:
Sent: 02-05-2026 08:06
From: Saif Khan
Subject: Prevent Callers from registering a callback request.
Hi Johan,
For some odd reason, I am not able to get the hits for active callbacks, using whatever possible filter combinations I could think of. Even if I am just trying to fetch all callback interaction based on ANI, the data action is just giving back the hits for completed callbacks. I have 6 interactions in a queue, out of which 3 are waiting and 3 are completed calls. I am only able to get the completed counts and waiting ones are not fetched.
------------------------------
Saif Khan
Original Message:
Sent: 02-04-2026 07:09
From: Johan Danielsson
Subject: Prevent Callers from registering a callback request.
Hi Saif,
Give this one a try. It could definitely be refined further, but it should illustrate the main idea. We're checking for purpose = ACD, which will include callbacks that haven't been completed yet. You can also extend this if you need to look for activity in a specific queue instead of checking across an entire division. Just play arround with the filters to match your needs.
{
"interval": "${input.startDate}/${input.endDate}",
"order": "asc",
"orderBy": "conversationStart",
"paging": { "pageSize": 25, "pageNumber": 1 },
"conversationFilters": [
{
"type": "and",
"predicates": [
{ "type": "dimension", "dimension": "divisionId", "operator": "matches", "value": "${input.divisionId}" },
{ "type": "dimension", "dimension": "conversationEnd", "operator": "notExists" }
]
}
],
"segmentFilters": [
{
"type": "and",
"predicates": [
{ "type": "dimension", "dimension": "mediaType", "operator": "matches", "value": "callback" },
{ "type": "dimension", "dimension": "purpose", "operator": "matches", "value": "acd" },
{ "type": "dimension", "dimension": "segmentEnd", "operator": "notExists" }
],
"clauses": [
{
"type": "or",
"predicates": [
{ "type": "dimension", "dimension": "callbackNumber", "operator": "matches", "value": "${input.ani}" },
{ "type": "dimension", "dimension": "ani", "operator": "matches", "value": "${input.ani}" },
{ "type": "dimension", "dimension": "addressFrom", "operator": "matches", "value": "${input.ani}" },
{ "type": "dimension", "dimension": "addressTo", "operator": "matches", "value": "${input.ani}" },
{ "type": "dimension", "dimension": "dnis", "operator": "matches", "value": "${input.ani}" }
]
}
]
}
]
}
------------------------------
Johan Danielsson
Original Message:
Sent: 02-04-2026 05:37
From: Saif Khan
Subject: Prevent Callers from registering a callback request.
Thank you so much Johan, I was able to run through the data action successfully but seems like this one is giving back all callbacks from the same phone number. I am looking to fetch only the active callbacks that are not completed yet. Is there anything else we should include?
Here is what I used-
{
"interval": "${input.startDate}/${input.endDate}",
"order": "asc",
"orderBy": "conversationStart",
"paging": { "pageSize": 25, "pageNumber": 1 },
"conversationFilters": [
{
"type": "and",
"predicates": [
{ "type": "dimension", "dimension": "divisionId", "operator": "matches", "value": "${input.divisionId}" }
]
}
],
"segmentFilters": [
{
"type": "and",
"predicates": [
{ "type": "dimension", "dimension": "mediaType", "operator": "matches", "value": "${input.mediaType}" }
],
"clauses": [
{
"type": "or",
"predicates": [
{ "type": "dimension", "dimension": "ani", "operator": "matches", "value": "${input.ani}" },
{ "type": "dimension", "dimension": "callbackNumber", "operator": "matches", "value": "${input.ani}" }
]
}
]
}
]
}
------------------------------
Saif Khan
Original Message:
Sent: 02-04-2026 04:37
From: Johan Danielsson
Subject: Prevent Callers from registering a callback request.
There's likely a cleaner solution, but one approach is to use the /api/v2/analytics/conversations/details/query endpoint to check whether any callbacks have already been placed for the caller's ANI.
You can then run that data action in your In‑Queue Call Flow and store a boolean value indicating whether the caller already has an active callback by checking if totalHits are larger than 0. This prevents you from having to call the data action again in subsequent loops within the flow.
I've attached an example data action, try it out and see if it aligns with what you're looking to accomplish. If not, hopefully it can atleast give you a starting point.
------------------------------
Johan Danielsson
Original Message:
Sent: 02-04-2026 01:20
From: Saif Khan
Subject: Prevent Callers from registering a callback request.
Is there a way in Architect by which we can identify if the caller has already registered a callback in the system from the same phone number earlier so that we can prevent them to register another request? If yes, how we can do that on a high level? Appreciate all the help and suggestions.
#ArchitectandDesign
------------------------------
Saif Khan
------------------------------