Create a Sample Outbound Flow for Agentforce Service Agents

To help your customers efficiently set up an AI agent with Bring Your Own Channel for Messaging, create a sample outbound Omni-Channel flow and include it in your managed package. This outbound flow escalates a conversation from an AI agent to a rep when needed. When the Salesforce admin sets up the AI agent, they associate the agent with this outbound flow.

For your package, we recommend creating a flow configuration that reflects the expected business logic of your customers. Before you package the flow template, optionally test it to ensure that it's properly set up.

Before you begin, verify that you’ve enabled Bring Your Own Channel for Messaging.

  1. Follow the steps in the Route Work Items to a Specific Agent Salesforce Help page to create an outbound Omni-Channel flow. The Salesforce admin uses this flow as a template to create the outbound flow for the AI agent. When you save the flow, select Template to save it as a template.
  2. Test the flow. This step in optional. Follow the steps to Set Up an Agentforce Service Agent for Bring Your Own Channel. During the setup process, you'll associate the agent with the sample outbound flow you just created. Adjust the sample flow as needed.
  3. Create the managed package, adding the outbound Omni-Channel flow template to the package.

To let messaging end users know that an AI agent is actively engaged in their conversation, set up your integration to support the Show Agentforce agent progress indicator setting. Learn more at Configure Agentforce Service Agent Progress Indicators.

Optionally, set up your integration to enable the AI agent to proactively initiate conversations and send the first message to an end-user. For example, the agent can engage with users on third-party self-service portals without waiting for the end-user's initial message.

Call the Establish Conversation API (POST /api/v1/conversation) upon an event, such as when a chat widget is opened on your platform. This API execution returns a conversationIdentifier value and messaging session ID. Optionally, include routingAttributes in the payload to support custom parameters.

If the routing owner is Salesforce (routingOwner is Salesforce in the Conversation Channel Definition record), Omni-Channel routes the conversation. An AI agent proactively starts a conversation and sends a welcome message by using platform events.

See Also