Inventory reorder bot
A serverless bot that watches the stock level of every item you sell or use, spots the ones dropping below their reorder point (allowing for how fast each one sells and how long the supplier takes to deliver), and drafts a ready-to-send purchase order to the right supplier for the owner to approve. It never orders on its own — the owner approves, edits, or skips right from the alert. Seven posts on the same system — one diagram at a time — with an engineering reference at the end.
-
01
An inventory reorder bot on AWS for a few dollars a month
The whole system on one page — a stock intake, a checker, and a draft-PO piece, plus the four moves they share for every item.
-
02
How a stock level gets read
Three lanes keep the stock list current — the Drive sheet itself, an inbox-forwarding lane that parses stock-count sheets into proposed rows for one-tap approval, and a live POS lane that updates counts the moment something sells.
-
03
How the bot spots a low item
A daily check reads the stock list, works out a reorder point per item from sales rate and supplier lead time, and picks one of four moves: stocked, watch, reorder, urgent reorder. No model on the check.
-
04
How a draft PO reaches the owner
Supplier resolution per item, quiet hours, a sensible order quantity, a ready-to-send draft purchase order, and the four guardrails between the bot’s chosen move and the draft landing in front of the owner.
-
05
How a reorder gets approved
Three actions on the draft PO: approve (send to the supplier, mark on-order), edit (change quantity or supplier first), and skip (do nothing this round). Nothing is ever ordered without a human tap. Every action is logged.
-
06
What the inventory reorder bot costs
A couple of dollars a month at SMB volume. The bot runs once a day, calls no models on the check, and only fires Bedrock on the inbound parsing lane and the monthly summary.
-
07
Engineering reference: the inventory reorder bot architecture
Same system, drawn purely for engineers. Service names, resource identifiers, region, Bedrock model IDs, Lambda inventory, IAM scopes, the SES inbound rule set, EventBridge Scheduler config, and the DynamoDB schemas.
Frequently asked questions
- What is an inventory reorder bot?
- A small serverless system that watches the stock level of every item you sell or use, spots the ones dropping below their reorder point (allowing for how fast each one sells and how long the supplier takes to deliver), and drafts a ready-to-send purchase order to the right supplier for the owner to approve. It never places an order on its own. The owner can approve, edit, or skip directly from the alert.
- How much does it cost to run?
- About $2.40/month at typical small-business volume (around 200 tracked items). The fixed cost is essentially zero. The variable cost is dominated by the daily Lambda check that reads every item; Bedrock and Textract fire only on the inbound stock-count parsing lane and the monthly summary, so they’re small slivers. At 2,000 tracked items the bill lands around $13.
- Which AWS services does it use?
- Lambda (Python 3.14, arm64) with Function URLs for the approve button, EventBridge Scheduler for the daily check and deferred-send one-offs, DynamoDB on-demand, S3 (with versioning), SES inbound + outbound, Secrets Manager, CloudWatch Logs (7-day retention), AWS Budgets, and Bedrock (Claude Haiku 4.5 via Global cross-Region inference) for the inbound parsing and monthly summary. No API Gateway, no NAT Gateway, no always-on compute, no Knowledge Base.
- Where does the stock list live?
- In a Google Sheet in a Drive folder. One row per item with name, SKU, supplier, on-hand count, daily sales rate, supplier lead-time days, safety buffer, pack size, and unit cost. A small
drive-syncLambda mirrors the sheet to S3 every 15 minutes; the bot reads from S3 to keep Drive API calls predictable and to get S3 versioning for free. - Does the bot use AI?
- Sparingly. The daily check uses no AI — it’s plain Python that reads counts and decides on a move. Bedrock Haiku 4.5 fires only when somebody forwards a stock-count sheet or supplier price list (Textract + Haiku propose updated rows for human approval) and once a month for the board-summary narrative. Most of the system is deterministic by design.
- How does the bot decide when to reorder?
- It works out a reorder point for each item: how much stock you need on hand to cover sales while a new order is on its way, plus a small safety buffer. In plain terms: daily sales rate × supplier lead-time days, plus the buffer. When the on-hand count drops to or below that point, the item is due. The order quantity is rounded up to the supplier’s pack size and capped so it never orders a wild amount. All of these numbers live in the stock sheet, so changing one doesn’t need a deploy.
- What happens when I act on a draft PO?
- Three buttons on every draft: Approve sends the PO email to the supplier and marks the item on-order. Edit opens a modal to change the quantity, supplier, or note before sending. Skip does nothing this round; the bot re-checks tomorrow. Every action is recorded in the
ir-auditDynamoDB table with timestamp, item, action, by-user, and a before-and-after snapshot, so the trail is auditable for years and a wrong send can be traced.