
The problem
Supplier invoices describe items in the supplier's words, not the buyer's catalog codes. Before a line can be matched to a PO or posted to inventory, someone maps it to a SKU, and with thousands of SKUs that mapping is a daily chore.
How it works
The invoice line's fields, including its vendor, go into the where clause and _predict of sku follows the link from invoice lines to the product catalog. The answer is a ranked shortlist with the reasons behind each candidate, so a reviewer confirms the right SKU instead of searching for it.
The demo runs a live batch against held-out lines and marks each prediction right or wrong, so the accuracy on view is measured, not claimed. Lines from suppliers with no history are flagged as cold.
{
"from": "invoice_lines",
"where": {
"description": "Tikkurila Cush 45cm Blac Pro kouvola",
"billing_supplier": "Frontier Goods Ltd",
"unit_of_measure": "ea",
"unit_price_eur": 37.19,
"quantity": 2,
"billing_supplier.city": "Helsinki",
"billing_supplier.position": "importer",
"billing_supplier.sells_origin": "Tallinn",
"billing_supplier.sells_grade": "budget"
},
"predict": "sku",
"select": [
"$p",
"$value",
{
"$why": {
"highlight": {
"posPreTag": "«",
"posPostTag": "»"
}
}
},
"name",
"category",
"supplier",
"unit_price",
"unit_of_measure"
],
"limit": 5,
"config": {
"ai": "and"
},
"basedOn": [
"name",
"supplier"
]
}For the full architecture, see the technology overview. For the broader narrative across multiple use cases, read The Predictive Application.
See it live
This use case runs in the 📋 ERP demo today. Click through to the live application and inspect the queries that produce the result.



