BP3 GLOBAL-SERVICE

UI Path Invoicing Walkthrough

 

Our Solutions Engineer Gordon Siegfriedt takes you through building an RPA bot for invoices using UI Path.

 



Gordon Siegfried:
Hi, my name is Gordon Siegfried, and I'm a solutions engineer at BP3. Today, I want to give you a brief look at one of my favorite RPA tools, UiPath. In this scenario, I'm going to cover, our company receives invoices in a CSV file, which a person has to manually enter one by one into our online invoicing system. Today, I'll show you how to build a bot in UiPath to handle this work automatically. Let's start by opening the UiPath studio and creating a blank project. So here we have a main flow in the middle. And on the left side, we have a list of a variety of activities that are available to us for building out our workflow. In this case, we will have access to integrations for Excel, for PDFs, for interacting with webpages, for interacting with native Windows applications, along with a variety of other activities.


Additionally, we can click on this manage packages button to search for additional packages of activities that are available either directly from UiPath or through the UiPath community. So there's a lot out there that you can use for accelerators for getting your work done more quickly. So what I'll do in this case is I first need to open a browser window so that we can start teaching our bot how to interact with our online invoicing system. So I'll type in browser to filter down my activities and pulling the open browser activity here. And all I need to do is paste in the URL I want to navigate to. On the right side, I do have a number of properties that I can modify. So in this case I prefer Chrome. So I'll just change my browser type to Chrome and let's save our workflow here and test it. So I'll press run and it's a very simple bot at this moment, but you can see that Chrome did open and it navigated to the URL that I specified.


So the next thing I'd like to do is use the UiPath recorder to teach the bot how to log into my invoicing application. So I'll choose the web recorder. And the nice thing here is we're going to very explicitly let the recorder know what we want to do, step-by-step. So, what I'll first do is click the type button over here, choose the element where I want to be typing, and then I'll type in the values and press enter. Then the recorder will type those values for me. Same thing for my password. Keep in mind, this is in plain text right now, but in the real scenario, you'll replace that with a variable that refers to your credential manager on the UiPath orchestrator. Last thing I'll need to do is click the click button here and just click on the login button and we'll see the bot logs into our invoice system.


So let's click save and exit and review the steps that were recorded by our recorder. So you can see here, we've got a recording sequence and really it recorded three steps. We entered our email address. We entered our password and we clicked the login button. For all three of these, if we wanted to, we could kind of dig a bit deeper and take a look at the target. This will let us take a closer look at what the recorder actually captured. So, if I look at my selector right here, we can see that we're looking for a web control on the page with ID of password, and it has to be an input control. So I could come in here and use the UiExplorer component in UiPath to modify those selectors and make them more or less specific so that they'll work for all the scenarios that I need them to work for.


In this case, I think that should be sufficient for what we have here. One thing I'd like to point out is that for this recording sequence that we just created, we can right click on it. Click on extract as workflow, and we can now move this into its own workflow. So we'll call this log into Invoicely. And you'll see now that we have a new tab in our designer, which shows a workflow that strictly shows the steps we just recorded for logging into Invoicely. So we would be able to now use this sub-workflow in any other workflow that we want. And if any changes are needed, those changes will be propagated to every place where we're logging into Invoicely. Back in the main workflow, everything's nice and clean now. We have a two step process, we'll open browser and log into Invoicely, which invokes that workflow that we just created.


So just to test all of this, let's open our browser and log out so we can make sure that the bot works. So I'll click the run button here and UiPath will open a new browser window and log into Invoicely. All of that happened pretty quickly, but if we go back to the browser, you can see that we're all logged in to the dashboard page like we expected. All right, so the next thing we need to do is teach our bot how to create a new invoice. So once again, we'll open up the web recorder and this time we will click on add new and click on invoice. Looks good. Next thing I'll need to do is click the type button and will enter an invoice number. We'll type in one, two, three there. Next thing we'll need to do is click on the new client button and specify this client is an organization. And then we'll type in a dummy organization name, which again, we'll replace later with information from our spreadsheet. And we'll click on the saving of return button.


