Introduction
In this article, I am going to demonstrate how to create and deploy the proactive bot using Microsoft Azure Bot Services.
Prerequisities
Microsoft Azure Subscription. If you don't have a subscription, go to this link for
Free Trial.What is Proactive Bot?
A Proactive bot is a bot which sends the messages to the user proactively, i.e., without user interaction for information, such as - Alarm Bot. To achieve this functionality, Bot Framework uses proactive messages. It's like trigger functions. The trigger is executed after some actions take place.
Follow these steps to create the Proactive Bot
Sign into your Azure account on portal.
Press NEW(+) in the Menu Blade, navigate to Data+Analytics, and select Bot Service (Preview).
And then, it opens the Bot Service (Preview) Blade. In that, enter the details and select "Pin to Dashboard". Then, press " Create " to create the Bot.
The successful deployment is shown in the Notification Blade and our farm bot is successfully created. When we navigate to our Bot in the DashBoard, it shows that our Bot is successfully deployed.
The next step is to configure our bot.
Follow these steps to configure the bot
After the deployment succeeds, it opens a new tab in the browser to create App ID and password for our Bot. Click "Create Microsoft App ID and Password ".
Then, it generates the App ID. Now, press "Generate an app password to continue".
After it's pressed, it shows the password. Copy that on the clipboard and click "OK".
Then, hit the "Finish and go back to Bot Framework" option. This will take you back to the Form Bot in the Azure portal.
Now, paste your password in the Bot Framework and choose your language.
I have selected "C#" here.
Scroll down and choose the Bot Template. Then, choose the "Proactive" template for your Bot.
Agree to the terms and conditions and then click "Create bot".
It opens the workspace for the proactive bot on the left side; it shows the files that are included in our bot. Press "Test" on the right corner to test our form bot.
The basic work of the Proactive bot is to ask for the required information. If there is no match to the required keyword to invoke the trigger, the Bot remains inactive. But when the desired work is given as input, it executes the trigger.
Summary
By using this Azure Bot Service , we can use many automatic bot frameworks in our websites. I hope you understood how to create and deploy the Proactive Bot using Azure Bot Services; and also, we may configure our bot with our requirements.
The only limitation is your imagination and lack of knowledge to create the triggers to invoke the various functions or jobs that are done by the bots.