Pre-General Availability: 2024-09-02
Use Case: Update a Set of Invoices
A robot must manually update a set of invoices. Explore how data types, triggers, a foreach loop, and expression syntax support this workflow.
Scenario
A robot completes the following tasks for a set of invoices:
-
Identifies an invoice to update in Oracle Cloud ERP.
-
Finds the invoice.
-
Verifies the supplier name and invoice totals, and then updates the invoice.
Workflow
Requirement | How to meet the requirement |
---|---|
Define the components of invoice data |
Create a data type,
Tip: To learn more about data types and other placeholder values, see Alternatives to Hard Coding Data. |
Define the trigger |
Create an input, Make the trigger a collection so that it can pass in an array of data--in this case, a number of invoices. |
Define places to store invoice amount and supplier name data |
Create the following variables:
|
Define the navigation to the page in the application where you search for invoices |
Using either the recorder or the low-code tools, define the actions that allow the robot to navigate to the area of the application for finding invoices. After you finish defining the actions, the robot looks something like this: |
Create a container for the actions that the robot must perform on every invoice |
Add a foreach loop to the robot. The foreach loop defines how the robot iterates over the invoices. In the foreach loop, use the
Collection field to identify the data
set that the foreach loop iterates on. Insert the input,
The Iteration parameter,
|
Record the invoice number in the activity stream |
Within the foreach loop, create a log action to create an entry in the activity stream for logging the invoice number of every invoice that the robot updates. Knowing the invoice number is helpful if you need to troubleshoot a robot instance. |
Enter the invoice number into the Search field in the application |
Within the foreach loop, use the recorder or
low-code tools to enter the value from the
|
Open the invoice |
Within the foreach loop, define additional required interactions to open an invoice. |
Get the supplier name from an invoice, and save it to a variable |
Within the foreach loop, use the recorder or
low-code tools to get the supplier name from an invoice and save
the value to the |
Get the invoice total from an invoice, and save it to a variable |
Within the foreach loop, use the recorder or low-code tools to collect the invoice total from an invoice. Save the value to the |
Take the appropriate action, depending on whether the company name on the invoice matches the company name in Oracle Cloud ERP |
Within the foreach loop, create a switch condition that performs the following tasks:
|