Finance and administration

Purchase invoice OCR into the books without retyping

why purchase invoices still get retyped into the erp

Accounts payable still burns hours on the same loop: open a PDF from email, squint at a scanned stamp, type tax id, net, VAT, and due date into Comarch Optima or enova, then chase who should approve the cost centre. Paper and mailbox volume both grow while headcount stays flat. During month-end the queue spikes, unpaid supplier statements arrive, and nobody is sure which PDF already became a draft. Integrations under NDA for mid-market finance teams usually show the same failure pattern: the ERP booking itself is fast once fields are clean, but the capture step is where duplicates, wrong VAT rates, and mistyped bank accounts hide. Photo invoices from site managers arrive as chat exports that never match the supplier master. Currency invoices need exchange rates on the booking date, not the email date. Without a controlled intake, the same invoice can sit in three folders while a reminder fee lands on the next statement. Automation here is not about replacing the chief accountant. It is about removing retyping, forcing a single intake channel, and making low-confidence fields visible before anyone posts. Teams that already run WooCommerce sales invoices still treat purchase side as a manual island, which is exactly where overdue supplier risk accumulates. Polish VAT evidence rules still expect you to keep the source file with the booking. Automating capture fails when the PDF is stored only in personal email. Put object storage under the same retention policy as the ERP year archive. When a supplier sends a corrective invoice, link it to the original draft id instead of treating it as a brand-new number series. Train requesters to forward supplier mail to the intake address rather than downloading and renaming files on the desktop. That single behaviour change usually removes more errors than a second OCR vendor. For foreign invoices, store the original currency and the booking rate as separate fields so later multi-source reports can rebuild FX without opening PDFs again. If your group uses both Optima at the subsidiary and a group ledger, post locally first and export the posted id upward; do not OCR twice into two systems from the same mailbox. Subiekt-heavy small firms can still benefit if they accept import files instead of live API drafts, but the intake and approval story stays the same.

when a supplier invoice lands in the finance mailbox

A new message arrives in the dedicated purchase-invoice mailbox with a PDF or image attachment, or a staff member drops a file into the intake folder watched by the workflow. Optional manual trigger: finance clicks reprocess on a held item after fixing supplier master data. Scheduled sweep every fifteen minutes catches mail that arrived without firing the provider webhook. Reject non-invoice attachments early using MIME and a simple keyword gate on subject lines so holiday photos never enter the OCR queue. Holiday cover can temporarily lower auto-approve thresholds so deputies are not flooded, then restore thresholds on the first working day.

how to run purchase invoice ocr into a booking draft

  1. Ingest the attachment, hash the file, and skip if the same hash already produced a posted or pending draft in the last ninety days.
  2. Run OCR on PDF pages or images, then extract supplier tax id, invoice number, issue date, due date, currency, line nets, VAT rates, and gross with per-field confidence scores.
  3. Match supplier tax id to the ERP vendor master in Comarch Optima or enova; if multiple matches exist, open a disambiguation task instead of guessing.
  4. Build a booking draft with suggested account, VAT code, and cost centre from vendor defaults plus optional AI hints, then route approval by amount threshold.
  5. On approval, post or release the draft via ERP API or import file, store the original PDF on the booking, and notify the requester with the document number.
  6. If rejected, return the item to the inbox queue with a reason code and keep the hash so a corrected resubmission can replace the draft without creating a twin.
  7. Write an audit event with hash, vendor id, draft id, approver, and model version so month-end can prove what changed between extraction and posting.

Systems

  • Comarch Optima
  • enova
  • email inbox
  • object storage

Tools

  • n8n
  • OCR/document AI
  • REST
  • Make

ocr to erp field mapping for purchase invoices

Mailbox webhook or IMAP poll feeds n8n. n8n stores the raw file in object storage, calls the OCR or document-AI endpoint, then writes structured JSON to a staging table. A mapping layer translates tax id and invoice number into Comarch Optima or enova vendor and document fields. Make can orchestrate low volume; n8n fits when you need retries, custom JS for tax-id checksums, and parallel approval webhooks. Custom PHP is useful only when WordPress already hosts an internal portal that shows draft status to non-finance staff. Bank account IBAN from the PDF is compared to vendor master but never auto-updated without a four-eyes change. Posted document ids flow back to the staging row so multi-source finance reports can join purchase documents to cash later. Prefer REST or official import formats over UI scraping. Keep secrets in the workflow credential store, not in WordPress options. Audit logs should record who approved, which model version extracted fields, and the raw confidence map. That trail matters when an auditor asks why a draft differed from the PDF header.

