27 May 2021

How We Created the Finance Chatbot for UiPath HyperHack

27 May 2021

How We Created the Finance Chatbot for UiPath HyperHack

SEE ALL THE ARTICLES

 

Finance Chatbot is a virtual assistant project dedicated to finance department employees, which verifies the status of the value-added tax (VAT) number and also calculates rates. Finance Chatbot is an example of using a UiPath unattended robot and Druid chatbot. We have tried to prepare a project that will be scalable, meaning we can easily add new functions to the chatbot and increase its usability without rebuilding the entire bot.

 

The project uses the integration of UiPath with the Druid platform. The UiPath Robot will perform chatbot and all work such as checking VAT numbers and calculating rates.

 

Finance Chatbot helps employees in their daily work by doing some of the work for them and delivering responses in a short time. When Finance Chatbot checks VAT numbers or calculates rates, employees can take on another task at the same time.

 

Project description

 

HyperHack UiPath – Finance Chatbot13

 

User authentication

This step is very important because it allows us to limit the availability of the Chatbot. It means that only users with access specified by their User ID can use Finance Chatbot.

 

HyperHack UiPath – Finance Chatbot2

 

Case one: check VAT number

This case allows the user to verify the status of the VAT number.

 

First, the user has to provide a tax number to check. Then, Chatbot verifies the format of the provided number. If the format is correct, it sends a request to the UiPath Orchestrator and creates a new Queue Item. Otherwise, it sends the information that the provided tax number has an incorrect format and asks for the correct number. After creating a new Queue Item, the robot is automatically turned on and, based on the data from the Queue Item, checks the correctness of the tax number on the VAT Information Exchange System (VIES) page. Then the Robot sends the response to the Chatbot, which finally sends the result to the user.

 

HyperHack UiPath – Finance Chatbot1-1

 

Case two: calculate rates

This case allows users to calculate rates for the previously entered tax number but only when the tax number is valid.

 

Like the first case, the user decides if he wants to calculate rates by communicating with Chatbot. If the previously entered number was valid, Chatbot asks the user for which approval group to calculate rates and then sends information to the Orchestrator creating a new Queue Item. After that, the robot is also automatically turned on, does some work, and sends the response to the Chatbot, which finally sends the result of the robot's work to the user.

 

HyperHack UiPath – Finance Chatbot4

 

Finance Chatbot shows how to easily and quickly create a solution that is a combination of two tools—UiPath and Druid—which is scalable and user friendly.

 

OK, so how to do it?

 

Druid platform

First, we created an account on the Druid platform. It is possible to do it with this link: www.druidai.com. After registering, you will get access to the website where you will be able to create your chatbot.

 

Flows

After login, on the main page, you will find a few tabs. I think the most important is the Flows, where you create paths for the robot to follow. Depending on what your chatbot should do, you can choose from various types of actions here. Send a message for the user, ask and get data from the user and assign the value to the variable, trigger another flow, or activate the Connector to send a request to UiPath Orchestrator, for example.

 

HyperHack UiPath – Finance Chatbot3

 

Entities

This field is where you define variables for the process. Druid provides many types of variables in the chatbot. To use a variable across the whole process, define it as a global variable.

 

HyperHack UiPath – Finance Chatbot6

 

Or you can also define it locally directly from the Flows section.

 

HyperHack UiPath – Finance Chatbot5

 

Apps

Here, you create the Connector mentioned earlier. In our case, it has already implemented UiPath Connector, which makes that process much easier.

 

HyperHack UiPath – Finance Chatbot8

 

All you need to do is just to fill all fields with Orchestrator data, like API Key, Client ID, and so on. All the information you will find on your Orchestrator cloud site. You can also connect with on-premises Orchestrator.

 

HyperHack UiPath – Finance Chatbot7

 

Integrations

Integration is the place where you create the specific action for the Connector. For example, AddItemToUiPathQueue which is, again, an already implemented activity. Suggestions based on your Orchestrator data will be available when Druid is already connected with Orchestrator in General Settings such as QueueName, RobotName, and ProcessName.

 

HyperHack UiPath – Finance Chatbot11

 

Also, you define which variable you want to send in the request. For example, if you want to take a VAT ID number from the user and send it to UiPath Robot for further processing, you need to pass it here as a variable and it will attach to JSON, which will send it to UiPath in the QueueItem just created.

 

HyperHack UiPath – Finance Chatbot9

 

HyperHack UiPath – Finance Chatbot10

 

UiPath Studio

From there, a new QueueItem is waiting to process all data from the user and we can go to UiPath Studio to receive it. They are available in TransactionItem.SpecificContent(""). Next, you need to download Druid.UiPath.Activities Package, where you will find “Trigger conversation” activity. There in the properties, you will find a few fields, among others, “DruidData” where you attach response JSON for the chatbot, “Flow Id” which is conversation id so the Robot knows to which conversation send response.

 

HyperHack UiPath – Finance Chatbot12

 

The chatbot receives the response.

 

For more information about connecting chatbots via UiPath, check out the UiPath chatbots support documentation.

 

register uipath devcon 2021

 

Kamil Misko is a Robotic Process Automation Developer/Automation Specialist at Office Samurai.


by Kamil Misko

TOPICS: Finance, RPA Hackathon, chatbot automation

Show sidebar