If we wanted to be really thorough, we could enter the date and purchase order number here as well. For the sake of time, I'm just going to skip to the essentials, which are the item description, the item quantity and the rate. All right. And then I will use the click command to click save, and then click the save sub-menu as well. And that should do it for creating a new invoice. So I'll click save and exit. And once again, we can review our recording sequence right here. Everything looks good to me. The one thing that I do want to modify is I want to add a navigate control to the end here. Because I know that in order to loop through and create multiple invoices, I will need to have the new invoice button available. So I'm just going to navigate back to the dashboard here, and we're going to have our bot do that at the end. So we'll just navigate back to our dashboard page.


All right, so that looks promising. Let's go ahead and test to make sure that is working properly. So the first thing I'd like to do is clear out our invoices so that we know we've got a clean slate. And we'll log out of Invoicely. And so I'd just like to click run here and confirm that our bot is logging into Invoicely and creating one new invoice. So, it's all happening pretty quickly, but we've gotten to the new invoice page, we're entering a new client name. And so everything just completed successfully. Let's go and review what we just created. So, if we go back to our invoices page which was previously empty, we have a new invoice with invoice number one, two, three. It's being billed to org name, description is description, quantity four, rate 10. So all of that matches those hard coded values we put in there.


The next thing we need to do is integrate with our spreadsheet. So, what I need to do now is type in CSV to filter my activities and this time we will be reading from CSV. So right above our recording sequence, I'd like to read from CSV and I'll specify a file on my desktop, Invoices to Process. Now that we've specified a file to read from, we need to store the results in a data table variable in UiPath, we'll call that csvData. And the next thing we need to do is loop through each row in that CSV data. So if I type in for each in my activities filter, I can find my for each row command for data tables. And this allows me to loop through every row of that CSV file. So this will be for each row in my CSV data that we just pulled in. And now I can just pull my recording sequence directly into the body of my loop. And this will allow us to create a new invoice in our online invoicing system for every row in the spreadsheet.


Before I do that, I would like to replace my hard coded values with values from the spreadsheet. So from each row of that spreadsheet. So instead of one, two, three for my invoice number, I need to replace this with a column from my row. So in order to do that, I'd like to take a look at my CSV file. The invoice number is coming from the first column, but it's zero indexed. So I'll be putting in row, column, zero and that'll be a string. So, that'll be our invoice number. The next input will be the organization name. So that one will be zero, one, two. So column index two. Moving ahead, we'll go to the description, which is two, three, four. And then the quantity and unit price will be five and six. So I'll quickly do that.


All right. So that looks good. And then finally, just to clean things up, I would like to extract my previous recording sequence into a workflow as well. So let's extract that as Create Invoice in Invoicely. So again, we're creating a new workflow that could be used elsewhere. And because we were using variables in here, UiPath automatically created an argument here where it's expecting a row. And then it'll take that row data and put it directly into our new sub-workflow that we created. Meanwhile, at the top level, we've got a nice clean workflow. We open the browser, we log into Invoicely, we read our CSV file and then for each row in that csvData, we will create an invoice. There is one last thing we need to do here. Now that we have a subflow that's expecting a row, we need to pass our row in as an argument. So we'll just enter our row here as our value.


And now we should be able to save this and run it and verify that the bot loops through and creates all the invoices that we need. So the bot is logging into Invoicely. It's creating a new invoice. This one's for Alpha Associates. Everything's going to move pretty quickly here, but we'll review it at the end. So now we're onto the second invoice for Bravo Business Services. There are four rows in the spreadsheet, so we're expecting four new invoices. Here we're going through the fourth one for Delta Designers and the bot is complete. Now, if we go back to the browser, you can see in our recent activity, 21 seconds ago, we created a new invoice for Alpha Associates, 14 seconds ago for Bravo Business Services. Seven seconds ago, there was a new invoice created for Charlie Corporation and just now is an invoice for Delta Designers.