what to do when invoice ocr confidence is low

Low overall confidence or any required field below threshold parks the item in a human review queue with highlighted spans on the PDF, never silent defaults. Duplicate invoice number for the same vendor blocks posting and opens a ticket with both PDFs. ERP API timeouts retry with backoff and idempotency keys so a double click cannot post twice. Currency mismatch against vendor default forces review. If OCR returns an empty page, move the file to a scan-quality failure lane and email the sender a short resubmit instruction. Approval timeouts after N business days escalate to a deputy role, not to auto-post. Poison messages that crash the OCR worker go to a dead-letter queue with the original bytes untouched. Operators re-drive from dead-letter after a parser fix without asking suppliers to resend.

where ai helps invoice field extraction and where rules stay in charge

AI proposes field values and a likely expense account from historical postings for that vendor, but it does not post, change vendor bank details, or invent a VAT rate that fails checksum against net and gross. Confidence scores decide whether the draft goes straight to approval or to review. Prompted models may normalise date formats and split multi-page annexes from the invoice body. Rules own tax id validation, duplicate detection, and amount thresholds. Treat AI as a typist with a highlighter, not as the chief accountant.

when purchase invoice ocr is not worth building

You receive fewer than roughly thirty purchase invoices a month, all from a handful of vendors with stable PDF layouts, and one person already books them the same day. Or your ERP forbids API drafts and only accepts sealed accountant-signed imports with no staging area. In those cases a shared mailbox plus checklist beats an OCR pipeline. If every invoice is already typed by an outsourced bookkeeping firm that refuses API drafts, fix the operating model before buying OCR.

kpis for purchase invoice capture and posting speed

  • Median hours from mailbox arrival to approved draft
  • Share of invoices posted without a manual field edit
  • Duplicate invoice attempts blocked per month
  • OCR review queue age older than two business days
  • Postings with attached original PDF versus missing file

Automation ROI calculator

Enter how often the process runs each month, minutes per run, and your loaded hourly cost. The result is a simulation, not a quote for our work.

Hours = runs × minutes / 60 × recovery %. Time value = hours × rate × realisation %. Avoided errors = runs × error % × cost per error × realisation %. Net = sum − upkeep. Payback = build / net, only when net > 0.

Hours recovered / month: -

Hours recovered / year: -

Time value / month: -

Avoided error cost / month: -

Net / month: -

Payback (months): -

First-year result: -

Can OCR post straight into Comarch Optima without approval?#
Technically an API can create documents, but you should still gate by amount and vendor risk. Unattended posting is only sane for micro-value recurring vendors with perfect field confidence and a signed internal policy. Most teams keep a human approve step for anything above a small threshold or for new vendors.
Do photo invoices from phones work?#
They work when the page is flat, lit, and fully in frame. Skewed warehouse snaps often fail line extraction even when the header is readable. The workflow should reject poor scans early and ask for a PDF from the supplier portal instead of burning review time on unreadable images.
How do you stop the same PDF arriving from two people?#
Hash the file bytes and also key on vendor tax id plus invoice number. Either signal alone can miss twins when one person sends a re-export. Using both catches most mailbox duplicates before a second draft exists.
Where does enova fit versus Optima?#
Both can receive structured drafts if you map fields to their APIs or import schemas. Choose the connector you already run for sales documents so purchase and sales share vendor master discipline. Do not run two different mapping sheets for the same tax id.
What about invoices that include personal data on annexes?#
Keep annex pages in the same encrypted object as the invoice but restrict download to finance roles. If a shipping label shows a private address, mask it in the reviewer UI when the reviewer only needs totals. Document the processing purpose under your GDPR register and sign a processor agreement with the OCR vendor before sending files outside your network.

Need an FAQ tailored to your industry and market? We can build one aligned with your business goals.

Let’s discuss

Related cases