runbookify
← All plans
Logistics & Transportation / Freight Cost Audit

Freight Bill Approval & GL Coding

Build an internal tool that queues audited freight bills, assigns GL and cost-center coding, routes them through tiered approval by amount, and exports a clean AP/ERP file with a full approval trail - so no freight bill gets paid without review.

BeginnerAn afternoonBuilds onNext.js (App Router) on VercelSupabase (Postgres, Storage, Auth + RLS)Resend (approval requests, reminders, escalations)
What you'll build

A login-protected tool: queue audited freight bills, assign GL accounts and cost centers (with coding rules), route them through tiered approval by dollar amount, capture a manager's sign-off, then export an AP/ERP-ready file plus a complete approval audit trail - with a hard rule that nothing is exported for payment without the required approvals.

Gated download

Enter your email — the plan downloads instantly and a copy lands in your inbox.

By submitting your email you'll also receive the weekly runbookify newsletter. You can unsubscribe at any time.

Before you start

  • A free Vercel account
  • A free Supabase account
  • A free Resend account (and a sender address you can use)
  • A CSV of audited freight bills needing coding/approval (carrier, invoice number, amount, etc.)
  • Your GL account and cost-center list, and your approval thresholds by amount

The problem this kills

Your freight audit caught the overcharges, fixed the accessorials, and now you've got a pile of clean, audited freight bills sitting there waiting to be coded and paid. And that's exactly where it stalls. Which GL account does this lane hit? Which cost center owns it - the warehouse, the plant, or the customer-facing job? Does this $9,400 expedite need a director's sign-off, or can the AP manager release it? Did anyone actually approve it, or did it just get forwarded around until someone keyed it into the ERP?

For most AP and logistics teams, this last mile is a spreadsheet and a lot of trust. Bills get coded inconsistently, big ones slip through with no real review, the same carrier invoice number occasionally gets entered twice, and when finance asks "who approved coding this to cost center 4200?" the answer is a shrug and a search through email.

This tool replaces that limbo with a clear, enforced gate: audited bills get queued, coded against your real GL and cost-center list, routed for approval by their dollar amount, and only then exported to AP/ERP - with a clean record of every decision.

What you'll build

A small internal web app, just for your team, that:

  • Queues audited freight bills imported from a CSV (carrier, invoice number, amount, mode, lane, etc.).
  • Lets a coder assign a GL account and a cost center to each bill, with coding rules that pre-fill suggestions (e.g., "ocean freight to the import warehouse always codes to 5100 / CC-101") so coding stays consistent.
  • Routes each bill through tiered approval by amount - small bills to the AP manager, larger bills to a director or controller - based on your thresholds.
  • Emails the right approver a clean approve / reject request with the coding shown, via Resend.
  • Sends reminders and escalates stalls so nothing sits forever.
  • Dedupes on invoice number so the same freight bill can't be queued or paid twice.
  • Exports an AP/ERP-ready file in the exact columns your system expects, plus a complete approval audit trail of who coded what, who approved it, and when.

What's inside the Implementation Plan

The plan is a single markdown file you paste into Claude Code (a free AI coding agent). It walks the agent through building the whole tool, step by step, each step ending with a ready-to-paste prompt.

The most important part: the plan opens by interviewing you about your business. Before it writes a single line, the agent asks how freight bills reach you after audit, what your GL accounts and cost centers actually look like, the real field names in your data, your coding rules, your exact approval thresholds by amount, your typical and peak volumes, and your messiest edge cases (split coding across cost centers, accessorials, credit/rebill, foreign currency). It reads a short tailored spec back to you, you confirm it, and only then does it build - so you get a tool shaped to your freight-pay process, not a generic template you have to bend to fit.

Inside you'll find:

  • The discovery interview and how the agent turns your answers into the data model.
  • The full build: database, login, CSV import with duplicate guards, the coding screen with rule-based suggestions, the tiered approval routing, the manager approval gate, and the email + reminder + escalation flow.
  • The hard human approval gate and amount-tier sign-off logic.
  • Verification steps so you can prove it works, and the CSV-export fallback so it's fully usable even before you connect it to your AP/ERP system.

The governance it includes (this is the point)

This isn't a toy. The plan builds in the controls a finance and logistics team actually needs:

  • Login so only your team can see or touch anything.
  • Row-level security so people only see the freight bills and approvals that belong to your organization.
  • A complete audit trail - every import, coding change, assignment, approval, rejection, reminder, escalation, and export is logged with who and when.
  • A hard human-in-the-loop gate - the AI queues, suggests coding, and drafts; but a real manager must review and approve, and nothing is ever exported to AP/ERP without that approval.
  • Tiered approval enforced in code - a bill over a threshold physically cannot reach "approved for payment" without the higher-tier sign-off.
  • Duplicate guards so the same invoice number can't be queued or paid twice.

Who it's for

AP managers, logistics and transportation managers, freight-pay analysts, and ops/BPM folks who finish a freight audit only to watch the coding-and-approval step turn into a spreadsheet free-for-all - and who want a real, auditable approval tool without hiring a developer or buying a heavyweight freight-pay platform. You don't need to write code. You need your audited-bills CSV, your GL and cost-center list, your thresholds, and an afternoon.

You've got this - paste the first prompt and let the agent interview you.

Gated download

Enter your email — the plan downloads instantly and a copy lands in your inbox.

By submitting your email you'll also receive the weekly runbookify newsletter. You can unsubscribe at any time.