Integrate an Azure agent
Applies to: Dynamics 365 Contact Center—embedded, Dynamics 365 Contact Center—standalone, and Dynamics 365 Customer Service
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.
Note
Copilot Studio bot is renamed as Copilot agent (agent or AI agent). Human agent is now renamed as customer service representative (service representative or representative). You might come across references to the old and new terms while we update the product UI, documentation, and training content.
In Omnichannel for Customer Service, you can integrate Azure AI agents (agents) seamlessly with chat and social channels, and also repurpose Azure bots to be smart assist bots and provide recommendations to customer service representatives (service representatives or representatives). Learn more in Manage smart assist and View smart assist suggestions. This article discusses how you can integrate Azure bots, configure routing rules, and set escalation rules.
Prerequisites
Have an AI agent that's built using the Microsoft Bot Framework and registered with Azure Bot Service. Ensure that you register the agent resource as a multitenant app.
Learn about how to create an Azure bot resource in the Create Azure bot resource section in the Bot Framework SDK documentation. Be sure to note the values of the Microsoft App ID and the Bot Application ID.
Set the messaging endpoint in your bot configuration. Learn more in Configure bot settings.
Register your app on the Azure portal. Make a note of the registered app name.
Note
If you're using multiple AI agents, make sure that you create unique applications and have unique application IDs for each agent.
- To use the agent over messaging channels, add Omnichannel channel as a supported channel.
Integrate Azure agents with Omnichannel for Customer Service
After you meet the prerequisites, perform the following steps to integrate your Azure agents with Omnichannel for Customer Service.
- Connect your Azure agent resource to Omnichannel channel.
- Configure the agent user as an omnichannel representative.
- Configure routing rules and context variables.
- Add the agent user to queues.
- Set escalation rules as required.
Connect your agent resource to Omnichannel channel
Perform the following steps to connect and register your agent with the Omnichannel channel.
Open the Azure portal, and then select your agent resource.
On the left pane, under Settings, select Channels and then select Omnichannel from the list of channels.
On the Configure Omnichannel page, select Apply.
Your agent is now registered with the Omnichannel channel.
Configure the AI agent user as an omnichannel representative
The agent user is first created as an application user and then assigned the Omnichannel agent role.
Open the PowerPlatform admin center.
Select the environment you want to configure, and then select Settings.
On the Settings page, select Users + permissions, and then select Application users.
On the Application users page, select New app user and in the Create a new app user dialog that opens, do the following:
a. Select a Business unit in the list. Make sure that you select the top-level business unit.
b. Edit the Security roles field, and in the Add security roles page, select Omnichannel agent from the dropdown list and select Save to go back to the Create a new app user dialog.
c. Select Add an app. The Add an app from Microsoft Entra Identity dialog opens.
d. Select the app that you created during your Azure app registration, and then select Add and Create.
Open your Power Platform environment and under Settings > System > Security > Users, search and open the newly created user.
Select the APPLICATION USER form.
In the User Information section, do the following:
- User type: Select Bot application user from the dropdown list.
- Bot application ID: Enter the Microsoft App ID from Microsoft Entra ID that you noted earlier from the Prerequisites section.
- Bot Application ID: Enter the bot application ID that you noted earlier from the Prerequisites section.
Select the save icon at the bottom of the page.
Add the AI agent user to queues
You can add an AI agent user to specific queues where you want the agent to handle the customer queries first, instead of the representative. For this option, you must ensure that the bot user has the highest capacity among all users in the queue.
Alternatively, you can also create a queue with the agent user only. In such a case, ensure that the routing rules are set in a way that customer queries are sent to this queue first. This action ensures that the agent acts as the first recipient for all queries.
A representative can transfer a chat to an AI agent by adding it to a queue, and then transferring the chat to the queue.
Note
- The chat cannot be transferred to the same agent.
- The agent works with the chat widget, workstream, and queues created in Omnichannel for Customer Service.
Configure routing rules
Routing rules route the incoming customer queries to their respective queues. Each routing rule has a condition and a destination queue. If the condition is evaluated as true, the customer query is routed to the destination queue. For agents, the condition is built by using context variables. Learn more about context variables and how to add them in Configure context variables for a bot.
AI agents can be developed to receive customer queries first, gain information about the query, and then pass the query to a representative if necessary. To achieve this behavior, you must first add the bot user to the queue and configure routing rules in a way that the incoming customer queries are routed to the queue with the bot user. Be sure to map the routing rules to the correct queues so that the queries are routed appropriately.
Set escalation rules
Escalation rules allow you to create rules for the AI agent to escalate the queries to the appropriate representative. For escalation rules, you must configure context variables and set routing rules to route the customer queries. If the AI agent escalates a customer query, it routes to the appropriate queue as per the defined routing rule. Even if the query is redirected to the same queue, another representative in the queue picks the conversation as per the capacity.
Privacy notice
You understand that your data may 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 bot, 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.
Related information
Overview of bots
Best practices for configuring Azure and Copilot Studio bots
Integrate Copilot Studio bot
Create workstreams for unified routing
Work with queues in Omnichannel for Customer Service
View bot insights
Configure Azure bots to escalate and end conversation
Configure context variables for bots
Manage context variables
Create an application user