Azure Bot Service

Aslam Mujawar
Globant
Published in
5 min readApr 28, 2021

Azure bot service is one of the main Azure AI service. It comes together with Azure Bot service and Bot Framework provide to build , test, deploy and manage intelligent bots all in one place. Azure bot service is used to create Intelligent, enterprise bot and that help you enrich the customer experience while maintaining control of your data to your own branded virtual assistant/bot to quickly connect and resolve user/customer queries.

Below image explain Bot service and Cognitive services flow.

Image from Microsoft

a. User Input: A virtual assistant/bot is an application that users interact with a conversational way using text, graphics or speech.

b. Channels: Bot Service support across multiple communication channels to reach more customers from Microsoft Teams, Skype, Slack, Cortana, Facebook Messenger and more channels to your website or app.

c. Devices: Bot Service support multiple devices to communicate with virtual assistance/bot like Mobile, smart watch, smart devices.

d. Bot Framework: Bot Framework is used to communicate between bot service and backend source/Knowledge base/cognitive services. The Bot Framework SDK allows you to create and develop bot. It is helping to reduce bot development time and developer efforts. It allow to integrate cognitive services like Language, Vision, Speech, third party API.

Bot Life Cycle:

Image from Microsoft

a. Design: First step in Bot life cycle is Architecture design that will finalize the language, business flow, cognitive services, channel and bot recruitment.

b. Build: Build bot using Bot framework with c#/node js code. integrate all the required cognitive services and bot framework features.

c. Test: Once Development finish or any module ready then we can test using Bot Emulator for local and for deploy we can use Web chat from Web app bot component.

d. Publish: Once bot get tested you can publish bot manually on app service that is automatically created along with Web app bot. Else you can set continuous deployment for publish.

e. Connect: Configure different required channel with deployed bot to get connected and communicate with end user.

f. Evaluate: Azure Bot Service provides Bot Metrix to track the analysis and uses of bot.

How it’s Works :

The Bot Framework Service sends information between the user’s bot-connected app channel and the bot. Each channel may include additional information in the activities they send. Before creating bots, it is important to understand how a bot uses activity objects to communicate with its users.

The message activity carries conversation information between the parties. In an echo bot example, the message activities are carrying simple text and the channel will render this text. Alternatively, the message activity might carry text to be spoken, suggested actions or cards to be displayed.

Let’s a look at activities that are exchanged when we run a simple echo bot.

Image from Microsoft

The Bot Framework Service may send a conversation update when a start of the conversation. one for the user joining the conversation and one for the bot joining.

Benefits :

a. Easy to Set-up & Scale : Azure bot service comes together with Bot Framework to provide build , test, deploy and manage intelligent bots all in one place

b. Manage Intents and Data : It allow to connect with managed Intent, cognitive services, third party API and data for communicate during user communication.

c. Be Available 24x7 : It providing service without down time and in all the region. Assist customers over chat & reduce drop-offs leads in anytime in all region.

d. Provide Multilingual Support : Its support multilingual user interaction across the multiple region.

e. Multi Channel Support : Integrate Bot Services across multiple communication channels to reach more customers.

f. Protect Sensitive Data : Make your customers feel secure by masking their confidential information.

h. Cost-Effective : Its supporting multiple pricing model that helps user to select pricing model according to business requirement and avoid unwanted cost to pay.

Create Azure Bot Service :

Open Azure Portal, click one create new and search for ‘Web App Bot’

It will open bellow screen and click on create button

Fill the bot form mandatory fields as per requirement

Select Bot development language and template from clicking Bot template option. For demo purpose I am taking C# Eco bot.

Once filled all details and created bot it will create Web App Bot and Web App service components. Web App for deploy custom bot code and Web App bot service for configure bot.

We can test deployed bot from “Test in Web Chat” option as attached in below screenshot. As I have selected C# eco bot and You can see eco response in bellow test screen.

Web App bot allowing to update Bot profile from portal. Its allowing to update bot icon, Bot Display name and Description which will visible to bot users.

Web App Bot Metrics provides the graphical analysis of bot uses.

Using Channels option you can easily configure the channels like teams, slack, email and other more options. Web app Bot default communicate using direct line channel.

By clicking “Get bot embed codes” it will open Configure Web Chat where we will get secret keys and embed code. Same embed code we can use on HTML page.

Conclusion:

Here I tried to explain very interesting Azure AI topic. This is basic understanding of Azure bot service along with Bot Framework and Bots. For sure there is many more thing you will get once start working on it. I Hope you enjoy blog and this will help you to develop bot application.

--

--