How to Build Intelligent Bots with Microsoft Bot Framework: A Step-by-Step Guide

Umesh PanditUmesh Pandit
3 min read

I am one of those geeks who get fascinated by new technologies and hackathons where fun, interactive experiences can be created. I'm really attracted to the vast power of conversational AI. I'm not a professional developer, but with Microsoft's Bot Framework, one is able to build, test, and even deploy bots to do just about anything.

They are capable of responding to simple questions and complex conversations alike. So, today, I will share with you my step-by-step guide to creating your bots using Bot Framework. Of course, I will add some of my experiences.

What is Bot Framework?

The Bot Framework is a Microsoft tool to create, manage, and deploy chatbots. Chatbots are programs designed to chat with users. These bots can chat with people on websites, apps, Microsoft Teams, and more. The Bot Framework uses Natural Language Processing for the understanding of users. It helps you create engaging and helpful chats with users; this can be done even if you are not a coder.

Things You May Need

Before we dive right in to develop your bot, here are a few things that you will need:

  • Bot Framework Composer: This is an easy-to-use tool that helps you visually design your bot's conversations and integrate with AI services.

  • Azure Subscription: You will deploy your bot and manage it.

  • Basic Understanding of What Your Bot Does: You will want to consider what you want your bot to do. Will it answer frequently asked questions or walk users through a service?

  • A Test Environment: You will need to test your bot in one of the tools, either Bot Framework Emulator or deploy it to a platform like Microsoft Teams.

Step-by-Step Guide

1. Creating Custom Dialogs in Bot Framework Composer

Step 1: Open Bot Framework Composer. Create an Empty Bot.

Step 2: Name your bot and proceed.

Create a Bot Composer

Step 3: In the Greeting trigger, under the Dialog management options, choose "Begin a new dialog" to add a new dialog.

Greeting Dialog in Composer

Step 4: Add a new dialog and introduce questions that shall be used to collect information from the user.

create a new dialog

Step 5: Provide a name and description of the dialog.

dialog details

Step 6: In your dialogue, navigate to the new trigger. Click the "+" sign and pick "Text" from the "Ask a question" options.

Begin Dialog process

Step 7: Type your new question here.

write new questions

Step 8: In the "Property" field of the new "User Input," type the variable name to save the user's response. Example: "user.name."

add user inputs

Step 9: Add a "Number" question type next.

Step 10: Type a question that requires a number as the answer.

Step 11: In the "Property" field of "User Input," provide a name for the number variable. Example: "user.age."

provide name to number variables

Step 12: Add a "Multi-choice" question type.

Step 13: Type the text for your question.

Step 14: Again, enter the variable name in the "Property" field of "User input." Example: "user.gender."

enter name and prompt

Step 15: Scroll down to find the "Array of choices." Add all the answer options the user can pick from.

Array of choices

Step 16: Now, let's send a message back to the user with all the collected info. Click "+" and choose "Send a response."

Send a response

Step 17: You'll find all your variables under the "{x}" list.

find dialog variables

Step 18: Combine the variables to build your message.

Send a response

My Insights

I found developing bots using the Bot Framework quite enjoyable and rewarding. The design of this bot would enable you to realize the needs of your users. Designing it around these needs will take conversation design in your bot. Custom dialogs and features like Adaptive Cards empower the experience from the user side. They make it engaging.

Follow Umesh Pandit

linkedin.com/in/umeshpandit

x.com/umeshpanditax

https://www.linkedin.com/newsletters/umesh-pandit-s-notes-7038805524523483137/

0
Subscribe to my newsletter

Read articles from Umesh Pandit directly inside your inbox. Subscribe to the newsletter, and don't miss out.

Written by

Umesh Pandit
Umesh Pandit

๐Ÿš€ Advisor Solution Architect at DXC Technology | 16+ years of IT Industry Experience ๐Ÿš€ I am a seasoned Advisor Solution Architect at DXC Technology, a premier global digital transformation solutions provider. With over 16 years of rich experience in the IT industry, I specialize in helping organizations translate their strategic business objectives into tangible realities through innovative and scalable solutions leveraging Microsoft technologies. My expertise spans a wide spectrum of Microsoft offerings including Azure, Dynamics 365 for Finance and Operations, AI, Microsoft 365, Security, Deployment, Migration, and Administration. Additionally, I bring valuable experience in SAP, CRM, Power Platform, and other cloud platforms to the table. Throughout my career, I have spearheaded the successful delivery and support of over 300 projects, consistently adhering to the best practices and standards set by Microsoft and the industry at large. Moreover, I take pride in my role as an educator and mentor, having empowered over 50,000 professionals and students worldwide through training, guidance, and knowledge-sharing initiatives. Passionate about staying at the forefront of emerging technologies, I thrive on continuous learning and am dedicated to fostering a culture of knowledge exchange within the tech community. Let's connect and explore opportunities to drive transformative outcomes together!