Configure Callbacks

The following code samples show how to implement the Route Voice Call API in your connector to transfer active voice calls to an agent, queue, or flow.

The Execute an Omni-Channel Flow API cannot be used for BYOT Unified Routing transfer to flow.

Note

To transfer a voice call to an Omni-Channel flow, pass the Flow ID as the routingTarget and optionally include flowInputParameters to pass input variables to the flow. To specify a fallback queue if the flow transfer fails, include fallbackQueue.

On success, returns the routing response. If required parameters are missing or the request fails, returns an error message. For example:

For example, see this sample addParticipant implementation for Transfer to Queue or Transfer to Agent scenarios. The function creates a transfer voice call, checks whether Unified Routing is enabled, and invokes routeVoiceCall with the transfer target as the routingTarget. On success, Salesforce routes the call to the specified agent or queue and assigns the work through Omni-Channel.