Comparison Choosing an approach

OCR, AI extraction and RPA for accounts payable: how they differ

Updated 4 min read By the BAFO team

Short answer: OCR turns a page into text, and a template says where on the page each field sits: suited to a layout you have mapped and weak on one you have not. Learned capture classifies fields from examples and needs training data per document type. AI that reads the page understands layout and meaning, so it copes with new vendors without setup, at the price of occasional confident mistakes that need checks around it. RPA follows defined steps in a screen, which is brittle and unnecessary where an API exists. For Certinia the sound pattern is AI reading, checks on the result, and a person approving.

What each one actually does

Template OCR. An engine recognises the characters on a page. A person then defines a template for each supplier: the invoice number is here, the total there, the lines in this table. It is deterministic and cheap per page, and it works until the supplier changes the layout or a new supplier arrives, when someone has to build another template. Line items are the hard part, because a table with a variable number of rows does not fit a fixed zone.

Learned capture (machine-learning extraction). A model is trained on examples to recognise fields wherever they sit. It copes with layout variety better than a template, and it needs a body of labelled documents to learn from and retraining as documents change.

AI that reads the page. An AI reader reads the way a person does: it makes sense of the layout of a page without a template. There is no per-vendor setup. The cost is that it is probabilistic: a mistake looks as confident as a correct answer.

RPA (robotic process automation). A script drives the user interface of an application, clicking and typing as a person would, following steps defined in advance. It is useful when a system offers no API. Certinia and Salesforce do, so RPA adds a layer that can break between you and the data: a change to a screen can stop it.

Side by side

AspectTemplate OCRLearned captureAI that reads the pageRPA
How it finds a fieldBy position on a mapped templateBy a trained modelBy understanding the pageIt does not
Setup per supplierA template eachTraining data per typeNoneA script per screen
A new layoutFails until mappedOften copes, may need retrainingUsually copesNot applicable
Line itemsHardModerateGoodNot applicable
Same input, same outputYesYesNot alwaysYes
Typical failureA moved field returns nothing or the wrong thingA low-confidence field on an unusual layoutA confident wrong valueA changed screen stops the script

Where AI reading goes wrong

The failures of an AI reader are specific, and a person's review is what catches them:

  • Number and date formats. A decimal comma or a thousands point read the wrong way; 04/05/2026 read in the wrong order. See amount and date formats.
  • The wrong value. A number or date taken from the wrong place on the page. A person's glance at the document catches it.
  • Invented values. A value filled in that the document does not state.

None of these is a reason to avoid AI reading. All of them are reasons not to let it write to a ledger unsupervised.

What Certinia gives you natively

Certinia has its own capture route: a Scanned Payable Document that stores a scanned invoice and the data an OCR service returned, and an inbound email service that creates one from each emailed attachment. It also receives electronic invoices, structured data that needs no reading at all. See the Scanned Payable Document explained.

Which to use when

  • Structured e-invoices or EDI from a few large suppliers. Take the data as it comes. Parsing a document is the wrong problem.
  • A handful of suppliers with a fixed layout and a high volume. Template OCR can be exact and cheap, if someone maintains the templates.
  • Many suppliers, varied layouts, and people retyping lines. AI that reads the page, with controls, is the closest fit, because it needs no template per supplier.
  • A system with no API. RPA, with open eyes about its fragility.
  • A mix. Most real inboxes are a mix. Route structured invoices one way and documents another.

Where BAFO is not the right fit

BAFO's Accounts Payable Agent reads documents with AI, checks the result, puts a person's approval before anything is created, and creates draft payable invoices in Certinia. It is not the right tool for a feed that is already structured data, for invoices that must be approved and paid inside the same tool, or if you are not on Certinia. See Certinia AP automation options compared for the wider choice.

Frequently asked questions

Is AI extraction more accurate than OCR?

They answer different questions. OCR recognises characters; the quality of a template decides whether the right characters are used. AI reading tends to find the right fields on layouts nobody mapped, and it needs controls because its errors are confident. Measure both on your own invoices, not on a vendor's samples.

Do I still need OCR if I use an AI reader?

Often not. An AI reader does not need OCR text as its input.

Can RPA and AI be combined?

Yes: AI reads, RPA types into a system without an API. With Certinia, the API makes the second half unnecessary.

What should I test first?

The ugly invoices: a long one, a scan, a foreign-currency one, a number format with decimal commas, one with a purchase order number in the header. The list is in amount and date formats.

Sources and further reading

Where this page leans on someone else's documentation or standard, it is listed here. Check the release or edition your org runs: official pages change.

Keep reading