Missing product codes on invoice lines

Handle a missing product code on an invoice line: record why it is empty, never invent a SKU, match through a reviewed enrichment layer. Worked example.

See the PDF-to-Excel example

When an invoice line has no product code, first record why the cell is empty (absent on the invoice, unreadable, lost during extraction or still unreviewed) and never fill it with an invented SKU. If you need a product identity for price comparison or purchase-order matching, add it in a separate enrichment column with its evidence, reviewer and status, while the extracted code field keeps exactly what the invoice shows.

Why is the product code missing from an invoice line?

An empty or altered code cell can have several causes, and each needs a different action:

Evidence on the retained sourceCode statusNext action
The invoice line has not been checked against the PDFReview pendingOpen the source page before calling the code absent
No vendor item code anywhere on the line, after checking the whole invoiceAbsent in sourceLeave the extracted field empty; consider a separate catalog match
A printed code is visible but one character cannot be readUnreadableKeep the visible fragment and page; ask for a clearer original
The PDF shows 00172 and the spreadsheet is blankExtraction omissionCorrect from the PDF and record the correction
The spreadsheet shows 172 while the PDF shows 00172Altered identifierRestore the exact text and fix the column type on import
Only a buyer code or a standard identifier is printedOther identifier present, vendor code absentStore that identifier in its own field

Check the reference column, the start and end of the description and any detail sheet explicitly linked to the position. A code can sit outside the table; the invoice number, purchase-order number and line number identify other things.

InvoiceLineLab extracts invoice line items from PDF to Excel or CSV, keeps item references as text when the invoice prints them and marks missing values instead of filling them. Each row also carries its PDF page, so the “absent or unreadable?” check starts from the right page.

Which item identifiers can an invoice line carry?

Structured e-invoices separate several identifiers, and the same separation is useful in a spreadsheet built from PDFs:

  • Seller (vendor) item identifier: “an identifier, assigned by the Seller, for the item” (Peppol BT-155). This is the vendor’s SKU.
  • Buyer item identifier: assigned by the buyer (Peppol BT-156), such as your own article number.
  • Standard item identifier: an identifier “based on a registered scheme”, which must carry a scheme identifier (Peppol BT-157), for example a GTIN.
  • Purchase order line reference: the buyer’s PO line the invoice line refers to (Peppol BT-132).

In the Peppol syntax the seller, buyer and standard identifiers are all optional on the item, while the item name is mandatory. A line without a code is therefore normal, and it says nothing about any jurisdiction’s invoice requirements or about how an ordinary PDF is laid out.

When the vendor code is missing, the PO line reference is often the best remaining link for a three-way match when a line has no product code: invoice line, PO line and goods receipt can still be compared on quantity, unit and price.

Why shouldn’t you invent a SKU for a missing code?

A guessed code looks exactly like an extracted one. Once it sits in the code column, a reviewer cannot tell that the invoice printed nothing, and every grouping, price comparison and match built on it inherits the guess.

  • Do not use an empty string, 0 or “unknown” as a shared product key: all uncoded lines would merge into one fake product.
  • Scope a real vendor code to its vendor: two vendors can both use 00172 for unrelated articles.
  • Keep the printed spelling separate from any normalized search version, and preserve lookalike characters (O and 0, I and 1) until checked. To stop Excel from stripping codes, import code columns as text so leading zeros survive.
  • A generated internal row key is useful for tracking, but it is not a product identifier.

Worked example: two uncoded lines and one catalog

All data is fictitious; amounts are in US dollars, before tax.

Invoice INV-A from vendor V has two lines on page 2, positions 6 and 7. Both read “Cleaning cloth”, 5 pieces × $3.00 = $15.00, with no item code. Invoice total for these lines: $15.00 + $15.00 = $30.00.

A dated vendor catalog lists two candidates:

Catalog codeSizePrice per piece
CL-S20 × 20 cm$3.00
CL-L40 × 40 cm$3.00

Both candidates give 5 × $3.00 = $15.00, so the price cannot choose between them. A delivery detail sheet explicitly links position 6 to “20 × 20 cm”; nothing establishes the size for position 7.

Result:

PositionExtracted codeCode statusCatalog matchMatch statusAmount
INV-A / p2 / 6(empty)Absent in sourceCL-SReviewed: detail sheet + catalog version$15.00
INV-A / p2 / 7(empty)Absent in sourceCL-S or CL-LPending: size missing$15.00

The invoice amount is $30.00 for 10 pieces, and both rows stay in the cost total. For a product-level comparison, only 5 pieces of CL-S ($15.00) are established; reporting 10 pieces of CL-S would copy the first match down the column without evidence.

How do you build a product-code enrichment layer?

Keep two decisions apart: what the invoice contains, and what outside evidence establishes.

  1. Source fields: extracted vendor code (possibly empty), code status, description, quantity, unit, amount, page.
  2. Enrichment fields: candidate code, evidence reference (catalog version, detail sheet, vendor reply), distinguishing specification, reviewer, decision date, match status (reviewed, pending, rejected).
  3. Accept a match only when the distinguishing specification (size, grade, pack) is supported by the evidence. Reject a candidate whose size or unit contradicts the invoice.
  4. Keep pending when the evidence only repeats the generic description, and ask the vendor for the missing detail.
  5. Exclude pending identities from like-for-like product comparisons, but never from cost totals.

“Absent in source; catalog match reviewed” is a coherent status. So is “unreadable; match pending”. A later catalog match never makes an unreadable printed code readable.

When is an uncoded line acceptable as it is?

An invoice table can be fit for recording costs while unfit for product-price comparisons. Accept the row when its description, quantity, unit and amount have been checked, its empty code has an explained status and its page can be reopened. For a few rows, manual review of descriptions is enough. When item-level comparisons depend on reliable codes, ask the vendor to print them or to send a detailed export. A blank code is better than a confident-looking wrong identity.

FAQ

What should I put in the product code cell when the invoice has none?

Nothing. Leave the extracted code empty and record the status “absent in source” in a separate column. Put any looked-up code in an enrichment column.

Can I match an invoice line to a purchase order without a product code?

Yes, if the invoice prints a PO line reference, or if quantity, unit, price and a distinguishing description agree with one PO line only. Otherwise keep the match pending.

Is it a problem if a vendor invoice has no SKU?

Not for the invoice itself: item identifiers are optional in the Peppol e-invoice syntax, and many PDF invoices omit them. It becomes a problem only for analyses that group or compare by product.

Should two uncoded lines with the same description share one code?

Not without evidence. The same description can cover different sizes, grades or deliveries.

Continue the checks

Keep the PDF page behind each extracted row so a reviewer can reopen the line before deciding a code is absent. For the overall table, see line items compared with invoice header fields.

The synthetic invoice table on the home page shows how references, quantities and the PDF page sit side by side, and the invoice data validation checks cover missing and ambiguous values.

Sources and further reading

Get started with InvoiceLineLab

Enter your work email to get access to InvoiceLineLab. No account or payment is created at this stage.

Submitting sends your email and visit context to our publisher’s infrastructure, named on the Privacy page. No account, payment or automatic email is triggered. Privacy.