Note: This release is in preview. Features described here don’t become generally available until the latest general availability date that Salesforce announces for this release. Before then, and where features are noted as beta, pilot, or developer preview, we can’t guarantee general availability within any particular time frame or at all. Make your purchase decisions only on the basis of generally available products and features.

Route a Voice Call

Routes a voice call to a rep, agent, queue, or flow if Omni-Channel Unified Routing is enabled.

Use this API to route a voice call or transfer a voice call with Omni-Channel to a rep or agent, queue, or Omni-Channel flow. When a rep selects a transfer target in Omni-Channel, this API passes the call ID (Salesforce VoiceCallId or telephony vendor ContactId) as a parameter. Unlike the Execute an Omni-Channel Flow API, this API provides a single integration point for routing and transferring voice calls with Unified Routing.

The Route a Voice Call API returns only the routing request status of success or failure. Use this API to instruct Omni Channel to route the voice call to a specific target, and don’t depend on the response.

This API is processed if the call belongs to a contact center that has Unified Routing with Omni-Channel enabled.

URI

https://{MyDomain}.my.salesforce-scrt.com/telephony/v1/voiceCalls/{CALL ID}/routeVoiceCall

Where {MyDomain} is a value configured as part of Salesforce Voice setup and {CALL ID} is the Salesforce voiceCallId or the telephony vendor’s contact ID.

HTTP Method

POST

Headers

Authorization: Bearer <token>

String. Standard header. The authorization token, where <token> is the JSON Web Token (JWT). Required.

Content-Type: <format>
String. Standard header. The format of the request body. Valid formats include JSON and XML. For example, application/json or application/xml. Required.
Telephony-Provider-Name: <telephony provider name>
String. Custom header. The name of the telephony provider that calls this API. For example, Amazon Connect.

Parameters

Property Name Type Description Required
routingTarget string Specifies the Omni-Channel routing target as a Salesforce agent ID, queue ID, or Omni-Channel flow ID. Yes
fallbackQueue string Specifies the fallback queue by its Salesforce queue ID. Used if routing to a flow fails. No
flowInputParameters string Specifies more inputs to the Omni-Channel flow, if routingTarget is a flow. No

Example

Request:

1POST /telephony/v1/voiceCalls/89328b83-ff42-4c85-a2af-e948124365de/routeVoiceCall
2
3{
4  "routingTarget": "300SG000015iJ38YAE",
5  "fallbackQueue": "00G111222333444",
6  "flowInputParameters": {
7      "Input1": "one",
8      "Input2": "two"
9  }
10}

Response:

The API returns the routing status only. The Omni Channel routing engine routes the call to a specific user, queue, or flow.
1{
2  "status": "Success"
3}