AI Invoice-to-PO Line Matching · SAP

Solving the last mile of invoice-to-PO line matching.

Traditional ERPs match invoices at the Purchase Order level. Intwise identifies the exact Purchase Order line automatically — using semantic AI, business rules, and confidence scoring — so your AP team stops guessing which line an invoice actually belongs to.

Resolving invoice lines against SAP MM purchase orders SBERT · all-MiniLM-L6-v2
"20x M8 hex bolt, zinc"
PO 4500198211 · line 10
94%
"Freight surcharge Q3"
PO 4500198211 · line 40
73%
"Misc. consulting hours"
PO 4500197860 · line 03
41%
≥90% auto-suggested 60–89% needs review <60% manual resolution
SBERTall-MiniLM-L6-v2 embeddings
8weighted matching features
INVOIC02simulated SAP IDoc output

The Problem

The last mile problem

Most UBL 2.1 and Peppol BIS 3.0 e-invoices carry a Purchase Order number at the header level — never the PO line. Everything after that is manual.

Supplier Invoice (XML)
Purchase Order 4500198211
10 open PO lines
Which line belongs to this invoice?

The invoice XML tells you the PO. It does not tell you the line. So an AP processor opens the PO, and manually compares every candidate line against the invoice, one field at a time:

  • Description
  • Quantity
  • Material / SKU
  • Unit Price
  • Tax Code

Multiply that across every invoice referencing a multi-line PO, every day, every AP clerk.

Hours wasted every week — on a lookup an ERP should already know.

The Solution

How Intwise works

A seven-step pipeline that turns an ambiguous invoice line into a ranked, auditable PO line match.

01

Invoice XML

UBL 2.1 / Peppol BIS 3.0 e-invoice received, referencing one or more SAP purchase orders.

02

Extract Invoice Lines

Line-level description, quantity, unit price, material and tax data are parsed out.

03

Retrieve SAP PO

All candidate lines are pulled from the referenced SAP MM purchase order(s).

04

AI Similarity Engine

Each invoice line is embedded with SBERT and scored against every PO line candidate.

05

Confidence Ranking

An 8-feature weighted scorer ranks candidates and assigns a confidence percentage.

06

Review if Required

Sub-90% matches route to an AP reviewer with the ranked candidates and their scores.

07

SAP Posting

The resolved line match is emitted as a simulated SAP INVOIC02 IDoc, ready for posting.

Capabilities

Built for line-level accuracy

Semantic understanding, grounded by the business rules an AP auditor would actually apply.

Semantic Similarity

Sentence Transformer embeddings compare meaning, not just keywords.

Business Rules

Quantity, price, and material-code validation layered on top of the AI score.

Material Matching

Cross-checks SKU and material master data against invoice descriptions.

Confidence Score

Every match carries a transparent, weighted percentage — never a black box.

Human Review & Audit Trail

Sub-threshold matches queue for review, with every decision logged.

SAP Integration Suite

Designed to sit alongside SAP S/4HANA and BTP integration flows.

Triage

Three confidence tiers

Every match lands in one tier, so AP teams know at a glance what needs their attention.

0%
Automatic Match
≥ 90% confidence
0%
Needs Review
60–89% confidence
0%
Manual Review
< 60% confidence

Architecture

Where Intwise sits

A model-as-a-service layer between the invoice and SAP posting — not a replacement for either.

Supplier Invoice (UBL / Peppol XML)
SAP Integration Suite / BTP
Intwise AI Matching Engine
SAP S/4HANA (MM Purchase Orders)
Invoice Posting (INVOIC02 IDoc)

Interface

Inside the matching UI

A React 19 + Vite simulation UI, built to demonstrate the full workflow end to end.

Dashboard

Dashboard

Queue overview by confidence tier.

Invoice Upload

Invoice Upload

Drop an XML invoice to kick off matching.

Matching Results

Matching Results

Ranked PO line candidates with scores.

Review Screen

Review Screen

Side-by-side line comparison for reviewers.

Analytics

Analytics

Match-rate trends across confidence tiers.

What It's Built For

Designed to remove the manual step

0%
Target reduction in manual line matching
Seconds
Instead of minutes, per invoice line
Ranked
Every candidate scored, not just accepted or rejected
Audit Ready
Every match traceable back to its scoring features

Intwise is a Phase 1 proof of concept: the scoring weights above are hand-tuned as a stand-in for a trained ranker, there's no feedback-learning loop yet, and SAP posting in the demo is simulated rather than live — noted here rather than glossed over.

SAP Community

Read the complete technical blog

Learn how Intwise approaches one of SAP's persistent procurement problems — AI-powered, line-level invoice matching, explained end to end.

Read SAP Community Blog →