Contact centers want to be as performant as possible. When it comes to the Instant Messaging modality, there is a multitude of possibilities how to improve both the customer experience and the efficiency of the agent. Azure AI services allow us to implement varying levels of automation tailored to each scenario. Key considerations include the bot’s interaction with customers - whether it should process singular inputs, engage in dialogues, or even utilize internal functions to deliver responses akin to a virtual assistant.
In this use case, we are going to setup and configure an AI-driven chatbot in Copilot to integrate it with Nimbus.
Watch the demo video…
PRECONDITIONS
You require team owner, service owner, workflow administrator, or tenant administrator rights to access and configure Workflows and Parameters.
-
Interact and Instant Messaging need to be setup.
🔎 Refer to Use Case - Setting Up Interact and Use Case - Setting Up Instant Messaging for a step-by-step guide.
INC Azure Billing Cognitive Services
AZURE BILLING
The usage of Standard Azure AI Services will cause Azure Cognitive Services costs. These costs are determined by Microsoft. Also see: https://azure.microsoft.com/en-us/pricing/details/cognitive-services/speech-services/
- Please note that Nimbus support does not cover pricing discussions or make recommendations based on the Microsoft Azure infrastructure.
Preparations in Nimbus
Create the parameters
- Go to Configuration > Service > Parameters.
- Click “Create”.
-
Create the following parameters:
- AIAnswer
- AIAnswerIsGenerated
- AIQuestion
- AIChatbotQuestion
- Select either a tenant-wide or a service-specific Organization Unit for your parameters.
Build the workflow
- Message: The workflow starts with greeting the customer.
-
Collect Information: The customer is asked for input which is then stored in the parameter AIQuestion. This will trigger the flow.
- Message: Display waiting indicator for the customer.
-
Check parameter and Message: Checks the AIAnswerIsGenerated parameter a replies using AIAnswer.
Creating and Publishing the Chatbot in Teams
As a next step, we will create a bot in Copilot Studio and deploy it in Teams.
COPILOT STUDIO BILLING
Using Copilot Studio will cause costs. These costs are determined by Microsoft. Refer to https://www.microsoft.com/en-us/microsoft-copilot/microsoft-copilot-studio#Pricing for pricing information.
Create the chatbot
For creating a bot in Copilot, refer to this step-by-step guide from Microsoft.
Publish the chatbot
- In Copilot Studio, select your newly created bot, go to tab Channels and chose Teams.
- In the Edit details window, add a short and a long description and check Allow your users to add this copilot to a team.
- Switch to the Microsoft Teams admin center and log in.
- Go to Teams apps > Manage apps.
-
Approve your chatbot.
💡The chatbot might take a while to appear here. Once approved, you will see it in the list. - Add your chatbot to a channel in Teams. For this, go to the channel, type @ and select Get bots. Search the chatbot by its name and add it.
Creating the Power Automate Flow
Preparations
In Power Automate, catch the UpdatedParameter from Nimbus and send it to the channel of the Copilot bot. The chatbot will respond and you get the response to update the Nimbus task with it.
You need to send an HTTP request over the Graph API to create a message with a mention to the Copilot bot. Note down:
- BotName (get it from Copilot Studio in the bot settings)
- BotAppId (get it from Copilot Studio in the bot settings)
- TeamId (get it from Teams (it is not the link from copy team link) or use list teams in Power Automate to list all your teams)
- ChannelId (get it from the Channel (copy channel link) or use list channel for a team in Power Automate to list all your channels)
Also, the user who creates the message needs to be a member of the team in MS Teams. You can test the API by logging in with the user on Graph Explorer and executing the request:
This sends a message to the channel. The chatbot replies within a couple of seconds.
Build the Flow
- Start with the trigger “When a task changes state”.
-
Initialize the follwoing 6 variables and add the values to them:
- BotName (String)
- BotAppId (String)
- TeamId (String)
- ChannelId (String)
- GeneratedAnswerFromBot (String, default=empty)
- GotAnAnswer (Boolean, default=false)
- Add a condition to check on the correct Parameter Update Name.
-
Write your first message to the bot: you need to send the question into the channel where the bot is published to with the “Send a MS Graph HTTP request” element:
-
Wait for an answer. For this, use a “Do until” loop and check on the variable GotAnAnswer. Loop this until it is true.
- In the Set variable part, we try to parse a potential answer. This step will fail if the message has not been answered yet. So we branch here and set the loop variable accordingly.
- After the loop, you can update the Nimbus task with the GeneratedAnswerFromBot variable content.
Extending the Nimbus workflow
As a last step, we can extend the Nimbus workflow to a more complex one in order to handle initial chat messages and the agent handover: