runbookify
← All plans
Order Management & Fulfillment / Returns & Exchanges

Exchange Order Builder

Turn a return's RMA into a clean replacement order - compute the price delta for even swaps and upgrades/downgrades, and commit the exchange only after an agent approves.

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

Pick an RMA, build the linked replacement order, see the exact price delta, get an agent's approval, and produce an exchange order plus a clean CSV your system can ingest - one RMA, one exchange, every time.

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 Supabase account
  • A free Vercel account
  • A free Resend account
  • A spreadsheet or export of your orders and RMAs (CSV or Google Sheet) - no live API needed

The problem this kills

Exchanges are where returns go to die. A customer sends back the wrong size, the CSR keys in a replacement order in a separate screen, and somewhere between the return and the new order the link breaks. The refund gets issued AND the replacement ships - or neither does. Nobody computes the price delta on an upgrade, so you eat the difference. The same RMA gets turned into two replacement orders because two people touched the ticket. Finance can't tell you which exchanges were even swaps and which charged the customer more.

The root problem: the return and the replacement live in two disconnected steps, with no single record that says "this return, this replacement, this dollar difference, approved by this person."

What you'll build

A small internal web app where your returns team:

  1. Selects an existing RMA (the return authorization for an item coming back).
  2. Picks the replacement item(s) the customer wants instead.
  3. Sees the price delta computed automatically - $0 for an even swap, a positive amount for an upgrade, a credit for a downgrade.
  4. Sends the linked exchange (return in + replacement out + delta) to an agent for approval.
  5. On approval, commits the exchange order and exports a clean CSV in the exact columns your order system expects.

Each RMA can map to exactly one exchange order - the duplicate guard makes a double-process impossible.

What's inside the Implementation Plan

  • It starts by interviewing you about your business. Before a single line is built, the plan has the AI agent ask you about your real returns process, your RMA and order number formats, your pricing fields, your approval rules, and your messy edge cases. It reads back a short tailored spec, you confirm it, and only then does it build - so you get a tool shaped around how you actually work, not a generic template.
  • A step-by-step build, each step ending in a ready-to-paste prompt.
  • A data model tuned to your order and RMA fields, your SKU conventions, and your currency.
  • Even-swap, upgrade, and downgrade delta logic with the rounding and tax rules you specify.
  • The "No API yet?" fallback: load orders and RMAs from a Google Sheet or CSV today, and export a clean CSV for your system - so it's fully buildable this weekend with zero integration work.
  • A verification checklist so you know it works before anyone relies on it.

The governance it includes (this is the point)

This isn't a toy. The plan builds in the controls that make a tool safe to put in front of real customer orders:

  • Login so only your team can open it.
  • Row-level security so each user only ever sees their own organization's orders and RMAs.
  • A full audit trail - who built which exchange, who approved it, what the delta was, and when.
  • A hard human-in-the-loop approval gate - the tool drafts the linked exchange and the price delta, an agent reviews it, and nothing is committed until a person approves.
  • A duplicate guard - one RMA maps to exactly one exchange order, so the same return can't be turned into two replacement orders.

Who it's for

CSRs and returns-team members who process exchanges all day and are tired of stitching them together by hand across two screens - and the supervisors who have to approve and answer for them.

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.