microsoft bot framework

Chatbots are computer programs simulating human conversations via text chats, or voice commands, or both. Short for chatterbot, a chatbot is an AI-feature, which could be used and embedded through any of the major messaging apps. A chatbot has several synonyms, including bot, interactive agent, IM bot, or an artificial conversation entity. 

Conversational bots enable users to interact with the web service via interactive cards, text, and task modules. They are amazingly flexible and could be scoped to handle several simple or even complex commands, and natural-language processing VAs, or virtual assistants. Moreover, they could be a single aspect of a bigger app, or a stand-alone entirely. 

What is the Microsoft Bot Framework?

The Bot Framework of Microsoft is a rich software development kit that uses Java, C#, Python, as well as JavaScript. If you have a bot that’s based on the Bot framework already, you could adapt it to work in Microsoft teams easily. An app development team could develop using any web-programming technology and directly call in the REST APIs with the help of Sharepoint Consultants of the Bot Framework. 

The Bot Framework Service could send an update on a conversion when a party joins in the conversation. For instance, on starting a Bot Framework Emulator conversation, you see a couple of conversation update activities, one for the user that joins the conversation, and one for the joining bot. In order to differentiate the conversation update activities, find out if the property of the added members include a member other than the chatbot. 

Creating a Bot for Microsoft Teams 

The Microsoft Teams is a tool that’s highly intuitive, creating an involved and productive work environment. Both remote and fixed workers across geographies and locations could access it. There is a wide range of benefits of the tool, most are related to increased time usage and optimizing team cooperation. 

Some of the benefits relate to the safety and security of the software in today’s world. Business of all shapes and sizes could take advantage of the numerous benefits of the tool. Now here is the procedure in building a bot for Microsoft Teams. 

The Prerequisites

  • Azure Subscription
  • Visual Studio (optional)
  • MS Account access
  • Installed MS Teams App

Making the Azure Bot

The section talks about how to build the Bot from the portal of Azure. 

1. Log into the Azure Portal

2. Choose New > Bot Service

C:\Users\Llesol-Family\Documents\chatbot.png

3. Build the Bot and add the information required

C:\Users\Llesol-Family\Documents\chatbot1.png

4. When you have chosen “Create”, the dashboard of the Azure portal would load. As soon as the BOT is done provisioning, an alert would appear. Navigate to the Bot through the alert and choose “Go to Resource”. 

C:\Users\Llesol-Family\Documents\chatbot2.png

5. Build the Microsoft App ID and the Password

Now, you’re required to make an application ID and a password. This is done so that the BOT could authenticate with the Microsoft Bot Framework. Choose the ‘Create Microsoft APP ID and password’, which would open a new tab. When making the ID, make certain to take a copy of it when a dialogue box opens. Copy the ID and the password into the Azure portal browser window. See below. 

C:\Users\Llesol-Family\Documents\chatbot3.png

C:\Users\Llesol-Family\Documents\chatbot4.png6. Select a Language

Now the bot requires a language. The language enables it to be developed further. There are currently two options, namely, Node.JS, or C#. The demo below is with C#. 

C:\Users\Llesol-Family\Documents\chatbot6.png

Next is choosing a template. Please choose the Question and Answer template. 

C:\Users\Llesol-Family\Documents\chatbot7.png

Agree to the Terms and Conditions, and then choose ‘Create Bot’.

C:\Users\Llesol-Family\Documents\chatbot8.png

After you have chosen the ‘Create Bot’ a dialogue box will appear.  In the drop-down, choose the ‘Create a New Knowledge Base’. You may be required to log in at this point. Try using the same account as the subscription in Azure to manage things easier. 

C:\Users\Llesol-Family\Documents\chatbot9.png

The bot now provision, but could take a few minutes. 

Continuous source control deployment (Optional)

This phase talks about who continuous deployment could be integrated into the chatbot. Keep in mind that this stage is optional. Once the bot is made, you could navigate to Azure’s Bot Service. A section for continuous deployment is visible in the BUILD configuration tab. 

In the demo, the source control provider is chosen as the Visual Team Services. It is required to have a Visual Studio Profile. Add the URL to the visual team services website, and generate an access token. Once the token and the URL are added, choose enable. 

C:\Users\Llesol-Family\Documents\chatbot10.png

When a dialogue appears warning around continuous deployment enabling, choose Got It. The solution could now be added to Visual Studio to do improvements on the Bot’s functionality. Examples of the functionality could include resource authentication to produce the Q&A framework. 

Adding Bot to Teams

The section describes how to add the Bot that’s been built into teams. 

1. In the Azure portal, navigate to the Bot, and then navigate to the Channels tab. 

C:\Users\Llesol-Family\Documents\chatbot11.png

This showcases all the channels supported, in which the Bot could be added to. The bot would be added to the Microsoft Teams of a SharePoint development company in the demo below. Choose the icon of the team and then Done. Now, the teams will appear under the connect to channels section. 

C:\Users\Llesol-Family\Documents\chatbot12.png

2. Click on the Microsoft Teams Text. 

This opens a new tab that asks you to open the bot in Microsoft Teams. 

C:\Users\Llesol-Family\Documents\chatbot13.png

The dialogue may be different, depending on the browser used. If you use Chrome, choose ‘Open Microsoft Teams’. The bot opens in MS Teams. 

C:\Users\Llesol-Family\Documents\chatbot14.png
C:\Users\Llesol-Family\Documents\chatbot15.png

Currently, the bot will respond to a singular input. Type “Hi” and find out what you get back. You now have created a Bot. Try and type something else and see what would be the response. 

Conclusion

Bots created on the Teams platform act as smart bridges between the Teams client and other workflows and services. This brings them into the context of the active collaboration platform.  Put simply, rather than switching apps to do work, you could have an automated conversation with the Teams bot that passes information into the mobile application for you. That way, all the work remains in Microsoft Teams. 

By Anurag Rathod

Anurag Rathod is an Editor of Appclonescript.com, who is passionate for app-based startup solutions and on-demand business ideas. He believes in spreading tech trends. He is an avid reader and loves thinking out of the box to promote new technologies.