Original Message:
Sent: 03-26-2025 08:52
From: Marcus Hanna
Subject: Help configuring a data action to cancel a scheduled callback when the customer calls back in ahead of the scheduled callback.
Would the PATCH Api be this one by chance? /api/v2/conversations/callbacks/{conversationId}
The one you provided doesn't seem to exist.
If anyone else has solved for this and has data action build to share please do, thanks!
Thanks
------------------------------
Marcus Hanna
Technology Manager
Original Message:
Sent: 03-26-2025 07:25
From: Orhun Sahin
Subject: Help configuring a data action to cancel a scheduled callback when the customer calls back in ahead of the scheduled callback.
Hi Marcus,
I belive that there's no native API endpoint to directly search scheduled callbacks using a phone number. To achieve this functionality, you'll have to implement a custom data storage mechanism. During callback scheduling, save the conversationId and the ANI (caller's phone number) to your own database. In your inbound call flow, query this database with the incoming caller's number. This allows you to identify and subsequently cancel any existing scheduled callbacks linked to that caller.
You can implement a custom solution as below;
During Callback Creation: When a callback is scheduled (whether via an agent script, an Architect flow's "Create Callback" action, or a direct API call), augment that process. Add logic to:
- Capture the
conversationId of the newly created callback. - Capture the associated customer ANI (ensure consistent formatting, e.g., E.164).
- Store these two pieces of information (Conversation ID + ANI) as a record in your own custom database or a Genesys Cloud Data Table.
During Inbound Call Flow:
- Capture the caller's ANI (
Call.Ani). - Use a Data Action to query your custom database/Data Table, searching for records matching the caller's ANI.
- This query should return the associated
conversationId(s) of any scheduled callbacks linked to that ANI in your custom store. - If matches are found, loop through the returned
conversationId(s). - Inside the loop, use the existing, standard Data Action calling
PATCH /api/v2/conversations/callbacks/{callbackId} with the state set to disconnected to cancel each found callback.
------------------------------
Orhun Sahin
Software Development Engineer
Original Message:
Sent: 03-25-2025 16:36
From: Marcus Hanna
Subject: Help configuring a data action to cancel a scheduled callback when the customer calls back in ahead of the scheduled callback.
Hello, I'm hoping someone in the community has successfully used GC Architect and Data Actions to check for scheduled callbacks associated with the customer's ANI when they call inbound, then cancel any matches automatically.
I believe the steps would be:
- Create a data Action to query the callbacks API
- Integrate it into an inbound flow to capture the ANI and execute the data action to search for callbacks with the matching ANI,
- Route the call after cancelling any scheduled callbacks using the callbacks API
Any build help would be great, we do not currently use and custom data actions that I know of.
Thanks!
#DataActions
------------------------------
Marcus Hanna
Technology Manager
------------------------------