Spend Classification Engine: Finally Answer "How Much Do We Spend on X?"
Import a raw spend/AP export, auto-classify every line into your category taxonomy using supplier and keyword rules plus your own mapping history, see confidence and the still-uncategorized lines, and have an analyst approve the mappings before they're trusted — with a spend-by-category dashboard and a reusable mapping library.
A logged-in tool where you import a spend/AP export, the agent auto-classifies each transaction into your taxonomy from supplier and keyword rules plus past mappings, shows a confidence score and an uncategorized queue, an analyst reviews and approves the proposed mappings before they're applied, and you get a spend-by-category dashboard, a reusable mapping library that makes every future run easier, and a clean CSV export.
Before you start
- A Supabase account (free)
- A Vercel account (free)
- A Resend account (free)
- A spend/AP export (supplier, description, GL, amount, date) as CSV
- Your category taxonomy (a UNSPSC-style category/subcategory tree)
- Any existing supplier→category mappings you already have
- Claude Code or any AI coding agent
The problem this kills
A leader asks the deceptively simple question: "How much do we spend on shipping? On software? On temp labor?" And procurement can't answer — not because the data doesn't exist, but because it lives in a hundred thousand raw AP lines where the supplier is "AMZN MKTP US*2K4..." and the description is "MISC SUPPLIES" and the GL code is a catch-all. Nobody has classified any of it into the categories the business actually thinks in.
So an analyst opens the export in a spreadsheet and starts hand-tagging rows. Halfway through they realize they've categorized the same supplier three different ways. The big six-figure lines get rushed through with the same care as the $14 ones. Next quarter the export arrives and the whole exercise starts from zero, because none of last quarter's hard-won decisions were saved anywhere reusable. The "spend cube" the CFO wants is always three weeks of grunt work away and never quite trustworthy.
The work isn't hard — it's repetitive, it compounds, and it deserves to be a real tool that learns from every decision you make, not a spreadsheet you rebuild every quarter.
What you'll build
A simple internal web app for your procurement and finance team. You import a spend or AP export — supplier, description, GL code, amount, date. The tool auto-classifies each line into your category taxonomy (a UNSPSC-style category/subcategory tree) using three signals: rules you've set on supplier names, keyword rules on descriptions, and — most importantly — your own history of past approved mappings. Every proposed classification carries a confidence score.
You then see exactly what needs a human: the low-confidence lines, the high-dollar lines, and the still-uncategorized ones, surfaced in a review queue. An analyst reviews the proposed mappings, fixes the wrong ones, and approves — and only then is the classification trusted and applied. Each approval feeds a reusable mapping library (supplier → category, and a supplier+description signature → category), so the next import is faster and cleaner than the last. Out the other end: a spend-by-category dashboard and a clean CSV export in the exact columns your reporting expects.
What's inside the Implementation Plan
The downloadable plan is a step-by-step file you paste into an AI coding agent. It opens by interviewing you about your business — what your spend export actually looks like and its real column names, how your taxonomy is structured, which supplier and description conventions show up in your data, your typical and peak transaction volumes, which dollar threshold makes a line "must-review," how you want GL codes used as hints, and the messy edge cases (one-off suppliers, marketplace aggregators like Amazon/PayPal, intercompany lines, refunds and credits). It reflects a short tailored spec back to you and gets your thumbs-up before it builds anything, so the engine fits your taxonomy and your data — not a generic template.
From there it walks the agent through the data model, the spend import with duplicate guards on transaction id, the rules-plus-history classification engine with confidence scoring, the review queue that prioritizes low-confidence and high-dollar lines, the analyst approval gate, the growing mapping library, the spend-by-category dashboard, and the CSV export. Every step ends with a ready-to-copy prompt. There's a full "No API yet?" path that uses a CSV or Google Sheet as the data source and produces a clean categorized CSV — so you can build and run the whole thing this weekend regardless of what ERP or AP system you're on.
The governance it includes (this is the point)
Classified spend drives sourcing decisions and budgets, so the controls aren't optional. The plan builds in login so only your team can use it, row-level security so you only ever see your own organization's spend, a complete audit trail of who proposed and who approved every mapping, a hard human-approval gate so a classification is never trusted until an analyst confirms it — with low-confidence and high-dollar lines forced through review — and duplicate guards keyed on transaction id so the same line can never be counted twice across re-imports.
Who it's for
Procurement analysts, category managers, and FP&A staff who keep getting asked "how much do we spend on X?" and can't answer because the transactions were never categorized. If you can describe your category tree and point at a spend export, you can build this — and every quarter it gets easier, because the tool remembers what you taught it.
You've got this — start with the plan, paste the first prompt, and answer the interview. You'll have your first spend-by-category view on screen before the weekend's out.