Introduction
We might have come across many situations in our day to day life where we didn’t realize it, but we must have talked to a bot somewhere in the chatbox which was able to solve our problem without any human interaction involved. If you're still wondering... how about Siri, Cortana or maybe even a Domino’s pizza order which we see on their site and we were able to order our pizza with the help of an automated Bot who was there to take our order and we were able to tell him that we want a Farmhouse or Margherita flavored pizza.
That's where Bots came into the picture which could understand the instructions and react to those instructions. In this series of articles, we will try to develop that type of small bot that can greet us and remember our name. How cool is that.... let’s dive into it, but first, we need to understand the bots and technology which we are going to use.
What is a Bot?
A bot is an application that performs an automated tasks in the form of activities without having a human involved. For example, a chatbot. As I told you earlier, Dominos has its own Bot that runs successfully as a campaign, where we can text a Pizza emoji to a specific number and they will, in turn, deliver us a pizza. What makes it run is the Bot Technology. Another example is Siri in an iPhone, or Cortana for Windows, etc.

As you can see, one bot is responsible to answer automated reply on chat. So, bots could be used for this purpose and we can use AI to make them understand the intentions of a person who is talking to it.
How do Bots Communicate?
Now, let us talk about how exactly bots communicate. We just talked about the bots like what they are and for what purpose they could be used in the market but what do they look like from a software development point? That is the question you might be having. So, to answer this question. Let's just talk about how they communicate.
Well, on one side, we have our customers, or you can say users, and on the other side, we have out bot and in order to communicate with each other, they need something, which is called the channel. Channel is nothing but a medium through which bot communicates with the user. Now, there are lots of channels available in the market like teams, slack, Facebook messenger, etc.
So, when a user talks to Bot over teams or any channel through the keyboard, the channel exposes an API that will send out a message when a user types something in and receive messages in whenever it gets a reply. This allows it to talk to bot and bot also exposes an API, through this API, our bot can receive messages from user funneled through the channel. And in result, sends a message back to the user through that channel. So, API on both sides which is exposed, on channels and on bot makes it easy to understand what they want and what needs to be sent. That is how they communicate with each other.

Bot Evolution
Now there are many ways to build a bot for any purpose which you might have with you over the years, the technologies and methods have changed and evolved. Now in very starting, bot used to be in a very simple form, which you can imagine as text word to number form. This form used to send a keyword to a medium to perform or execute any action. For example, texting a word adds to a coupon service in order to be put on the mailing list, which was based on only one form and it was designed that way to only accept the limited number of keywords.
The main advantage of Bot Framework is that it supports multiple environments by only using a single code base. So, your Bot can be integrated with channels like Facebook, Slack, Teams, etc., and do the task for you. Along with making the data easier to read, it also makes the data going out easier to create with supports for rich attachments. This means that if I want to send an image carousel to Slack, it will be the exact same code as the image carousel I built for Facebook. Finally, the Microsoft Bot Framework can tap into Microsoft's natural language processing framework, which means that creating a bot that can understand natural human language just becomes super simple.
The second was a bit of a complex form in which the often-used custom messaging including things like buttons and hyperlinks but still it was keyword based. Now this one is hardest one compared to other two, now we must account for more than one medium, which means you must be ready to account multiple APIs, one for each medium, plus multiple custom message types because each medium has a different way of accepting data structure when we send it back to them. The only thing which is in common is that it’s still keyword based so our logic is going to be straightforward.
The third and the last one form gets multiple mediums and a natural language as well. But rather than writing everything from the scratch, it is good to use Microsoft Bot Framework. Microsoft Bot Framework is an SDK introduced in 2016, which we can use for all these tasks. Right now, version 4 is there as the latest and they are working continuously to improve this framework.




Join the conversation! Your thoughts help the community grow.