Virtual assistants. Creating chatbots without programming

Hello everyone! Today I would like to talk about one of the trends in our lives, namely, about the so-called virtual assistants or chat bots. It's no secret that at present chat bots have quite successfully entered our lives, and we are increasingly using the capabilities of these services. Almost every site has pop-up windows with scripted steps that lead the client to the final stage of the dialogue. Cellular operators are increasingly using chatbot services to answer frequently asked questions of users (how much money is in my account, what is my tariff, how to connect roaming and so on), thereby relieving the burden of real employees who are forced to answer a million times a day to the same questions. Cinemas, taxis, airlines,everyone uses chat bots to save resources and automate standard information and service steps. And absolutely also chat bots are used inside the corporate culture of various companies to automate a number of internal business processes. For example, it is much easier to apply for a vacation or business trip by simply opening a nearby chat with the bot and writing him the keywords to start the dialogue. During the dialogue, the bot will clarify the information necessary for creating the application, after which it will send all the collected data to the required service, where various processes for calculating deadlines, assigning tasks and notifications for responsible persons will already be carried out “under the hood”. And if earlier setting up such features was the prerogative of developers only, then, relatively recently, various services began to appear,which allow you to configure the logic of chat bots without programming. Today, in this article, I would like to show how you can automate the filing of a vacation application using the Virtual Agents service, which is part of the Microsoft Power Platform product line.
So let's get started.



First of all, what is the Power Virtual Agents service? Power Virtual Agents is a cloud-based service for automating the logic of chatbot dialogs without programming.
This service is closely integrated with most cloud services from Microsoft, which makes it easy to build your ecosystem from solutions based on Microsoft cloud products. Well, now, let's set up our bot. First of all, we need to create a new dialogue. We click on “New Topic”:



go to the screen for creating a new dialogue, indicate the name of the dialogue, and also throw trigger phrases that will be regarded by the bot as starting points for starting this dialogue, and then proceed to editing the dialog logic:



After the transition, the dialog settings page opens. This screen visually resembles various workflow editors, so it will not be difficult to get used to it. In the course of setting up the dialogue, as in the workflow editors familiar to us, it is necessary to specify the actions that will be performed by the chat bot. Actions are performed one after another sequentially:



To configure the dialogue, the actions of publishing a message to the chat, conditions, branches, transitions to other dialogs can be used. The editor also allows you to ask questions to the user and wait for an answer to them. The response from the user will be saved in a variable, which can later be used to check conditions or transfer data to other services. We’ll set up a small dialog during which we’ll clarify the type of vacation the user has:



Next, we specify the start date and end date of the vacation:



Be sure to ask if an additional approver is required, except for the main manager. If an additional coordinator is required, then we will clarify exactly who: The





user can also indicate comments on the application, if he wishes. Next, we clarify whether everything was entered correctly and if so, then we send the application to work, and if not, then we complete the dialogue with the request to enter all the data again:



The basic logic of the dialogue is done. But how can we now transfer the information from the dialogue somewhere further, plus start the approval process? To do this, you can call the Power Automate (Flow) stream directly from the dialog and pass the necessary parameters from the dialog variables to it:



Now we make a simple Power Automate stream, which picks up the values ​​from the dialog variables, creates an item in the SharePoint Online list and starts the approval by request. It will look like this:



So, now we have a dialogue in the bot and a process on the side of Power Automate, which picks up the data from the dialogue and transfers it further to SharePoint. Let's check how it works.

First you need to publish the bot. To do this, on the bot’s settings page, go to the Publish section and publish the latest changes:



Now let's share the bot for the members of the Microsoft Teams team. To do this, go to the Customize Channels section and select the appropriate channel for publication. I selected the channel Demo Web Site. Copy the address of the demo site to the clipboard and connect it to the Teams team on a separate tab:



Check the bot in Teams. Open the tab in the Teams team:



At the end of the dialogue, a request was created in SharePoint Online and the approval process was launched.

As you may have noticed, creating a chatbot through the Power Virtual Agents service is more like working in a constructor, where you assemble a solution from ready-made blocks to your liking. The setup is not very complex, and close interaction with adjacent cloud services from Microsoft allows you to transfer information along the chain to the desired destination. In the following articles, we will look at even more features of chatbot creation services, make a consultant bot and figure out how to connect the bot to Microsoft Teams as a separate application. Thank you for your attention and have a nice day!

All Articles