Running the solution if using folders
- Create the same invoice folder from the user parameter section for invoiceFolderPath and mark it to process emails as Unread.
- To start the process, click the Run button to trigger the flow. When the flow is triggered, all of the documents are read and moved to the invoice folder.
- When the process is triggered, these tasks are performed in the background:
- Verifies whether the configurationFolder exists. If it does not exist, the required directory and sub-directories are automatically created. If the configuration folder exists, this step is skipped.
- Gets access to the email account of the user based on the emailAccount user parameter value, and searches for the specified emailFolder to download all the unread emails and to process it.
- If any documents were moved to the ReProcess folder in the previous run due to technical issues, RPA processes the documents in a ReProcess folder.
- Gets access the documents in the local invoice folder that is specified in the invoiceFolderPath user parameter value.
If any file stays in InProgress, the file moves to the ReProcess folder during the next run.
- RPA reads the email that is linked to the logged-in user.
- RPA processes attachments in PDF, JPEG, JPG, and PNG formats only.
- RPA reads the emails in oldest-to-latest order within the count that is set in the numberOfEmails parameter.
If the count is set to 50, sorting is done out of the top 50 unread emails.
- Downloads the documents from each email and places the attachments in the InProgress folder.
- Marks the email as read and uploads the attachments to IDP.
- IDP extracts the required information.
- Key values at header level:
- Company name
- Bill-to address
- Vendor name
- Remit-to address
- Invoice number
- Purchase order number
- Invoice total amount
- Invoice sub-total amount
- Total tax amount
- Discount
- Add-on charges
- Invoice date
- Ship-to address
- Credit memo reference number
- Service contract ID
- Return number
Note: Bill-to address, Vendor name, Invoice number, Purchase order number, Invoice total amount, and Invoice date are required fields to create a record.
- Key values at line level:
- Item code
- Item description
- Quantity (shipped quantity)
- Unit price
- UOM
- Tax amount (line level)
- Add-on charge description
- Add-on charge amount
Note: Item code, Item description, Quantity, and Unit price are required fields to create a record.
- Key values at header level:
- Save the details in DII once the key value extraction is completed:
- For Match, Service Contract, Match Credit Memo and Service Contract Credit Memo invoices:
- Details tab (Business class = DocumentInterfaceDetail)
- Item (extracted item number should be saved in both Item and Vendor Item fields)
- Vendor item
- Item description
- UOM
- Quantity (shipped quantity)
- Unit price
- Tax amount
- Add-on Charge tab (Business class = DocumentInterfaceAddOnCharge)
- Add-on charge amount
- Add-on charge (code)
- Extracted description
- Details tab (Business class = DocumentInterfaceDetail)
- For Expense and Vendor Return Credit Memo invoices:
- Distributions tab (Business class = DocumentInterfaceDistribution)
- Add-on charge amount
- Add-on charge (code)
- Description
Note: For Expense and Credit Memo invoices, lines do not appear under the Details tab, and Add-on charges are created under the Distributions tab. - Distributions tab (Business class = DocumentInterfaceDistribution)
- For Match, Service Contract, Match Credit Memo and Service Contract Credit Memo invoices: