Introduction
In this article, we will see how to create a Bot Service in Azure.
- Concept
- Implementation – Creating a new Microsoft Bot Service in Azure.
- Implementation – Access the Microsoft Bot Service.
About
- Bot is used as an app that helps users interact in a conversational way.
- It may be simple as basic pattern matching with a response or it may be sophisticated handling the artificial techniques with complex conversational state and integration to existing business services.
- The Bot framework helps you to build the bots which support different types of interactions with users.
- You can design conversations with your bot for more freedom.
- You can design the bot in such a way that where it provides the user choices or user actions.
- The conversations in bot use the simple text strings or more complex things which contains text, images, and action buttons etc.
- The best advantage of Bot is with Visual Studio where you can download, debug, republish your C# bot.
- Setup is also very simple. It can be continuously deployed with Visual Studio online and GitHub.
Implementation – Creating a new Microsoft Bot service in Azure.
- Sign in to the Azure Management portal.
- Open Azure portal and click on “+”.
- Click on "AI + Cognitive Services" and then select an option of “Bot Service “.
- Click "Create" on the next screen.
![Bot service in Azure]()
- Fill all the details like App Name, Subscription, Resource Group, Location etc.
- Use an existing Resource or create a new one as per your requirement.
- Give appropriate name and pricing tier according to your requirement and replication.
![Bot service in Azure]()
- Once you fill all the required details, then click on "Create".
- Once your bot service deploys successfully, open it.
![Bot service in Azure]()
Implementation – Access the Microsoft Bot Service.
- Open bot service which you just created.
- Choose "Template".
- Choose C# and choose the basic template.
- Click on "Next" button.
- Now, create a Microsoft App ID by clicking on "Create Microsoft App ID" and password.
![Bot service in Azure]()
- Note down the App name and App ID in the Notepad and click on "Generate an app password" to continue.
- After this, you will see the password in the dialog box. Just note it down on the Notepad.
![Bot service in Azure]()
- Then, click on "Finish" and go back to Bot Framework, as shown in the above picture.
- Enter the password which you obtained in the previous step.
- Then, click on "I agree" checkbox.
- Now finally, click on the "Create Bot" button.
![Bot service in Azure]()
- On the next screen, click on the "Test" button which you see at the top right of your screen.
![Bot service in Azure]()
- Now, type the message "Hi" in the chat window and see the response which it will give you back, as shown in the below picture.
![Bot service in Azure]()
Summary
This is how you can use Azure Bot Service in Azure.