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
------------------------------