Newer Version Available

This content describes an older version of this product. View Latest

Execute OmniFlow (Beta)

Executes the Omni-Channel flow to route calls. It passes the call ID (Salesforce VoiceCallId or telephony vendor ContactId) as parameters to the flow and returns the agent or queue routing instructions to the contact flow. By default, Service Cloud Voice uses the Omni-Channel flow (or fallback queue) specified for the phone channel that matches the dialed number. If the dialed number doesn’t match an existing phone channel, you can optionally set a new dialed number, Omni-Channel flow, and fallback queue as input parameters to this API call.

This REST API is part of Omni-Channel flow for Voice (Beta), which is a Beta Service feature. Customer may opt to try such Beta Service in its sole discretion. Any use of the Beta Service is subject to the applicable Beta Services Terms provided at Agreements and Terms.

Note

This endpoint is available in API version 52.0 and later.

URI
/telephony/v1/voiceCalls/{CALL_ID}/omniFlow
Formats
JSON, XML
HTTP Methods
PATCH
Authentication
Authorization: Bearer token
Parameters
Property Name Type Description Required
dialedNumber string Set a new dialed number to account for a dialed number that doesn’t have a phone channel set up. Dialed number is the phone number called. Yes
flowDevName string Set the Omni-Channel flow using its developer name. No
fallbackQueue string Set the fallback queue using its Salesforce queue developer name or ID. No
flowInputParameters string Set additional inputs to the Omni-Channel flow. No

Service Cloud Voice uses this order of precedence to routes calls.

  1. Uses the Omni-Channel flow assigned to the phone channel that matches the dialed number.
  2. Uses the fallback queue assigned to the phone channel that matches the dialed number.
  3. Uses the Omni-Channel flow assigned to the phone channel that matches the dialed number entered in the dialedNumber parameter.
  4. Uses the Omni-Channel flow entered in the flowDevName parameter.
  5. Uses the fallback queue entered in the fallbackQueue parameter.

Important

Example
Request:
1PATCH /telephony/v1/voiceCalls/0LQRM0000006CSz/omniFlow
2{
3    "dialedNumber": "+18445791189"
4    "flowDevName": "Route_VoiceCall",
5    "fallbackQueue": "00G111222333444",
6    "flowInputParameters": {
7        "Input1": "one",
8        "Input2": "two"
9    }
10}
Response without errors:
1{
2  "agent": "[AGENT_INFO]",
3  "queue": "[QUEUE_INFO]"}

AGENT_INFO and QUEUE_INFO correspond to the ExternalId field in the CallCenterRoutingMap

Note

Response with errors:
1{
2  "errors": ["error1", "error2"]
3}