Skip to content

Reading supplier invoices from PDF

The import converts a supplier invoice delivered as a PDF file into data the warehouse can work with: 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.

The configuration is carried out in a fixed order, because each screen describes the object created on the preceding one and remains empty until that object exists.

A real invoice from the supplier being set up is required. The whole configuration is a description of one document format and cannot be prepared from memory.

The products have to be matchable. Lines are matched by supplier number, EAN or product number, so at least one of these has to exist on your side. → Suppliers

All remaining configuration is attached to the supplier: a struct belongs to a supplier, and so does everything below it. → Suppliers

Stockly → Operations → Import PDF → the supplier → Structs. A struct describes the line-item table on that supplier’s document, and one struct per invoice format is usually sufficient.

The empty state reports this directly: as long as the supplier has no struct, the next screen has nothing to describe. → Structs

Once a struct exists, Columns is no longer empty. Each column defines which part of the line it contains, such as the quantity, the price or the article number, so that the reader can interpret the table. → Columns

Mappings convert what the document contains into the terms used by the shop. A struct requires at least one Identifier or Supplier identifier together with a Stock mapping: without an identifier the product cannot be determined, and without a quantity there is nothing to import.

Three of the mapping types operate on the whole row rather than on a single column. They mark the start of a page, a repeated header row and the beginning of a line item, which is what makes multi-page documents readable. → Mappings

Stockly → Settings → Import → tab Adobe APISplit mode. Before the analysis begins, the document is divided into individual pages and each page is analysed separately. Internal by FPDI performs that division inside the shop and spares the credits of the Adobe account; External by Adobe leaves it to the service. Internal splitting can fail on an unusual layout or an unusual compression, in which case the file is forwarded to the Adobe service so that the analysis continues.

Upload that invoice. The reader finds the table, the lines carry the correct quantities and prices, and matched lines show which product they were assigned to. From there the document becomes a purchase order or a receipt. → Import jobs

An extraction that found no table is not a matching failure. Read the log of the job itself first: it states whether the document was divided correctly, and the most common cause is a struct written for a different layout. → Import logs

  • Structs — every parameter of a table description.
  • Mappings — the mapping types and when each one is the right tool.
  • Import jobs — where an uploaded document goes and what comes out.