- Microsoft office 365 chatbot
- How to Create a QnA Bot in Azure
What is a Chatbot
A chatbot is like an automated process that can interact with the user without direct human intervention. We can call a robot.
The bot can answer you all question which will take from the database and it will gather user information as well.
A bot interaction can be a quick question and answer, or it can be a sophisticated conversation that intelligently provides access to services.
Users can converse with a bot using text, interactive cards, and speech. We can also use API to get data and store data.
We can develop the bot feature in many ways. Microsoft also provides Azure bot service to integrate this feature with our application.
We can also use SignalR, it is a library that needs to include in our solution to simplifies the process.
We can also simply use Database or API to store and retrieve the information with full customization.
Step 1: Log in to the SharePoint Online site – > Create a web part page – > Add a Script Editor Web part.
Step 2: Please look into the below screenshot. This design will appear on your site once you paste the below code inside the Script Editor Web part.
Step 3: Once you run this application, the computer will ask you some question and you have to answer. Please look into the screenshot.
Next, if you click on Enter, It will say you, hello and after some time it will ask you next question like the below screenshot.
You can add more questions to communicate with the user. So here I have just added all questions in the code and I am not using and API or Database to store or retrieve information.
Where we can store Chatbot Question and Answers
Step 1: We can simply create a list in SharePoint and add all questions into that list.
Step 2: All question should have unique ID which can identify easily .
Step 3: We will create one more SharePoint list which will store all responses to the question.
Step 4: Next, When users log in to the site we will store the user unique identity in the list.
Step 5: Next we will write a script which will ask all questions one by one and it will manage based on the condition which will give based on the requirement.
Step 6: Next we will apply the same logic which applied in the above script.
Here I used enter to go next question but we can simplify it and we will include the SetTimeOut function to ask all questions one by one after getting the response for the previous question.
You may like following SharePoint tutorials:
The above steps, I will implement in my next blog. This is the just a fundamental of Chatbot.
Rajkiran is currently working as a SharePoint Consultant in India . Rajkiran having 7+ years of experience in Microsoft Technologies such as SharePoint 2019/2016/2013/2010, MOSS 2007,WSS 3.0, Migration, Asp.Net, C#.Net, Sql Server, Ajax, jQuery etc.He is C#Corner MVP (2 Times).