So if we just take a look at one of these, let's click on Charlie, here we can see the invoice number ends in three, three, three, three. This is for Charlie Corporation and they ordered 1000 candles at 75 cents a piece. Just to verify, you can see the same information in the spreadsheet here. Invoice number ends in three, three, three, three. This is for Charlie Corporation and they ordered 1000 candles at 75 cents each. So if we were to go through and verify all four of those, we could. Here's a listing of them, but it looks like our bot worked. So hopefully this gives you a good idea of what the experience is like building a bot with UiPath. If you have any questions, feel free to reach out to us. We are at bp-3.com and my email is gordon@bp-3.com. Thanks for your time.
Hi, my name is Gordon Siegfried, and I'm a solutions engineer at BP3. Today, I want to give you a brief look at one of my favorite RPA tools, UiPath. In this scenario, I'm going to cover, our company receives invoices in a CSV file, which a person has to manually enter one by one into our online invoicing system. Today, I'll show you how to build a bot in UiPath to handle this work automatically. Let's start by opening the UiPath studio and creating a blank project. So here we have a main flow in the middle. And on the left side, we have a list of a variety of activities that are available to us for building out our workflow. In this case, we will have access to integrations for Excel, for PDFs, for interacting with webpages, for interacting with native Windows applications, along with a variety of other activities.


Additionally, we can click on this manage packages button to search for additional packages of activities that are available either directly from UiPath or through the UiPath community. So there's a lot out there that you can use for accelerators for getting your work done more quickly. So what I'll do in this case is I first need to open a browser window so that we can start teaching our bot how to interact with our online invoicing system. So I'll type in browser to filter down my activities and pulling the open browser activity here. And all I need to do is paste in the URL I want to navigate to. On the right side, I do have a number of properties that I can modify. So in this case I prefer Chrome. So I'll just change my browser type to Chrome and let's save our workflow here and test it. So I'll press run and it's a very simple bot at this moment, but you can see that Chrome did open and it navigated to the URL that I specified.


So the next thing I'd like to do is use the UiPath recorder to teach the bot how to log into my invoicing application. So I'll choose the web recorder. And the nice thing here is we're going to very explicitly let the recorder know what we want to do, step-by-step. So, what I'll first do is click the type button over here, choose the element where I want to be typing, and then I'll type in the values and press enter. Then the recorder will type those values for me. Same thing for my password. Keep in mind, this is in plain text right now, but in the real scenario, you'll replace that with a variable that refers to your credential manager on the UiPath orchestrator. Last thing I'll need to do is click the click button here and just click on the login button and we'll see the bot logs into our invoice system.


So let's click save and exit and review the steps that were recorded by our recorder. So you can see here, we've got a recording sequence and really it recorded three steps. We entered our email address. We entered our password and we clicked the login button. For all three of these, if we wanted to, we could kind of dig a bit deeper and take a look at the target. This will let us take a closer look at what the recorder actually captured. So, if I look at my selector right here, we can see that we're looking for a web control on the page with ID of password, and it has to be an input control. So I could come in here and use the UiExplorer component in UiPath to modify those selectors and make them more or less specific so that they'll work for all the scenarios that I need them to work for.


In this case, I think that should be sufficient for what we have here. One thing I'd like to point out is that for this recording sequence that we just created, we can right click on it. Click on extract as workflow, and we can now move this into its own workflow. So we'll call this log into Invoicely. And you'll see now that we have a new tab in our designer, which shows a workflow that strictly shows the steps we just recorded for logging into Invoicely. So we would be able to now use this sub-workflow in any other workflow that we want. And if any changes are needed, those changes will be propagated to every place where we're logging into Invoicely. Back in the main workflow, everything's nice and clean now. We have a two step process, we'll open browser and log into Invoicely, which invokes that workflow that we just created.


So just to test all of this, let's open our browser and log out so we can make sure that the bot works. So I'll click the run button here and UiPath will open a new browser window and log into Invoicely. All of that happened pretty quickly, but if we go back to the browser, you can see that we're all logged in to the dashboard page like we expected. All right, so the next thing we need to do is teach our bot how to create a new invoice. So once again, we'll open up the web recorder and this time we will click on add new and click on invoice. Looks good. Next thing I'll need to do is click the type button and will enter an invoice number. We'll type in one, two, three there. Next thing we'll need to do is click on the new client button and specify this client is an organization. And then we'll type in a dummy organization name, which again, we'll replace later with information from our spreadsheet. And we'll click on the saving of return button.


