Invoice matching with AI: reconciling invoices with MRP/ERP

Invoice matching is the work of checking each line of a supplier invoice against the order line it belongs to in your MRP/ERP plan: the part, the quantity, the price and the date. Done by eye and by hand across thousands of open orders, a single mismatch that slips through can leave the production plan silently wrong. AI agents that read documents can extract the invoice lines, find the matching order lines in the plan and mark quantity, price and date differences side by side — with a person approving every line before the plan changes, and a record of who approved what, when and why.

What invoice matching is

Invoice matching is how a manufacturer checks that what a supplier bills agrees with what was ordered — and keeps the plan in step with it. Every purchase order in the MRP/ERP system has lines: a part, a quantity, an agreed price and an expected arrival date. When the supplier's invoice arrives, each invoice line has to be tied to the order line it answers, and any difference has to be seen and decided on before it reaches the plan.

The scale is what makes it hard. As an illustration: a manufacturer with 5,000 open order lines and new invoices every day has to find, for each invoice line, the one order line it belongs to — and notice when the quantity, the price or the date does not agree.

What the work involves

  • Thousands of open orders. Order lines stay open from the day they are placed until the goods arrive and are invoiced, so the list to search is long and changes every day.
  • Invoices in varied layouts. Each supplier has its own invoice format: a PDF generated by the supplier's system, a scanned paper invoice, or an electronic invoice. Field names, column order and the way order numbers are written all differ.
  • References written differently. A supplier may write your order number with its own prefix, without separators or with a line position appended, and may use its own part number next to yours.
  • Partial deliveries and split lines. One order line can be delivered and invoiced in several shipments, and one invoice can cover lines from several orders. The open quantity has to stay right after each one.
  • Price and quantity differences. A unit price that differs from the order, a quantity that is lower or higher than ordered, a different unit of measure. Each needs a decision: accept, correct or ask the supplier.
  • Expected arrival dates (ETA). An invoice is a signal that goods are on their way. When they will arrive depends on the shipping mode, the transit time and holidays, and the plan needs that date to stay right.
  • Three-way match. In a three-way match, accounts payable checks an invoice against two other records: the purchase order (what was ordered) and the goods receipt (what actually arrived). Only when order, receipt and invoice agree (within agreed tolerances) is the invoice approved for payment.
  • Structured e-invoices. Invoices can also arrive as structured electronic invoices: an XML file in a standard format such as UBL, exchanged through a tax authority's or an e-invoicing network's system, which can also be viewed or printed in a human-readable form. A structured invoice makes its fields machine-readable; it does not say which order line in your plan each invoice line belongs to.
  • A record of approvals. Who accepted a price difference, who changed a date, and why — something an auditor, a customer or your own team may ask about later.

Why traditional methods miss it

Invoice matching usually runs on the ERP screens, an export of open orders, a spreadsheet and the experience of the people doing it. That experience matters — they know the suppliers and the parts. The gaps come from the manual steps in between.

  • Manual keying. Invoice lines are typed from the PDF into the system or into a sheet. One swapped digit, a comma read as a thousands mark or a pack price taken for a unit price changes the value, and nothing on the screen flags it.
  • Spreadsheet lookups. Matching an invoice to the open-order export with a lookup formula works only when the reference is written exactly the same way in both. A supplier's prefix or a missing separator returns no match — or the wrong one.
  • Matching by eye. When the lookup fails, someone scrolls through the open orders. With thousands of lines and several orders for the same part, picking the right line is easy to get wrong.
  • Differences seen too late. A price or quantity difference that nobody marks at the time of the invoice surfaces later — at payment, at the next count or when a line runs short in production.
  • Plans drifting out of date. An invoice can tell you that goods ship later, in a smaller quantity or by a different mode than planned. If that is not written back, the plan keeps the old date, and material planning works from it. One mismatch that slips through makes the production plan silently wrong.
  • No record of decisions. The plan holds only the current value — not the previous one, who changed it, when, or for what reason. Months later, piecing that together means asking around and searching through old e-mails.

How AI agents reading documents make it solvable

