Automating Inventory management with RPA
On , by
RPA is a technology that has gotten the attention of numerous organizations as a tool to evolve into a technologically advanced organization amongst many. Before we go any further, Let me give you an overview of what RPA is and what it is capable of.
RPA, otherwise known as Robotic Process Automation is a technology wherein you configure a bot to execute manual tasks on its own. It is as simple as that, but this technology holds great potential on its own as well as when it is used hand in hand with other technologies such as Artificial Intelligence or Data Analytics.
In this blog, let’s explore how we can implement Data Analytics and RPA together to build a solution that is both intelligent and cost-effective. For this case study, we chose to take the issue of Inventory management because it contains repetitive rule-based processes and implements a fair share of analytics that is required of agile and effective inventory management. This makes it a feasible use case for RPA.
Inventory management controls the flow of assets, stock, etc. from the manufacturing unit until it’s the point of sale. I think this is better explained with the flowchart below.
For the sake of easy explanation, let’s consider a part of this process (marked in blue), specifically managing the monthly inventory, the ordering process, tracking the order and keeping the concerned authorities informed throughout the whole process.
With the increase in the size of the inventory and the sales, the amount of data that the company collects also increases which provides a great dataset to start our case study with. We have the price data of the commodities for the past 5 years which help us determine the seasonal requirement and the price variations they are subjected to.
Let’s map the price data for one of the commodities for the last 10 years,
Now, that we have an idea about when the prices are an all-time high and when it is low, the optimum time frame to restock the inventory can be determined. In a similar fashion, We can run an analysis on when the turnover ratio is the highest and determine the optimum stock to be maintained.
From this process, we are able to generate a file listing the optimum time frame and the number of units to be ordered to maintain the stock. This will be automatically sent to the concerned official for clearance.
Once the list is cleared by the officer, the RPA process can be triggered to set the ordering process in motion, which in our case is handled by the Robot.
So how does it work?
It works with Orchestrator Schedules and REFramework(RPA Enterprise Framework). The bot is scheduled to run the workflow at the start of every month. The workflow is designed to pull out the current month’s record from an external source. In our case, it is an attachment from the Email sent by the IT team. The robot will order items based on the data analysis performed on the historical data.
We’ll be doing the following:
- We’ll extract the data from the downloaded attachment.
- Log into the Inventory system.
- Add items to the cart.
- Place the Order.
- Logout and close application.
We’ll create a schedule on the Orchestrator which runs the process at 09:00 AM, on the first Monday of the month with the help of cron expression
0 0 9 ? 1/1 MON#1 *.
ReFramework is the UiPath’s Template that has a clearly written structure that is used for building a robust large scale solution that works based on Queue Transactions and has the ability to adapt to any data record. We’ll be replacing Queue Transactions with a Data table where every transaction item will be a data row. We’ll go through all the states of the ReFramework State machine.
Init is the state where all the system initialization takes place which includes opening applications, reading input data (Pulling inventory attachment from email at the start of every month), etc.,
When the process is run, the init state will be executed at first which will invoke two workflows which are GetOrderItemsData.xaml and InitAllApplications.xaml. As a part of good practices, every module should be a different workflow file and should be invoked inside the main workflow. So, the Init will invoke two workflow files other than the workflow files provided by ReFramework itself. The GetOrderItemsData.xaml gets the data (.xlsx File) and populate the data to a datatable. The InitAllApplications.xaml logs into the inventory control system and navigates into the order web page.
The Init sequence
Get Transaction Data
The ReFramework handles the majority of its operation on Get Transaction Data and ProcessTransaction state. The Get Transaction Data will get the Transaction item which in our case is a data row from the data table which we populated. The iteration happens until the last item of the data table between the Get Transaction Data and Process Transaction state and goes to the End Process if there’s no new transaction item. In our case, the TransactionItem is populated with a data row based on a condition.
If the TransactionItem is populated with Nothing, it will move to the end process state.
The process is like the heart of the workflow. It is the place where the main part of the business use case takes place. In our scenario, it adds the order items to the cart of the inventory system and places the order once all the items of the data table are added to the cart. This sequence contains click and set text events.
The End Process state is the final state of ReFramework where it handles logging out and closing of applications. This state will be invoked either when there are no transaction data to be processed or there occurs a System Error in the workflow.
This is how we build the robot to handle the purchase procedure.
But of course, the functionalities of this robot can be extended to confirming the order from the vendor’s side, handling the purchase invoice, sending the notification to the purchase department and the finance department, tracking the progress of the order and updating the status in real-time.
Here is the demo video of RPA Inventory use case: