Track the Routing Status of a Conversation
Notifies Salesforce about external routing results.
This API notifies Salesforce whether a conversation has successfully routed to a rep or failed to route. Use the results to determine whether to close the AgentWork record if routing succeeds or initiate another request if routing fails. This API doesn’t handle the transfer behavior after receiving the routing result event.
Routing can fail for various reasons. For example, routing can fail if the external routing system can’t fulfill the request. Routing will also fail if the receiving rep is busy or the external routing system doesn’t respond within 60 seconds after the request was sent. If it takes a while for the system to find a potential rep or queue to handle the work item, call this API before calling the Create an AgentWork Record (/agentWork
) API.
This API applies to the following product:
- Bring Your Own Channel for Contact Center as a Service
This API is available in version 62.0 and later.
v1/routingResult
POST
Authorization: Bearer <Salesforce access token>
String. Standard header. The authorization token, where \<token\>
is the JSON Web Token (JWT). Required.
Content-Type: <Request body format>
String. Standard header. The format of the request body. Valid format is multipart/form-data. Required.
OrgId: <Salesforce Org Id>
String. Standard header. The 15-character Org ID of the Salesforce org. Required.
AuthorizationContext: <ConversationChannel Definition developer name>
String. Standard header. The ConversationChannelDefinition developer name in the format {prefix}_{ConversationChannelDefinitionName}
. The prefix must match the developer name prefix of the corresponding connected app. For example, Partner1_ChannelDefinition1. Required.
RequestId: <GUID>
String. Standard header. A globally unique ID (GUID). Required.
For example,
Property Name | Type | Description | Required |
---|---|---|---|
workItemId | string | The unique ID for the associated MessagingSession record. The ID is 15 characters long. | Yes |
conversationIdentifier | string | The unique ID for the conversation channel. | Yes |
success | boolean | Indicates whether routing succeeded (true ) or failed (false ). If set to false, also set the errorMessage parameter. | Yes |
externallyRouted | boolean | Indicates whether this request is being routed to an external target outside the Salesforce org (true ) or internally through Omni-Channel routing (false ). Default value is true . | Yes |
errorMessage | string | The message that’s sent to the rep stating why routing failed. Only set this field if “success” : “false" . | No |
Send a request from the partner telephony system to Salesforce when the conversation fails to route (via partner-owned routing) to the target rep.
Send a request from the partner telephony system to Salesforce when the conversation successfully routes (via partner-owned routing) to the target rep.
- GitHub: Interaction Service APIs
- Bring Your Own Channel for CCaaS: Configure Partner-Owned Routing and Consent