runbookify
← All plans
Order Management & Fulfillment / Quote-to-Order

Quote Builder with Margin Guardrails

Build a quote tool that shows margin live on every line and on the total, hard-blocks anything below your margin floor until a manager signs off, then sends a clean quote PDF and email - so reps stop quoting under margin without anyone noticing.

IntermediateA weekendBuilds onNext.js (App Router) on VercelSupabase (Postgres, Storage, Auth + RLS)Resend (email)
What you'll build

A logged-in quote builder where reps add lines, see per-line and blended margin update live, get blocked from sending anything below your floor until a manager approves it, and then send a clean quote PDF + email with a saved record and full audit trail.

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 cost + list-price master (a Google Sheet or CSV is fine - no API needed)
  • Your margin-floor rules (per-line and/or blended)
  • Free accounts on Vercel, Supabase, and Resend

The problem this kills

Reps quote fast, and margin quietly leaks. A discount here, a "let's just win it" price there, a cost figure that's three months stale - and nobody notices until the deal is booked and finance asks why the margin is 9% instead of 30%. Spreadsheets don't stop it: they happily let you type any price you want, and the margin math is buried in a cell nobody checks before the quote goes out.

This tool makes margin impossible to ignore and impossible to quietly break. Every line shows its margin as the rep types. The blended margin for the whole quote sits at the top. And if any line - or the total - drops below the floor you set, the quote simply cannot be sent until a manager looks at it and approves. The leak gets caught before the customer ever sees the price, not after the deal closes.

What you'll build

A clean, login-protected web app your sales team uses to build quotes:

  • Pick a customer, add line items from your cost/price master, set quantities and any discount.
  • Watch the per-line margin and the blended (whole-quote) margin update live as you type.
  • See the cost source next to every line - which master, which version - so the number is never a mystery.
  • Any line below your line-margin floor, or a total below your blended floor, gets flagged and routed to a manager for approval. Reps can't send it themselves.
  • Once approved, the tool generates a clean quote PDF, emails it, and saves the quote with a unique quote number so it can't be sent twice.

It runs on a free, modern stack and is buildable in a weekend - even if you have no API into your ERP yet (you import a Sheet/CSV and export a quote CSV).

What's inside the Implementation Plan

A step-by-step runbook you paste into an AI coding agent (Claude Code). It builds the whole tool with you, one prompt at a time - no coding experience needed.

It starts by interviewing you about your business. Before writing a single line, the plan has the agent ask about your products, your cost and list-price columns and how they're named, your SKU conventions, your typical and peak quote sizes, and - most importantly - your exact margin-floor rules and who approves exceptions. It reads a short tailored spec back to you, you confirm it, and only then does it build. You get a tool shaped around how you actually quote, not a generic template.

Inside you'll find: the discovery interview, the data model tuned to your master file, the live margin math (line and blended), the below-floor approval gate, PDF + email generation, the saved-quote record with a duplicate guard, a verification checklist, and the no-API CSV fallback.

The governance it includes (this is the point)

This isn't just a calculator - it's a control:

  • Login so only your team can build quotes.
  • Row-level security so each user/team only sees their own organization's quotes and customers.
  • A hard human-in-the-loop gate: anything below your margin floor is blocked until a named manager approves it. The AI drafts; a person decides; only then does it send.
  • A complete audit trail: who built the quote, who approved the exception, what the cost source and margin were, and exactly when - all recorded.
  • A duplicate guard keyed on the quote number, so the same quote can't be sent or booked twice.

Who it's for

Inside and outside sales reps who build quotes, and the sales managers who own margin. If you've ever found out after the fact that a deal was quoted under margin, this is for you.

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.