# How to add document OCR to Sage X3

> Source: https://netray.co/integrations/sage-x3-document-ocr
> Publisher: Netray (netray.co), AI and integration engineering for ERP and manufacturing systems.
> Section: Integrations

## Short answer

Run supplier invoices, packing slips and certificates through an OCR and extraction service, match them to X3 purchase orders and receipts, and create the accounts payable entry or attach the file through X3 services only when confidence is high. Everything else goes to a review queue.

## System

Sage X3

## Capability

document-ocr

## Intro

Accounts payable teams on Sage X3 often key invoices by hand from PDFs and paper, then attach scans for audit. Goods receiving does the same with packing slips, and quality teams file certificates of conformance by hand. Errors show up as price variances, duplicate invoices and missing mill certs at audit.

OCR is mature for printed invoices, but the value is in the next step: matching to the X3 purchase order and receipt, and refusing to post when something does not reconcile. A capture tool that only reads text still leaves most of the work.

Some Sage regions and resellers offer invoice capture add-ons for X3, and those are worth evaluating first. This page covers the general build and when custom is better.

## Use Cases

### Supplier invoice capture with PO matching

**Description:** Extract header, tax and lines, find the PO (PORDER) and receipt, check quantity and price tolerance, then create the invoice entry or send it to AP exceptions.

### Packing slip to receipt

**Description:** Read the supplier's packing slip, match lines to open PO lines, and prefill the receipt for the dock to confirm.

### Certificates of conformance and mill certs

**Description:** Extract lot, heat number and spec, link them to the received lot, and attach the file to the lot record for traceability.

### Duplicate invoice detection

**Description:** Compare supplier, invoice number, date and amount against posted invoices (PINVOICE) before creating anything.

### Customs and freight documents

**Description:** Capture freight invoices and extract reference numbers that tie to receipts for landed cost allocation.

## System Surface

- Web services: SOAP via the Syracuse web services pool (CAdxWebServiceXmlCC) and REST/SData can create purchase invoices and receipts; names and required fields depend on your setup and localisation.
- Import/export templates: structured files for invoices can be loaded through X3 import templates when your process prefers a validated file over direct calls.
- Master data: BPSUPPLIER, PORDER, PORDERQ, PRECEIPT and PINVOICE tables hold what you match against; read through services or a replica.
- Attachments: X3 supports document attachments (document management), so the source PDF can be stored on the transaction. Mechanism varies by version.
- Tax and localisation: VAT, GST and e-invoicing rules vary by country legislation pack; extraction fields must match them.

## How It Works

### Ingest documents

**Detail:** From a shared mailbox, scanner folder or supplier portal. Store the original unchanged with a hash.

### OCR and layout extraction

**Detail:** Use an OCR engine plus layout or LLM-based extraction. Digital PDFs usually have a text layer, so OCR only applies to scans.

### Normalise and validate

**Detail:** Check totals sum, tax rates are plausible, dates parse, and the supplier exists in X3 by tax ID or name.

### Match to PO and receipt

**Detail:** Apply two-way or three-way matching with your tolerances. Unmatched lines are flagged, not forced.

### Review queue

**Detail:** Show the document beside extracted fields. Reviewer corrections feed back to improve supplier-specific extraction.

### Post to X3 and attach

**Detail:** Create the entry through services, attach the PDF, and store the capture ID on the transaction to prevent reprocessing.

## Example Flows

### Clean invoice, auto-matched

**Trigger:** A supplier emails a PDF invoice referencing a PO.

**Steps:**

- Text layer is extracted; totals reconcile.
- PO and receipt are found; price within tolerance.
- A draft AP entry is created and the PDF attached.

**Result:** AP only approves; the invoice never gets retyped.

### Mill certificate for received steel

**Trigger:** A scanned certificate arrives with a receipt.

**Steps:**

- OCR reads heat number, grade and chemistry values.
- Values are compared to the item's required specification.
- If within spec, the cert is attached to the lot; otherwise quality is alerted.

**Result:** Traceability is complete at receipt instead of being reconstructed during an audit.

## On Prem

Invoices and certs reveal pricing, volumes and supplier terms. Run OCR (open-source engines or a local vision-language model) and extraction on your own servers, with GPUs for layout-heavy documents, and keep the source files and extraction results in your storage. Only the web service calls to X3 are needed, and those stay internal. Cloud OCR APIs can be more accurate on poor scans, so many sites run local first and escalate only non-sensitive documents if they choose.

## Security

- Hash and retain the original document; never overwrite it with the extraction.
- Segregate duties: whoever approves a payment should not also be the only reviewer of its extraction.
- Check supplier bank detail changes on invoices against master data and flag mismatches (common fraud pattern).
- Encrypt document storage and restrict access by legal entity.
- Log every correction a reviewer makes.

## Options

### Marketplace or reseller invoice capture add-on for X3

**Fit:** Standard AP invoices in supported countries.

**Effort:** Weeks to configure; licence cost per document or user.

### Build with open OCR plus an LLM extractor

**Fit:** Mixed document types and on-prem data rules.

**Effort:** Typically 6 to 12 weeks including a review UI.

### Partner build such as Netray with an X3 partner

**Fit:** Matching logic, certificates and traceability on X3.

**Effort:** Start with one document type, measure, then extend.

## Pitfalls

- Accepting a high OCR character accuracy as proof of good extraction; line-item association is where errors occur.
- Forcing a match to the nearest PO line when the invoice really is a mismatch.
- Ignoring tax and localisation fields, causing rework at posting.
- No duplicate guard, so a re-sent invoice is paid twice.
- Skipping a feedback loop, so the same supplier layout errors repeat forever.

## Faq

### Does Sage X3 include OCR?

**Answer:** Core X3 is not an OCR engine. Some Sage regions and partners offer invoice capture add-ons that integrate with X3, so check what is available for your version and country. Otherwise you add an external capture service.

### How accurate is OCR on supplier invoices?

**Answer:** Digital PDFs are usually very reliable. Scans, skewed faxes and multi-page line tables are weaker. Set confidence thresholds per field and measure the touch rate on your own invoices rather than trusting a vendor figure.

### Can it post invoices without a person?

**Answer:** For suppliers with clean history, matched POs and amounts inside tolerance, a draft can post automatically with sampling checks. Anything with mismatches, new suppliers or changed bank details goes to review.

### Can we run this fully on-prem?

**Answer:** Yes. Open-source OCR and a locally hosted vision or language model handle most layouts, and the only X3 connection is internal web services. Expect to tune per supplier layout.

### Where does the PDF end up?

**Answer:** Keep the original in your document store and attach it to the X3 transaction using X3 document attachments, so auditors can open the source from the invoice record.

## Search terms

sage x3 ocr, sage x3 invoice capture, sage x3 invoice automation, sage x3 accounts payable automation, ocr for sage x3, sage x3 three way match, sage x3 packing slip scanning, sage x3 certificate of conformance, sage x3 document management ocr

---
Talk to an engineer: https://netray.co/contact?intent=erp_ai | Machine catalog: https://netray.co/agent/catalog.json