Matching an invoice is a chain of small, checkable steps: read the invoice, look up the plan, compare the values, compute a date. Primarch builds AI agents that carry out chains like this one and hand over to a person at the points where a decision is needed — accepting a difference, choosing between two candidate lines, changing the plan. Reading and looking up take the time; the decisions are fewer, and they stay with people.

  • It reads invoices the way a clerk does. Models that read the page as an image as well as text can pick out the order number, the part number, the quantity, the unit price and the dates across different suppliers' invoice formats.
  • It normalizes references before it searches. A supplier's way of writing your order number can be turned into yours by rules set up for that supplier, so a prefix or a missing separator does not break the match.
  • It says when it is not sure. For each invoice line, the search across the open orders has three clear outcomes: a single match, an ambiguous match or no match. The last two are flagged for a person instead of being guessed.
  • It puts the values side by side. What the AI read from the invoice sits next to what the plan says, with the differences in quantity, price and date marked, so the reviewer checks differences instead of retyping lines.
  • It leaves dates to calculation. Reading is the model's job. Working out a planned arrival date from the shipping mode, the transit time and the holiday calendar is a calculation, and it is done as one.
  • It stops for approval and writes down why. Nothing in the plan changes until a person approves it, only the fields that are permitted to change are written, and each change is recorded with who made it, when and why.

Keying speed is the wrong measure. The question that matters is: "for every open order line, does the plan say what the supplier has actually told us — and can we show who approved it?"

An agent reads what suppliers send and compares it with your plan. Whether a price difference is accepted, whether a short shipment is acceptable, whether an invoice is paid and what to ask the supplier stay with your buyers, planners and finance team.

What to look for in a solution

Whichever vendor you talk to, these are fair questions to ask about an AI tool for invoice matching:

  • Reads your suppliers' invoices. Can it read invoices in the formats your suppliers actually send — generated PDFs, scans, e-invoices — and can you check what it read against the original?
  • Handles references as suppliers write them. How are order numbers with supplier-specific prefixes, separators or line positions turned into yours?
  • Says when a match is uncertain. Does it tell a single match from an ambiguous one or no match at all, or does it pick a line anyway?
  • Marks the differences. Are quantity, price and date differences shown next to the plan's values, line by line?
  • Handles the awkward cases. Ask how partial deliveries, invoices covering several orders and differing units of measure are handled.
  • Computes the arrival date. Is the expected arrival date worked out from the shipping mode, the transit time and the holiday calendar, or copied from the invoice?
  • Changes nothing on its own. Is any value written into your plan without a person approving it?
  • Writes only where allowed. Can you limit which fields it is permitted to change?
  • Keeps a record. Is there a who/when/why record of each approved change that you could show to an auditor or a customer?
  • Leaves your ERP as it is. Does it work with your MRP/ERP and your process as they are, or does it need a new system or a migration?
  • Fits your controls. If you run a three-way match with goods receipts, or receive structured e-invoices, ask how each one is handled.
  • Is proven on your invoices. A trial on your own invoices and your own plan, not a demo data set.

Example use cases

The walk-throughs below are illustrative examples of how an invoice line gets matched. They are not customer cases, the numbers and prices are illustrative, and they contain no performance figures.

Example 1: a unit price that does not agree

  1. 01

    Situation

    A supplier invoices 500 connectors at $1.25 per piece. The order line in the plan says $1.10.

  2. 02

    What the agent does

    It reads the invoice line, finds the single matching order line and places the two side by side. The price difference is marked; the quantity agrees.

  3. 03

    What the buyer does

    Checks the order confirmation and finds no agreed price change, so the line is not approved and the buyer asks the supplier for a corrected invoice.

  4. 04

    Later

    The corrected invoice arrives at $1.10. It matches, the buyer approves it, and the approval is recorded with who, when and why.

Example 2: fewer pieces than ordered

  1. 01

    Situation

    An order line is for 1,000 sensors. The supplier's invoice lists 600.

  2. 02

    What the agent does

    It matches the invoice line to the order line and marks the quantity difference: 600 invoiced against 1,000 in the plan.

  3. 03

    What the planner does

    Reads the supplier's note that the rest ships next month, and decides how the line is updated in the plan. Only the permitted columns change.

  4. 04

    The record

    The change carries who approved it, when and why, so the 400 pieces still to come can be explained later.

