Multiple Agents in Service Assistant

Learn how to use multiple agents in Service Assistant to create specialized agents that provide issue resolution support for different record types, business units, and products.

Required Editions

View supported editions.
Checkmark This article applies to: Service Assistant for Case, Messaging, and Voice
Note
Note This section provides reference guidance for the configuration and use of multiple Service Assistant agents. Setup guidance is provided in Set Up Multiple Agents.

To open the video in full screen, click Open in full screen. The video applies to both Service Assistant for Case and Messaging.

Multiple Agents in Service Assistant

When your business spans multiple products, services, or business units, you can create multiple Service Assistant agents to have tailored issue resolution guidance for specific records. You can create up to 150 Service Assistant agents and provide them with specialized subagents, instructions, and actions.

When you have more than one agent, an autolaunched flow assigns each record to a specific agent. The flow receives an input variable containing the record ID and returns an output variable containing the API name of the agent to assign. Because every customer's business requirements are different, build your own autolaunched flow that sets your specific rerouting logic with Get Records, Decision, and Assignment elements. We don't provide a flow template.

These sections specify the requirements for your flow and provide reference guidance for how the feature works. Setup guidance is provided in Set Up Multiple Agent Record Assignment, which walks you through creating the flow, connecting it to Service Assistant through the setup page, and testing your configuration.

In addition to creating a routing flow, set a default agent. Every record that meets your eligibility criteria has an agent assigned. The default agent handles records that don't match the criteria and conditions in your flow or whose matched agent is deactivated. All agents use the same eligibility criteria. You can't set different eligibility criteria for different agents. See Default Agent Configuration.

Multiple Agent Flow Configuration

How you configure your flow is based on your business requirements. You can configure your flow to route agents to record based on data like record type, origin, queue, channel, related records, and custom fields. Generally, your agent routing flow can use these elements.

Element Role
Get Records Retrieves the record with the input recordId so the flow reads the fields and related records.
Decision Evaluates the record data and branches to the matching outcome. Each Decision outcome defines the conditions a record must meet, and each outcome corresponds to one agent.
Assignment Sets the output variable to the API name of the agent for the outcome.

The only requirements for your flow are that it's an autolaunched flow and includes a text input variable that receives the record ID and a text output variable that returns the API name of the agent to assign.

Variable Type Availability Purpose
  • caseId
  • messagingsessionId
  • voicecallId
Text (String) Available for input Receives the record ID to look up.
BotDefinitionDeveloperName Text (String) Available for output Returns the API name of the agent to assign to the record.

In each Assignment element, add your output variable and set the Value field to the API name of the agent you want to assign. Find the API name in the agent's detail page in Setup. Our recommended name for the output variable is BotDefinitionDeveloperName. Set the name to your preferences.

Setup guidance for the multiple agent feature is provided in Set Up Multiple Agent Record Assignment. We provide steps for creating the required input and output variables, adding a Get Records element, and connecting your flow to Service Assistant. In addition, we provide general guidance for setting up the Decision element, outcome conditions, and Assignment elements. However, configure those elements according to your business requirements.

If you have an existing record routing flow for records, you can use it for Service Assistant as long as it's autolaunched and includes the required input and output variables.

Service Assistant supports assigning agents based on related records, like Account or Contact. In your Get Records element, select Also get related records and choose the relationships you need.

Agent Assignment and Routing

The agent assignment flow runs only after a record meets your eligibility criteria. All agents share the same eligibility flow. You can't assign different eligibility flows to different agents.

When a record meets your eligibility criteria, your assignment flow runs and Service Assistant evaluates which agent to assign.

  • If no agent assignment flow is configured, Service Assistant assigns your default agent, which is the agent assigned to the record when the record doesn't meet any of the criteria and conditions set in your flow. See next section.
  • If an agent assignment flow is configured, Service Assistant runs it after the eligibility criteria are met. The flow evaluates the record against your routing conditions and returns the API name of the active, matching agent.
  • If the flow executes successfully and returns an active agent, that agent is assigned.
  • If the flow executes successfully but returns an empty or null value, the default agent is assigned. The component doesn't show a message or notification that the default agent is assigned.
  • If the flow encounters an error, times out, or returns an invalid or inactive agent API name, the default agent isn't assigned and the service rep sees this error message: "An agent wasn't assigned to the record. Ask your admin to check the agent assignment flow and make sure all agents are activated."

Default Agent Configuration

Every record that meets your eligibility criteria is assigned to an agent. If your eligibility criteria and routing flow account for a defined set of record types you want Service Assistant to handle, the default agent handles all the record types you haven't specified in your flow.

If Service Assistant is configured to handle a wide variety of record types, your flow can miss some record types, and those records route to the default agent automatically. Common scenarios include:

  • A new record type is added after your flow is built but isn't yet mapped to an agent.
  • A record has a valid record type, but a field used in the decision outcome (like origin or a custom field) is empty or set to a value your flow doesn't handle.

