AstroBaaS

Orders & fulfilment

Reorder One-Click

Free — GPL coresize Mplanned, not built

Generated from docs/plan/core/reorder-one-click/PLAN.md in the AstroBaaS repository. Nothing described below is implemented — it is the written plan for it.

Repeat customers must re-browse and re-add items to cart, reducing repeat purchases. This feature allows one-click reordering to increase customer lifetime value.

The problem

My repeat customers have to hunt for products they already bought. One-click reorder would reduce friction and increase repeat-purchase rate by 15% (industry data).

What it does

  • Add ‘Reorder’ button on customer’s past order in their account dashboard (storefront feature, customer-facing)
  • Clicking ‘Reorder’ pre-fills a new cart with the same items, quantities, and variants from the previous order
  • Skip out-of-stock items with warning: ‘Item X is out of stock and was not added’
  • Keep order notes/tags (internal staff notes) — do NOT copy to new order
  • Allow customer to modify quantity or remove items before checkout
  • Track reorder origin (which previous order spawned this cart) in order_metadata for analytics
  • Expose reorder endpoint via storefront API for headless implementations

What it deliberately does NOT do

Each boundary carries its reason. A boundary without a reason gets crossed by the next person who reads this.

  • Automatic subscription/recurring orders — that is subscription management, separate feature
  • Personalized recommendations based on past orders — that is recommendation engine, separate feature
  • Reorder with price updates (automatic discount based on first order price) — that is pricing logic, separate feature

Data model

orders.reordered_from (nullable order_id, tracks which previous order spawned this one). No schema migration if orders already extensible; otherwise add field.

API

  • GET /api/customers/:customerId/orders — list customer’s past orders (already exists, but confirm ‘reorder’ endpoint)
  • POST /api/customers/:customerId/orders/:orderId/reorder — create cart from previous order
  • GET /api/carts/:cartId — cart includes ‘reordered_from’ field if it’s a reorder

Every route added here must also appear in src/pages/openapi.json.ts — a test fails the build if it does not.

Admin

No admin UI; this is storefront feature. Storefront shows customer’s past orders with ‘Reorder’ button on each order. Clicking opens pre-populated cart with items. Storefront can show ‘Reordered from Order #123’ on checkout page.

The seam — why this is core

Core owns reorder entity link (reordered_from field) and cart pre-population logic. Storefront (Next.js) owns UI and customer experience. No paid seam — reordering is customer convenience.

Core owns the interface + honest reorder tool; customer convenience is infrastructure, not a per-country obligation or credential.

Dependencies

  • Existing customers, orders, order_items collections
  • existing cart/checkout system
  • storefront (Next.js app) to render Reorder button

Acceptance checks

Each of these must be able to fail. Before claiming this is done, break the code deliberately and watch each one go red.

  • Fetch customer’s past order and call reorder endpoint; confirm cart is created with all items from past order
  • Verify out-of-stock items are skipped with warning message
  • Confirm cart shows ‘Reordered from Order #123’ metadata
  • Modify quantity in reordered cart and verify changes don’t affect original order
  • Proceed to checkout from reordered cart and confirm order is created with reordered_from link

Risks

Reorder with products that have changed variants (e.g., removed size) can cause issues. Implement fallback: if variant no longer exists, offer customer to choose new variant or skip item. Reorder can be spam vector if abused for discount stacking; monitor for abuse patterns.

Commercial context

Suggested pricefree (core)
Rival anchorShopify: included (via apps); Magento: included

The anchor is what the nearest equivalent charges on Shopify or Magento today. It is context for a pricing decision, not the decision.


Generated from the commerce plan. See docs/COMMERCE-PLAN.md for the full catalogue and ../../AI-GUIDE.md for how to work on this repository.