Use Case - Integrating a Copilot Chatbot with Nimbus

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.

 

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

  1. Go to Configuration > Service > Parameters.
  2. Click “Create”.
  3. Create the following parameters:
    1. AIAnswer
    2. AIAnswerIsGenerated
    3. AIQuestion
    4. AIChatbotQuestion
  4. Select either a tenant-wide or a service-specific Organization Unit for your parameters.

Build the workflow

Workflow overview
  1. Message: The workflow starts with greeting the customer.
  2. Collect Information: The customer is asked for input which is then stored in the parameter AIQuestion. This will trigger the flow.
  3. Message: Display waiting indicator for the customer.
  4. 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

  1. In Copilot Studio, select your newly created bot, go to tab Channels and chose Teams.
  2. In the Edit details window,  add a short and a long description and check Allow your users to add this copilot to a team.
  3. Switch to the Microsoft Teams admin center and log in.
  4. Go to Teams apps > Manage apps.
  5. Approve your chatbot.
    💡The chatbot might take a while to appear here. Once approved, you will see it in the list.
  6. 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

  1. Start with the trigger “When a task changes state.
  2. Initialize the follwoing 6 variables and add the values to them:
    1. BotName  (String)
    2. BotAppId  (String) 
    3. TeamId  (String)
    4. ChannelId  (String) 
    5. GeneratedAnswerFromBot (String, default=empty)
    6. GotAnAnswer (Boolean, default=false)
  3. Add a condition to check on the correct Parameter Update Name.
  4. 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:
  5. Wait for an answer. For this, use a “Do until” loop and check on the variable GotAnAnswer. Loop this until it is true.
  6. 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.
  7. 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:

Table of Contents