Because the default agent can be assigned to a range of record types that aren't defined in your flow, we recommend configuring it as a generalist, not a specialist. Keep its subagents, instructions, and actions general enough to handle a range of records. If the default agent is configured for specific record types, service plans can contain incorrect guidance or no subagent is found to assign to the record.

As a best practice, try to address as many record types in your flow as possible. Always review your flow regularly, especially when you add record types or business units, or modify conditions and outcomes set in your flow.

When the Default Agent Is Used When the Default Agent Isn't Used

In the listed scenarios, the default agent is automatically assigned, and the component doesn't show a notification of the assignment.

  • No routing flow is configured.
  • The routing flow runs successfully but returns an empty or null value.
  • A record doesn't match any conditions defined in your flow.

In the listed scenarios, the default agent isn't assigned to the record, and you see this error message: "An agent wasn't assigned to the record. Ask your admin to check the agent assignment flow and make sure all agents are activated."

  • The routing flow encounters an error or timeout.
  • The flow returns an invalid or inactive agent API name.

Agent Assignment Persistence

When a record is opened and meets your eligibility criteria, the assignment flow runs automatically based on the current record data.

  • For Case, the agent assigned is based on the fields and objects set in your Service AI grounding configuration.
  • For Messaging and Voice, the agent assigned is based on the customer intent and issue stated in the initial transcript of the session or call.

Once an issue is identified based on the record data, the assigned agent:

  • Assigns a subagent to the record.
  • Generates the plan summary for Case and Messaging.
  • Generates the first step of the plan for Voice.

Once both an agent and subagent are assigned, the agent assigned to the record persists for the lifetime of the record. If the record data changes or the customer's intent changes, a new agent isn't assigned. The assigned agent checks its subagents and switches to a different subagent if one can better help with the new issue. If the issue or record data changes are associated with a different agent entirely, the record keeps its assigned agent.

For example, if a customer starts off with a transaction decline, which is handled by a Transactions agent, and later asks for help resetting their account password, which is handled by an Account Management agent, the agent isn't reassigned. In that case, Service Assistant shows a message like: "I can't help with this issue. Consult the company documentation for assistance."

If the flow encounters an error, or the currently assigned agent is deactivated after assignment, service reps see this error message: "An agent wasn't assigned to the record. Ask your admin to check the agent assignment flow and make sure all agents are activated." Service Assistant doesn't automatically reassign to the default agent.

Testing Agent Routing

Testing agent routing is manual, and you have two ways to verify that records route to the agent you expect.

  • Test your flow in Flow Builder with the Debug tool. Enter the record ID of a record that you expect to match a specific agent in your flow, and confirm that the flow returns that agent's API name.
  • Create a record that matches each routing condition in your flow, and start a service plan. Then review the subagent name shown in the summary text to confirm that the correct agent is assigned.

The subagent name in the plan summary corresponds to the agent assigned to the record. For example, if you see "Service Plan Available: Order Refund," the assigned agent uses the Order Refund subagent. If the subagent isn't what you expect, review your Decision element conditions and Assignment element values to confirm that they match your routing criteria.

When a record doesn't meet the criteria set in your flow, your default agent is assigned automatically, and the component doesn't show a message indicating the assignment.

For testing steps, see Set Up Multiple Agent Record Assignment.

Considerations

  • Each new agent you create is assigned its own agent user. Give each agent a unique name so that you can tell your agents apart and reference the correct API name in your routing flow.
  • If you have an active implementation of Service Assistant before the release of the multiple agent feature on June 30, 2026, your existing agent is automatically set as your default agent. If you activate and set up Service Assistant after the official release, manually set a default agent in the Setup page.
  • The flow executes under the ServicePlanner User's Run Flows permission provided by the Einstein Agent User profile assigned to the agent. Service reps don't require access to the flow.
  • The eligibility flow and the agent assignment flow are separate flows that serve distinct purposes. The eligibility flow determines whether a record is eligible for a service plan. The agent assignment flow determines which agent handles that record. While it's possible to adapt your eligibility flow and set it as your multiple agent assignment flow, we don't recommend this approach. The two flows contain different variable names and configurations, which can make the flow difficult to maintain and troubleshoot. For the best results, create a dedicated autolaunched flow for agent assignment.
  • Agent API names are case-sensitive. The API name returned by your flow requires an exact match with the Service Assistant agent's API name, including capitalization and underscores.
  • Make sure that routing fields are populated before Service Assistant creates a service plan summary. If a field used in your routing criteria is empty or incorrect when Service Assistant starts to generate a service plan summary, your flow runs based on that incomplete data and can assign the wrong agent.
  • If your routing flow encounters errors (timeout, invalid agent API name, inactive agent), the service rep sees an error message and notifies their admin. The default agent is used only for successful flow execution that returns empty or null, not for flow error scenarios.