Recently, Microsoft has released a new service which is built using the Bot Framework and Azure Functions. This service is called Azure Bot Service. Thanks to Azure Bot Service, you can build and deploy smart bots that will interact with your users. It means that you can create an App that users interact with in a conversational way. So your Bot will wait for user input and automatically reply to the user. You can build bots in C# or Node.js directly in your browser or through Visual Studio. The main goal of a Bot is to interact with users in order to help them. So instead of reading documentations or downloading and installing mobile Apps, users will ask a question to your Bot and your Bot will find the answer for them.

What is Azure Functions?

Protect Your Data with BDRSuite

Cost-Effective Backup Solution for VMs, Servers, Endpoints, Cloud VMs & SaaS applications. Supports On-Premise, Remote, Hybrid and Cloud Backup, including Disaster Recovery, Ransomware Defense & more!

Azure Functions is a serverless compute service that enables you to run code on-demand without having to explicitly provision or manage infrastructure. In other words, organizations will pay for only what they consume!

What is Bot Framework?

The Bot Framework is a platform for building and deploying powerful and intelligent bots. You can build a bot from scratch because the Bot Framework provides the Bot Builder SDK for .NET and Node.js.

Download Banner

Microsoft try to simplify the experience for developers and to accelerate the development process. So Microsoft has included samples, templates and Visual Studio support. For those of you who want to use Visual Studio, note that a VS template called “Bot Application” is available:

Chat-Bot-with-Azure-Bot-Service

The Bot Framework supports several popular channels for connecting your bots. Users can start conversations with your bot on the following channels. Please note that the prerequisite is to configure your bot to work with. Below are the channels:

  • Bing
  • Cortana
  • Direct Line
  • Email
  • Facebook Messenger
  • GroupMe
  • Kik
  • Microsoft Teams
  • Skype For Business
  • Slack
  • Telegram
  • Twilio / SMS

Here is an overview of the Azure Bot Service from Channel9:

Chat-Bot-with-Azure-Bot-Service

Get started

Creating a bot is very very simple. You only need to have an Active Azure Subscription, so let’s see the steps to create your bot. First, in the Azure Market, search for Bot Service:

Chat-Bot-with-Azure-Bot-Service

Then, you must:

  • Enter the name of your bot. This name must be a unique name
  • Select the subscription you want to use
  • Create an existing Resource Group or create a new one
  • Select the hosting Plan. You can choose between: “App Service plan” which is a standard Azure web app that will allocate a predefined capacity with predictable costs. Else, you can use “Consumption plan” that will use the pay-per-run Azure Functions pricing
  • Finally, click “Create”

Chat-Bot-with-Azure-Bot-Service

Once the deployment to the Resource Group has been done, you can go to the resource and create the Microsoft App ID. Basically, it is the identity of your Bot that will be automatically generated by Microsoft. Copy and Paste the App ID and Password:

Chat-Bot-with-Azure-Bot-Service

Next step is to select which language will be used in order to create your bot. So select your prefered language. Then, you must select a template. In this article, I will create a very basic Bot so I click “Basic” and “Create”:

Chat-Bot-with-Azure-Bot-Service

Once the Bot is created, your screen will look the following:

  • Build: Choose how to work with your code (Visual Studio, Web Browser editor, …)
  • Channels: Here, you can configure the channels
  • Analytics: Basics statistics such as how many users are connected
  • Settings: Here, you can configure your bot
  • Test: In this tab, you can test and use your bot

Chat-Bot-with-Azure-Bot-Service

Ok, so the very first thing is to test the bot! Let’s click “Test” and a chat window will appear. You can start communicating with your bot:

Chat-Bot-with-Azure-Bot-Service

Ok, it works! The bot is fully functional. Let’s see how to modify the bot. In order to customize the bot, we need to deal with “EchoDialog.csx”

Chat-Bot-with-Azure-Bot-Service

Even if you don’t have C# skills, you can easily modify the code. I will change the text in line 22 from “You said” to “User input”. Once the modification is done, you must open the console and run “Build.cmd” in order to update your bot.

Chat-Bot-with-Azure-Bot-Service

Great it works! Let’s see another example. I want to transform my Basic Bot to a Speaking Clock Bot. As you can see I can easily customize my Bot with the following code:

Chat-Bot-with-Azure-Bot-Service

Now I can ask to my bot: “What is the date today?”

Chat-Bot-with-Azure-Bot-Service

Useful links

Below are some useful links that can help you to start with Azure Bot Service:

Conclusion

Azure Bot Service is not just a gadget because conversational apps have become very popular. You must take a look at this topic because mobile Apps will be replaced by Bot. Microsoft said:

“The problem with apps is that a user has to go out and install them on their phone. What is great about bots is you build it once and it is available everywhere.”

Read more about the difference between traditional App and Bot: https://docs.microsoft.com/fr-fr/bot-framework/dotnet/bot-builder-dotnet-manage-conversation-flow

Finally, if you want more information about Azure Bot Service, please read the announcement: https://azure.microsoft.com/en-us/blog/microsoft-azure-announces-industry-s-first-cloud-bot-as-a-service/

Now you can easily modify your bot to suit your needs. Below are some examples:

  • You can transform your Bot to be a monitoring tool. User will enter a website URL and your bot will check the HTTP status and return if the website is running or not
  • You can use your Bot to be a calculator
  • Your bot can retrieve any information from a website

Experience modern data protection with this latest Vembu BDR Suite v.3.8.0 FREE edition. Try the 30 days free trial here: https://www.bdrsuite.com/vembu-bdr-suite-download/

Follow our Twitter and Facebook feeds for new releases, updates, insightful posts and more.

Rate this post