If we wanted to be really thorough, we could enter the date and purchase order number here as well. For the sake of time, I'm just going to skip to the essentials, which are the item description, the item quantity and the rate. All right. And then I will use the click command to click save, and then click the save sub-menu as well. And that should do it for creating a new invoice. So I'll click save and exit. And once again, we can review our recording sequence right here. Everything looks good to me. The one thing that I do want to modify is I want to add a navigate control to the end here. Because I know that in order to loop through and create multiple invoices, I will need to have the new invoice button available. So I'm just going to navigate back to the dashboard here, and we're going to have our bot do that at the end. So we'll just navigate back to our dashboard page.


All right, so that looks promising. Let's go ahead and test to make sure that is working properly. So the first thing I'd like to do is clear out our invoices so that we know we've got a clean slate. And we'll log out of Invoicely. And so I'd just like to click run here and confirm that our bot is logging into Invoicely and creating one new invoice. So, it's all happening pretty quickly, but we've gotten to the new invoice page, we're entering a new client name. And so everything just completed successfully. Let's go and review what we just created. So, if we go back to our invoices page which was previously empty, we have a new invoice with invoice number one, two, three. It's being billed to org name, description is description, quantity four, rate 10. So all of that matches those hard coded values we put in there.


The next thing we need to do is integrate with our spreadsheet. So, what I need to do now is type in CSV to filter my activities and this time we will be reading from CSV. So right above our recording sequence, I'd like to read from CSV and I'll specify a file on my desktop, Invoices to Process. Now that we've specified a file to read from, we need to store the results in a data table variable in UiPath, we'll call that csvData. And the next thing we need to do is loop through each row in that CSV data. So if I type in for each in my activities filter, I can find my for each row command for data tables. And this allows me to loop through every row of that CSV file. So this will be for each row in my CSV data that we just pulled in. And now I can just pull my recording sequence directly into the body of my loop. And this will allow us to create a new invoice in our online invoicing system for every row in the spreadsheet.


Before I do that, I would like to replace my hard coded values with values from the spreadsheet. So from each row of that spreadsheet. So instead of one, two, three for my invoice number, I need to replace this with a column from my row. So in order to do that, I'd like to take a look at my CSV file. The invoice number is coming from the first column, but it's zero indexed. So I'll be putting in row, column, zero and that'll be a string. So, that'll be our invoice number. The next input will be the organization name. So that one will be zero, one, two. So column index two. Moving ahead, we'll go to the description, which is two, three, four. And then the quantity and unit price will be five and six. So I'll quickly do that.


All right. So that looks good. And then finally, just to clean things up, I would like to extract my previous recording sequence into a workflow as well. So let's extract that as Create Invoice in Invoicely. So again, we're creating a new workflow that could be used elsewhere. And because we were using variables in here, UiPath automatically created an argument here where it's expecting a row. And then it'll take that row data and put it directly into our new sub-workflow that we created. Meanwhile, at the top level, we've got a nice clean workflow. We open the browser, we log into Invoicely, we read our CSV file and then for each row in that csvData, we will create an invoice. There is one last thing we need to do here. Now that we have a subflow that's expecting a row, we need to pass our row in as an argument. So we'll just enter our row here as our value.


And now we should be able to save this and run it and verify that the bot loops through and creates all the invoices that we need. So the bot is logging into Invoicely. It's creating a new invoice. This one's for Alpha Associates. Everything's going to move pretty quickly here, but we'll review it at the end. So now we're onto the second invoice for Bravo Business Services. There are four rows in the spreadsheet, so we're expecting four new invoices. Here we're going through the fourth one for Delta Designers and the bot is complete. Now, if we go back to the browser, you can see in our recent activity, 21 seconds ago, we created a new invoice for Alpha Associates, 14 seconds ago for Bravo Business Services. Seven seconds ago, there was a new invoice created for Charlie Corporation and just now is an invoice for Delta Designers.


So if we just take a look at one of these, let's click on Charlie, here we can see the invoice number ends in three, three, three, three. This is for Charlie Corporation and they ordered 1000 candles at 75 cents a piece. Just to verify, you can see the same information in the spreadsheet here. Invoice number ends in three, three, three, three. This is for Charlie Corporation and they ordered 1000 candles at 75 cents each. So if we were to go through and verify all four of those, we could. Here's a listing of them, but it looks like our bot worked. So hopefully this gives you a good idea of what the experience is like building a bot with UiPath. If you have any questions, feel free to reach out to us. We are at bp-3.com and my email is gordon@bp-3.com. Thanks for your time.