Working with invoices

This article describes how to work with invoices within RPA processes.

Help CentreForms & Data

This article describes how to work with invoices within RPA processes.

Description

When dealing with unstructured data, such as invoices, it becomes increasingly difficult to know exactly which fields each different invoice contains, and therefore impossible to create a process that will cater for all variances of invoices.

With the complexity in mind, the INVOICE class will handle all of the complexity for you, and allow you to focus on processing invoices easily.

Invoices in PDFs, Excel documents, Word documents and images (.jpeg, .jpg, .gif, .png) are supported.


Setting it up

{{popup:rpas/add:action=extract-invoice}}

File path - required string: The path for the file. If as part of a loop, the path might be stored as {path}. Read the article abc

Variable - required string: Where the invoice will be stored once processed. If you enter "invoice" as an example, then you can access the fields of the invoice as "{invoice::general::date}".

Company - required string: The company the invoices will be addressed to. This is important, as this will determine the "to" and "from" companies. If the company is matched, then this company name will be the same as found in the "to" field.

Currency - optional option: If all invoices are in the same currency, then select the applicable currency. If you have to cater to multi-currency invoices, then keep this blank.

Language - optional option: If all invoices are in the same language, then select the applicable language. If you have to cater to multi-lingual invoices, then keep this blank.

Minimum PO number - optional string: If you expect invoices to have your Purchase Order number on them, then enter the starting range for the Purchase Order numbers here, i.e. INV400000001.

Maximum PO number - optional string: If you expect invoices to have your Purchase Order number on them, then enter the ending range for the Purchase Order numbers here, i.e. INV400999999.

Cache - required option: Caching an invoice helps speed up operations when dealing with the same invoice in multiple steps, or across processes. The default value is "Only if valid".

Additional fields - optional: If you wish to add fields to the invoice. you may list them here. Adding a field can be done adding "general::terms", which will be accessible later as "{invoice::general::terms}", if you used "invoice" as your variable name. Also specify the expected data type per field to help the bot format the data correctly.


Structure

The structure in which you can access properties of an invoice, is as follow:

{
  "tax invoice": boolean,
  "general": {
    "number": "..",
    "reference": "..",
    "date": "yyyy-mm-dd",
    "po number": ".."
  },
  "companies": [
    "..", ".."
  ],
  "total companies": #,
   "from": "..",
  "to": "..",
  "line items": [{
    "code": "..",
    "description": "..",
    "quantity": #,
    "before tax": #,
    "discount": #,
    "tax": #,
    "after tax": #,
    "tax percentage": #,
    "valid": boolean,
    "taxable": boolean
  }, {...}, {...}],
  "total line items": #,
  "total taxable line items": #,
  "total non taxable line items": #,
  "total": {
    "before tax": #,
    "discount": #,
    "surcharge": #,
    "tax": #,
    "tax percentage": #,
    "after tax": #,
    "valid": boolean
  },
  "banking details": {
    "account name": "..",
    "bank name": "..",
    "account number": "..",
    "branch code": ".."
  },
  "currency": {
    "code": "..",
    "name": "..",
    "symbol": "..",
    "tax": #
  },
  "file": {
    "name": "..",
    "date": "yyyy-mm-dd",
    "datetime": "yyyy-mm-dd HHhmm",
    "extension": "..",
    "folder": "..",
    "in use": boolean,
    "password protected": boolean,
    "path": "..",
    "size": #,
    "timestamp": #
  },
  "valid": boolean,
  "errors": []
}

See it working on your own data

Everything documented here ships with the platform – try the document tools free, or go live in 7 days.