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/route/{voiceCallId}

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

HTTP Method 

PATCH

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 NameTypeDescriptionRequired
routingTargetstringSpecifies the Omni-Channel routing target as a Salesforce agent ID, queue ID, or Omni-Channel flow ID.Yes
fallbackQueuestringSpecifies the fallback queue by its Salesforce queue ID. Used if routing to a flow fails.No
flowInputParametersstringSpecifies more inputs to the Omni-Channel flow, if routingTarget is a flow.No

Example 

Request:

1PATCH /telephony/v1/voiceCalls/route/89328b83-ff42-4c85-a2af-e948124365de
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}