Integrate a Copilot Studio agent

Applies to: Dynamics 365 Contact Center—embedded, Dynamics 365 Contact Center—standalone, and Dynamics 365 Customer Service

Note

Copilot Studio bot is being renamed as Copilot agent (agent). Human agent is now renamed as customer service representative (service representative or representative). You'll come across references to the old and new terms while we update the product UI, documentation, and training content.

Important

Azure Active Directory is being renamed to Microsoft Entra ID. No action is needed from you. For more information, see New name for Azure Active Directory.

Tip

If you’d like to try Dynamics 365 Customer Service for free, you can sign up for a 30-day trial.

Use agents to simulate human-like conversations for routine activities so that you can let your customer service representatives (service representative or representative) focus on high-value interactions. You can use Microsoft Copilot Studio to create agents that can interact with customers in Dynamics 365 Contact Center or Dynamics 365 Customer Service.

The following capabilities are available for the agent conversations:

  • Seamlessly integrate your agent with all channels without needing to add channel-specific code in the agent.
  • Configure interactive voice response (IVR) capabilities for voice-enabled agents.
  • Configure contextual transfers to service representatives.
  • Analyze the agent transcript that's available in Microsoft Dataverse after the conversation is completed.
  • Configure routing rules to selectively route incoming requests to agents based on context, such as issue type or customer type. For example, you can route low-complexity issues to agents, or route the conversation to a sales or support agent based on the webpage browsing history of the customer.
  • Monitor the agent conversations in real time by using the supervisor dashboard, which includes details such as customer sentiment.
  • Use the historical dashboards to get insights into the effectiveness of the agents through metrics, such as resolution rate, escalation rate, resolution time, escalation time, and average sentiment.

When a conversation is escalated from a agent to a representative, the representative can see the full transcript of the agent conversation and get complete context while engaging with the customer. Learn more in Enable a agent to escalate and end conversation.

Prerequisites

You must have:

  • A product license for Copilot Studio. Learn more in Licensing for Copilot Studio.
  • A product license for chat, digital messaging, or voice channel for Dynamics 365 Customer Service, depending on your business requirements.
  • The CCI Admin security role to access the agent you create in Customer Service admin center or Contact Center admin center in Copilot Studio.
  • The Omnichannel administrator role. Learn more in Manage user roles

Create a Copilot Studio agent

You can create Copilot Studio agents in one of the following ways:

Connect your Copilot Studio agent to omnichannel instance

For the agent to be able to interact with customers in Dynamics 365 Contact Center or Customer Service, you must integrate the agent with your application. Follow the procedure in Connect your Copilot Studio agent to omnichannel to connect your Copilot Studio agent to the omnichannel instance.

When your customers need to speak with a representative, your agent can seamlessly hand off the conversation. When your agent hands off a conversation, it can share the full history of the conversation, and all relevant variables. Make sure you have an escalation article configured in your agent to hand off the conversation to a representative. Learn more in hand off to a live agent.

Set up agent capabilities

In Copilot Studio, you can add the following capabilities to your agent to finish your setup:

Add a agent to a workstream

In the Customer Service admin center app, select the Copilot Studio agent from the list of agents in the Workstreams area. Learn more in Add an agent to a workstream.

Note

  • You can add only one agent per workstream.
  • Agents can receive conversations only if they're added to push-based workstreams.
  • Voice-enabled agents that you create in the Customer Service admin center or Contact Center admin center work with enhanced voice workstreams only. Classic agents aren't supported in the enhanced voice experience. To create classic agents for existing voice workstreams that aren't migrated, use Copilot Studio.

Configure context variables for the Copilot Studio agent

After you configure your agent and add it to a workstream, you can configure context variables to route work items. You can also share context from Omnichannel with your Copilot Studio agent to create a rich and personalized experience. For information about creating context variables, go to Manage context variables. For information about configuring context variables for Copilot Studio agents, go to Configure context variables for Copilot Studio agent.

Add an agent to a queue

You can add an agent to the queue so that the agent can receive conversations from the queue. Learn more in create and manage queues for unified routing.

Automatically close a conversation

When an agent receives a conversation that isn't escalated to a service representative, the conversation is closed if the customer abandons it. The conversation will also be closed automatically after 30 minutes of inactivity.

This conversation appears in the Omnichannel for Customer Service dashboard with the status set to Closed and Resolved/abandoned state in the Copilot Studio dashboard. Learn more in Session outcomes over time chart.

End agent conversations

You must include an end of conversation article in a Copilot Studio agent to provide a clear and natural conclusion to the interaction, enhancing the overall user experience. It also allows the agent to suggest next steps, gather feedback, and handle any final errors, ensuring the user leaves the interaction satisfied.

In the voice channel, the system doesn't listen for the closeOmnichannelConversation context variable. You must configure an end of conversation message that explicitly ends the conversation in Omnichannel for Customer Service.

  1. In Copilot Studio, for the selected agent, add a new topic.

  2. Select Go to authoring canvas, and in Add node, select Call an action, and then select Create a flow.

  3. On the Power Automate window that opens on a new tab, do the following:

    1. In the Return value(s) to Power Virtual Agents box, select Add an output, and then select Yes/No.
    2. In the Enter title box, enter CloseOmnichannelConversation, which is the Omnichannel for Customer Service context variable name.
    3. In the Enter a value to respond box, select the Expression tab, and then enter bool(true) to build the expression, and select OK.
    4. Save the changes, and then exit Power Automate.
  4. In the topic that you were editing, select Call an action again, and then in the list, select the flow that you created.

  5. In Add node, select End the conversation, and then select Transfer to agent.

  6. Go to the topic in which you need to invoke the topic for ending the agent conversation in Omnichannel for Customer Service, and use the Go to another topic option in Add a node.

  7. Select the topic that you created for ending the agent conversation.

  8. Save and publish the changes.

Limitations

Description Limitation
Adaptive cards
An adaptive card is a customizable card that can contain any combination of text, speech, images, buttons, and input fields.
Typing
An agent receives a typing activity to indicate that the user is typing a response. An agent may send a typing activity to indicate to the user that it's working to fulfill a request or compile a response.
Typing indicators don't appear.
Format bot messages
You can set the optional TextFormat property to control how the text content of your message is rendered.
  • Copilot Studio doesn't support Markdown with images and text.
  • When Copilot Studio sends Markdown text, there's an extra space between lines.
OAuth card in Microsoft Teams
Using a chat agent and presenting an OAuth card in the Microsoft Teams channel.
In Copilot Studio, the sign-in node presents an OAuth card and it doesn't work properly.

Privacy notice

You understand that your data might be transmitted and shared with external systems and that your data may flow outside of your organization's compliance boundary (even if your organization is in a Government Cloud environment). For example, your messages are shared with the agent which could be interacting with a third-party system based on the integration done by you. Learn more about how we process your data in Microsoft Privacy Statement.

Troubleshoot issues for agents

How to end an agent conversation in Omnichannel for Customer Service

Next steps

Agent transfer scenarios

Manage your agents
Integrate an Azure agent
Manage context variables
Configure context variables for agents
Identify customers automatically
Enable an agent to escalate and end conversation
Best practices for configuring Azure and Copilot Studio bots
Work with queues in Omnichannel for Customer Service
Understand and create workstreams
Create and edit topics in Copilot Studio agent
Suggested actions
Add a chat widget