Hand off to a live agent
With Copilot Studio, you can configure your agent to hand off conversations to live agents seamlessly and contextually.
When your agent hands off a conversation, it can share the full history of the conversation, and all relevant variables. With this context, a live agent that uses a connected engagement hub can be notified that a conversation requires a live agent, see the context of the prior conversation, and resume the conversation.
For more information about how to configure handoff with Omnichannel for Customer Service, see Configure handoff to Dynamics 365 Customer Service.
Note
You can choose to escalate an agent conversation without linking to an engagement hub:
- At the bottom of the desired topic, select the Add node icon , point to Topic Management, and select Go to another topic.
- Select Escalate.
Escalate is a system topic that, by default, provides a simple message to a user if they ask for a human agent.
You can edit the topic to include a simple URL to a support website or ticketing system, or to include instructions for emailing or contacting support.
Prerequisites
- A agent built with Microsoft Copilot Studio
- An engagement hub that is being used by live agents, such as Omnichannel for Customer Service, and you need to configure the connection, as described in Configure handoff to Omnichannel for Customer Service
Configure the Escalate system topic
When you create an agent from Dynamics 365 Customer Service, the Escalate system topic already includes a Transfer conversation node. However, agents created in Copilot Studio aren't configured with this node by default. To add a Transfer conversation node to the Escalate system topic, follow these steps:
In the side navigation pane, select Topics, switch to the System tab, and select the Escalate topic.
At the bottom of the topic, select the Add node icon , point to Topic Management, and select Transfer conversation.
Trigger handoff to a live agent
Customers engaging with your agent can ask for a live agent at any point in the conversation. This escalation can happen in two ways, with an implicit trigger or an explicit trigger.
Upon triggering the handoff topic, the agent starts the handoff to the configured engagement hub, and sends over all conversation context to find the next best live agent to ramp them up so they can resume the conversation.
Implicit triggers
In some instances, your agent might be unable to determine the intent of a customer's conversation. For example, the customer might be asking a specific question for which there's no topic, or no matching option within a topic.
In other instances, the customer might ask to be handed off to a live agent immediately. For example, a customer might type "talk to agent" mid-way into a conversation.
When the agent detects an escalation in this manner, it automatically redirects the user to the Escalate system topic. This type of trigger is known as implicit triggering.
Explicit triggers
When creating topics for your agent, you may determine that some topics require interaction with a human. This type of trigger is known as explicit triggering.
In these instances, you must add a Transfer conversation node to the topic. This node lets you add a Private message to agent, which is sent to the connected engagement hub to help the live agent understand the history and context of the conversation.
Note
Conversations that reach this node are marked as Escalated sessions in reporting analytics.
To configure explicit triggering for a topic:
At the bottom of the topic, select the Add node icon , then select Send a message to add a message node. Enter what the agent should say to indicate that transfer to a live agent is about to occur.
Below the message node, select the Add node icon , point to Topic Management, and select Transfer conversation.
Enter an optional private message to the live agent in the Transfer conversation node. This optional message can be useful if you have multiple topics with Transfer conversation nodes as the information is stored in the
va_AgentMessage
context variable.
The topic starts the transfer to a live agent when this node is reached. You can test the handoff by triggering the topic in the test canvas.
Note
Once you add a Transfer conversation node into a conversation, each time you trigger handoff your users will see a "No renderer for this activity" message on the demo website. This message suggests the need to customize your chat canvas to implement custom client-side code that brings in a human agent from your engagement hub into the conversation.
Context variables available upon handoff
Beyond providing an automated way for a conversation to be ported into an engagement hub, it's important to ensure that the best agent for a specific problem is engaged. To help route conversations to the most appropriate live agent there are context variables that are also passed to the engagement hub.
You can use these variables to automatically determine where the conversation should be routed. For example, you might have added Transfer conversation nodes to several different topics, and you want to route conversations related to certain topics to specific agents.
The following table lists the context variables available by default.
Context | Purpose | Example |
---|---|---|
va_Scope |
Route escalations to a live agent. | "agent" |
va_LastTopic |
Route escalations to a live agent and help them ramp-up. Includes the last topic that was triggered by an utterance from the user. | "Return items" |
va_Topics |
Ramp-up a live agent. Only includes topics triggered by end user using a trigger phrase. Doesn't include topics that were redirected to. | [ "Greetings", "Store Hours", "Return Item" ] |
va_LastPhrases |
Route escalation to a live agent and help them ramp-up. | "Can I return my item" |
va_Phrases |
Ramp-up a live agent. | ["Hi", "When does store open", "Can I return my item" ] |
va_ConversationId |
Uniquely identify an agent conversation. | 6dba796e-2233-4ea8-881b-4b3ac2b8bbe9 |
va_AgentMessage |
Ramp-up a live agent. | "Got a gift from: HandoffTest" |
va_BotId |
Identify the agent that's handing off a conversation. | 6dba796e-2233-4ea8-881b-4b3ac2b8bbe9 |
va_Language |
Route escalation to a live agent. | "en-us" |
All user-defined topic variables | Ramp-up a live agent. | @StoreLocation = "Bellevue" |
A customer might go through several topics prior to escalating. Your agent gathers all context variables across topics and merges them before sending to the engagement hub.
If there are topics with similarly named context variables, the agent promotes the most recently defined topic variable.