Example 3: one invoice, three kinds of match

  1. 01

    Situation

    A three-line invoice arrives. The supplier writes your order numbers with its own prefix and the line position after a slash.

  2. 02

    Line 1

    The supplier-specific rule set turns the reference into your order number format, and the search finds a single match.

  3. 03

    Line 2

    The same part is open on two order lines with different dates. The match is flagged as ambiguous, and the buyer picks the right line.

  4. 04

    Line 3

    No open order line is found. The line is flagged, and the buyer finds the order was entered after the plan export the matching ran on.

  5. 05

    The result

    Nothing was guessed. Two lines needed a person, and the person saw exactly which two.

Example 4: an arrival date that moves

  1. 01

    Situation

    A supplier invoices a batch of power modules that ships by air on the day before a public holiday. The bill of lading and the tracking number are added with the invoice.

  2. 02

    The calculation

    The planned arrival date is computed from the shipping mode, the air transit time and the holiday calendar. It falls later than the date in the plan.

  3. 03

    What the planner does

    Sees the date difference marked next to the plan's date and approves the new date.

  4. 04

    Afterwards

    The plan carries the new date, and the open-order report shows the line as late against its original date, so material planning works from the date the goods can actually arrive.

How Primarch's Teyit AI helps

This section is about our product. Teyit AI is an agentic product that reads supplier invoices and matches them line by line against your MRP/ERP plan — it shows you the differences, and not a single cell changes without your approval. It was built on the real purchasing process of a leading defense electronics manufacturer and runs end to end today on real invoices and real MRP/ERP data. The flow:

  1. 01

    01 · Upload the invoice

    A PDF invoice; a bill of lading and a tracking number are optional.

  2. 02

    02 · AI extracts the lines

    A visual model reads the lines; a supplier-specific rule set normalizes the order number.

  3. 03

    03 · Match in MRP/ERP

    A search across the open order lines: single match, ambiguous or not found — all flagged.

  4. 04

    04 · Review side by side

    What the AI read sits next to what the plan says; quantity, price and date differences are marked for you.

  5. 05

    05 · Compute the ETA

    The planned arrival date is computed automatically, with the shipping mode, transit time and holiday calendar included.

  6. 06

    06 · Approve

    Only permitted columns are written, and a who/when/why record is kept.

  • The AI reads, you approve. A human approves every line and nothing changes automatically — no black box. Every change is recorded.
  • Open orders in the same flow. Open-order reports run through the same engine — on time, late, short, line by line — and backlog tracking happens in the same flow.
  • Your ERP stays the same. Your MRP/ERP and your process stay as they are; the system works off your plan's daily export.
  • Reads scanned paper invoices as well as PDFs generated by a supplier's system.
  • Reads structured e-invoices from their XML (UBL) file as well as from their printed or PDF view.
  • Checks invoice lines against goods receipts as well as the order, for a full three-way match.
  • Handles partial deliveries and split lines: an order line invoiced in several shipments, or one invoice covering lines from several orders, with the open quantity kept right.

Putting it to work

The simplest start is a demo on your own data: let the AI read one of your invoices and match it against your plan. Before the order, Tedarik AI prices a tender's bill of materials — see our guide to tender pricing and supplier RFQs.

Frequently asked questions

What is invoice matching with AI?

It is checking supplier invoices against your MRP/ERP plan with AI agents: the invoice lines are extracted, each is matched to its order line in the plan, and quantity, price and date differences are marked side by side. A person approves every line before the plan changes.

Does anything change in our plan automatically?

No. A human approves every line, and no cell changes without approval. Only permitted columns are written, and every change keeps a who/when/why record.

Do we have to change our ERP?

No. Your MRP/ERP and your process stay as they are; the system works off your plan's daily export.

What if the AI misreads something?

Every value the AI reads is shown next to the plan's value, and a human approves every line. No cell changes without approval, and every change is recorded.

What happens when an invoice line matches no order, or more than one?

Each line ends up as a single match, an ambiguous match or not found, and the last two are flagged for a person to decide. Nothing is guessed.

How is the expected arrival date worked out?

The planned arrival date is computed automatically from the shipping mode, the transit time and the holiday calendar. Date differences are marked next to the plan, and nothing changes without approval.

Related scenarios

READY?

Ready to make your cameras think?

A 15-minute live demo — with a scenario tailored to your industry.