How to set up an MS Bot and integrate it within Microsoft Teams

HowyoucreatetheBotfromtheAzureportal 

  1. Log into the Azure Portal – https://portal.azure.com 
  2. SelectNew > Bot Service (preview)

3. Create the Bot and add the required information

Select  ‘Create’, then the Azure portal dashboard will load 

  1. Navigate to the Bot via the alert and select ‘Go to resource’.

  1. Select the ‘Create Microsoft App ID and password’. When creating the ID make sure you take a copy of it when the dialogue box opens. Copy the app id and password to the Azure portal browser window.

  1. Choose a language. At current the two Options are C# or NodeJS. Let’s select C#. Then select the Question and Answer template. Agree to the T&Cs and select ‘Create Bot’.

In a dialogue box select ‘Create a New Knowledge Base’ in the drop-down.

HowtoaddtheBotthathasbeencreatedintoteams .  

  1. Navigate to the bot in the Azure portal and navigate to the Channels tab.

This shows all the supported channels that the Bot can be added to. Let’s choose MS Teams channel. Select the team’s icon and click Done. The Microsoft Teams now appears under connect to channels section.

2. Click the Microsoft Teams Text. 

If you use Chrome select ‘Open Microsoft Teams’. The bot will then open in MS Teams. The bot only currently responds to a singular input. 

Howtotrainthebottobemoreintelligentandadddifferentresponsesandquestions .  

  1. Open the Microsoft QnA Maker, navigating to https://qnamaker.ai/Home/MyServices  

Select your Bot. 

  1. Select the pen icon to edit the bot. This will open the Bot service up. The Bot service has three headings on the left-hand side: 
  • Knowledge Base – the questions and answers the bot service can actually answer 
  • Test – section that you can test the knowledge base and configure responses 
  • Settings –You can point the bot towards URLs to generate a knowledge base, select files that contain a knowledge base and rename the bot service.

  1. Navigate to the settings to rename the bot. Select save and retrain and publish the service.

  1. Select the navigation option Knowledge Base to add QnAs to the service 
  • Select Add new QnA Pair 
  • Add the following: 
    • Question: what is Office 365 
    • Answer: O365 is Microsoft’s cloud offering of a selection of their products and services. 
  • Select save and retrain 
  • Publish the service 

To test this navigate to teams and type ‘what is office 365’ and get the answer. 

  1. Navigate to the settings option when editing the bot service. 

Publish the model and navigate back to the Knowledge Base, then you will see a set of new QnA pairs 

For more information on the QnA Maker visit:  https://qnamaker.ai/Documentation https://qnamaker.ai/Documentation/ActiveLearning