---
schema_version: "1"
id: 6d3c3ffb838932b1afeb69cbd75bfdde4fc853ebd543dcf4d6da77ec54766a53
title: Transfer Messaging Sessions with Omni-Channel Flows
collection: developer
version: current
locale: en-us
portal_url: https://docs.salesforce.com/developer/current/en-us/service-cloud/messaging-byoc-ccaas/guides/flow-based-transfers.md
canonical_url: https://developer.salesforce.com/docs/service/messaging-byoc-ccaas/guide/flow-based-transfers.html
source_site: developer.salesforce.com
content_type: documentation
content_hash: 8c1a392405d7f9168f35761c41415e6d922c4957f30601483a8890c11614ee3f
products:
  - Bring Your Own Channel for CCaaS
  - Service Cloud Developer Content
---
# Transfer Messaging Sessions with Omni-Channel Flows

Configure this feature for Bring Your Own Channel for CCaaS to enable Messaging session transfers by using flow-based routing. These instructions are for implementations with partner-owned routing (`ConversationChannelDefinition.routingOwner` is `Partner`).

When this feature is enabled, all active Salesforce Omni-Channel flows that are assigned to the Messaging channel appear in the Conversation component Contacts list for reps to select as transfer destinations.

1. Implement your connector to listen for a routing request event that fires when a rep selects a flow from the Transfer Conversation destination list. The event provides the flow ID of the Omni-Channel flow. The flow can be customer-configured.
2. Perform the API calls in the order listed to handle routing for the Omni-Channel flow that transfers a messaging end user to a queue, rep, bot, or a destination based on required skills.

   - Call the Route API (`POST /api/v1/route`) with `routingType` set to `Transfer` to execute the `flowId` provided by the routing request event. Also, provide a fallback `queueId` in case the transfer to the Omni-Channel flow fails.
     - The Omni-Channel flow uses the logic in the flow to route the conversation to a rep, queue, or bot. The flow returns the `psrId` with the `userId` (rep) or `queueId` (queue).
     - If routing information is set in the Messaging channel as well as being passed using the `routingInfo` object in the Route API (`POST /api/v1/route`), the API takes precedence over the Omni-Channel Routing Messaging channel setting. If the `flowId` and `queueId` aren’t provided through the API call, the Omni-Channel Routing Messaging channel setting applies instead.
   - Call the agentWork API (`POST /api/v1/agentWork`) to create an AgentWork record when the system finds a potential rep, queue, or bot to handle the work item.
   - After routing completes, call the routingResult API (`POST /api/v1/routingResult`) to notify Salesforce whether the conversation transfer succeeded or failed.

     **note:** Your system must process the routing request within 60 seconds. If not processed within that timeframe, Salesforce notes the transfer request as failed and prompts the rep to try transferring again. If your system can’t perform all the API calls within 60 seconds, call the routingResult API as successfully routed before calling the agentWork API.

**See Also**

- [Dynamically Control Messaging Actions](https://developer.salesforce.com/docs/service/messaging-byoc-ccaas/guide/control-messaging-actions.md)
- _Salesforce Help_: [Route Service Cloud Messaging Sessions with Omni-Channel Flows](https://help.salesforce.com/s/articleView?id=service.messaging_routing_flows.htm)
- [Interaction Service API](https://developer.salesforce.com/docs/service/interaction-service-api/guide/get-started.html)
- _GitHub_: [Interaction Service APIs](https://github.com/salesforce-misc/interaction-service-apis)
