Skip to content

Import PDF: how it works

Supplier invoices arrive as PDFs, and the warehouse needs the numbers out of them. The import turns a document into data: it recognises the line-item table, matches the lines to products in the shop, and allows the result to be turned into a purchase order or a receipt.

Stockly → Operations → Import PDF.

Struct — a description of how to recognise the table in a given supplier’s document. One struct per invoice format is usually enough. → Structs

Columns — the list of table columns, so it is known where the product number, the quantity and the price sit. → Columns

Mappings — rules for recognising values: regular expressions, priorities and capture groups for the cases where the data is not clean. → Mappings

Import job — one processed document together with its result. → Import jobs

  1. Add the supplier → Suppliers.
  2. Define a struct for them.
  3. Describe the table columns.
  4. Set the mappings that recognise the values.
  5. Upload the first document and check the result.

Once those four things are in place, that supplier’s later invoices process without manual work. → Reading supplier invoices from PDF, which covers the same four screens in order.

Classic — the document goes to Adobe PDF Services, comes back as tables, and the module reads those through the structs and columns defined for that supplier. The format has to be described once, after which it repeats without manual work.

AI analysis — needs the AI extension. Analyze with AI sends the file to a language model, which recognises the lines itself. It copes with documents the classic reader stumbles on, supports any number of pages, and joins lines cut off at a page break.

AI import

Upload PDF file on the import list. The document goes into processing and the progress is shown in place. The result can be compared against an earlier upload of the same document. → Comparing uploads