How to monitor the business activity in your bots
– We are now using a bot to process all our invoices coming by mail.
– That’s great. So now, how long does it take to process these invoices ?
I suppose you already lived that kind of situation where you would like to get some data about your bots. For instance, the time spent working on a specific task (processing invoice, etc.) or the number of time your bots need to access a given resource (how many times does my bot need to connect to S4 ?)
You could try to open every project of bot that is running in production in your organization. But that would be time consuming, you might not be able to find these kind of information which are specific to the runtime (especially for the time spent on a task).
In this article, I’ll discuss about how we can monitor business activity thanks to some features of SAP Intelligent RPA 2.0
What is BAM ?
BAM stands for Business Activity Monitoring. It is a great way to send data from your bot to the Cloud Factory. But sending data is not enough. You need to be able to exploit them, otherwise it is quite pointless.
And the data that are sent to the Cloud Factory by the bot are also available for download using the CSV format. Which is useful as CSV format can be opened in a spreadsheet so you can create custom reports.
Hey ! We already have information about the bot in the Cloud Factory !
You’re right, but this information is only administrative one. That’s to say you’ll only be able to see the number of jobs, the status of the agents which are registered. But you won’t find anything there which is about what your bots are doing.
Here is a quick list of what kind of info you can retrieve using BAM :
- I want to know many times the bot opens the Purchase Order application in S4
- I want to know how many invoices were rejected (i.e. data not correctly extracted, or confidence score too low)
How to use BAM
With SAP Intelligent RPA 2.0, it is quite easy to use some features, as you only have to drag and drop them in your flow. So now, the idea is to determine what activities to use, depending on your needs.
Here is the list of activities that are available :
Measure the time
To measure the time, we use timers.
Thank you, genious. We did not think of that…
You’re right, that was an easy one. But what you need to understand, is that you can have multiple timers in one automation. So, which one to stop when you use the Stop Time activity for instance ?
Have a look at the picture below :
This shows you the list of input parameters for the timer activities. And we have an id parameter, which is mandatory. So you just have to set an id in a Start Timer activity to create a timer. And for all the actions that will be executed, do not forget to specify the id of the impacted timer.
StepName and StepDescription are meant to send additional information to the Cloud Factory about the steps you are measuring. (ex: Login, Start launch page, etc.)
1, 2, 3, …
Now the counters. It is pretty similar to timer, except you decide when to increment it. Counters are useful if you need to get information about how many times you access a resource in your automation, for instance. And as we can have many counters in a single automation, you better set an id as well when you create a counter.
The init value of a counter is 0 by default, but this can be changed. And when the Increment Counter activity is used, you can also change the incremental value as well (default value is 1)
The last sub-group of activities in the Monitoring section is about a single one activity : Notify.
Let’s have a closer look at these 2 parameters :
- message is the text you want to send to the Cloud Factory. It can be static text, or dynamic one. You can send the value of a variable to the Cloud Factory, as long as you make sure it is a string. If you want to send the value of a number, just use .toString()
- The other parameter is the kind of message to send. It can be a simple information, a warning message, or an error.
Collect and exploit the data
At some point, when you consider that enough data were sent to the Cloud Factory, you can collect these data.
In the Factory, go to Monitoring > Export, select Business Activity Data and click Download CSV. You can also specify the date range to reduce the volume of data (i.e. download the data from the last week only)
The data are available with CSV format so you can open it using your favorite spreadsheet. Then, using filters and other features you can create some reports. Among the data that are sent to the Cloud Factory, you’ll find :
- the name of the job
- the name of the machine & the name of the agent
- the name of the timer/counter
- the value of the timer/counter (note: the time is measured in ms)
- the text of the Notify activity
With these data, you should be able to get all the needed info to know everything about your bots and what they do.
Now that we reached the end of this blog post, what did we learn ?
With BAM features, it is possible to create custom reports about the bots running in your organization. These activities are located in the SDK Core module so you do not have to import any specific SDK module to use them.
Last, a video presenting the BAM features will be available very soon on our Youtube channel. Stay tuned !