Logo Light

How to Build an Inventory Stock Monitor That Updates Itself

Aug 20, 2026

Bagikan

Ask most small businesses what's actually in stock right now, and the honest answer is usually "let me go check." Someone counts the shelf, cross-references a spreadsheet that was last updated three days ago, and hopes nothing sold in between. Stock counts that live in a spreadsheet are only ever as accurate as the last time someone remembered to update them.

In this tutorial, we'll build an Inventory Stock Monitor — a system where each product's stock level updates itself automatically every time a sale or restock happens. Open the table, and the number you see is the number that's actually true right now.

Why this matters

Stock isn't really "one number" — it's the result of everything sold and everything restocked, added up over time. Instead of storing a number and manually correcting it, we'll let the system derive it directly from sales and restock records.


Step 1: Create the Product Table

Start with a table called Product. Add the fields Name, SKU (Text), and Unit Price (Currency, USD).

Product table with Name, SKU, and Unit Price columnsProduct table with Name, SKU, and Unit Price columns

Add a few products to work with:

  • Wireless Mouse — SKU WM-100 — $25.00
  • Mechanical Keyboard — SKU MK-200 — $65.00
  • USB-C Hub — SKU UC-300 — $40.00

Product table showing three records for Wireless Mouse, Mechanical Keyboard, and USB-C Hub with their pricesProduct table showing three records for Wireless Mouse, Mechanical Keyboard, and USB-C Hub with their prices

We'll add the stock level once we have real sales and restocks to calculate it from.


Step 2: Create the Sale Table

Create a new table called Sale. Add a One-to-Many field linking each sale to a Product, a Quantity field (Number), and a Date field.

Sale table with Product link, Quantity, and Date columnsSale table with Product link, Quantity, and Date columns

Add a few sample sales:

  • Wireless Mouse — Quantity 5 — 2026-08-20
  • Mechanical Keyboard — Quantity 2 — 2026-08-21
  • Wireless Mouse — Quantity 3 — 2026-08-22

Sale table listing three sale records for Wireless Mouse and Mechanical Keyboard with quantities soldSale table listing three sale records for Wireless Mouse and Mechanical Keyboard with quantities sold


Step 3: Create the Restock Table

Create another table called Restock, also linked to Product via a One-to-Many field. Add a Quantity field (Number) and a Date field.

Restock table with Product link, Quantity, and Date columnsRestock table with Product link, Quantity, and Date columns

Add a sample restock:

  • Wireless Mouse — Quantity 20 — 2026-08-15
  • Mechanical Keyboard — Quantity 10 — 2026-08-15
  • USB-C Hub — Quantity 15 — 2026-08-15

Restock table showing initial stock records for all three productsRestock table showing initial stock records for all three products


Step 4: Add the Stock Level Field

Now go back to the Product table. Add a new column and set its data type to Custom Logic — this needs to be chosen from the start, since a plain column can't be converted into one later.

Adding a new column on the Product table and selecting Custom Logic as the data typeAdding a new column on the Product table and selecting Custom Logic as the data type

Describe the rule: for each product, take the sum of all linked Restock quantities and subtract the sum of all linked Sale quantities, to get the current Stock Level.

Describing the stock level logic as total restocked quantity minus total sold quantityDescribing the stock level logic as total restocked quantity minus total sold quantity

Confirm the clarification screen once the system shows its interpretation, then click Save.

Clarification screen confirming the aggregation logic across Sale and Restock tables to compute Stock LevelClarification screen confirming the aggregation logic across Sale and Restock tables to compute Stock Level

What just happened

Every product's Stock Level calculated itself the moment you saved — Wireless Mouse at 12 (20 − 5 − 3), Mechanical Keyboard at 8 (10 − 2), and USB-C Hub at 15 (no sales yet) — all without a single manual count.

Product table showing the Stock Level column filled in automatically for all three productsProduct table showing the Stock Level column filled in automatically for all three products


Step 5: Watch a Sale Update Stock Instantly

Let's test it. Add a new sale: USB-C Hub — Quantity 4 — 2026-08-23.

Adding a new sale record for USB-C Hub with a quantity of four unitsAdding a new sale record for USB-C Hub with a quantity of four units

Go back to the Product table. USB-C Hub's Stock Level has already dropped from 15 to 11 — no refresh, no manual recalculation.

Product table showing USB-C Hub's Stock Level updated instantly after the new sale was recordedProduct table showing USB-C Hub's Stock Level updated instantly after the new sale was recorded

What this replaces

This replaces walking to the shelf to physically recount stock, or manually subtracting from a spreadsheet cell every time something sells — both easy to forget, and both prone to drifting away from what's actually on hand.


Step 6: Watch a Restock Update Stock Too

Now add a restock: Mechanical Keyboard — Quantity 15 — 2026-08-24.

Adding a new restock record for Mechanical Keyboard with a quantity of fifteen unitsAdding a new restock record for Mechanical Keyboard with a quantity of fifteen units

Mechanical Keyboard's Stock Level jumps from 8 to 23 immediately, reflecting the restock without any extra step.

Product table showing Mechanical Keyboard's Stock Level increased after the restock was recordedProduct table showing Mechanical Keyboard's Stock Level increased after the restock was recorded


Recap

What you had beforeWhat you have now
Manually recounting shelves or spreadsheet cellsStock Level calculated automatically from real activity
Numbers only accurate as of the last manual updateStock updates the instant a sale or restock happens
No quick way to see what's running lowA saved view surfacing products that need reordering

What you built:

  1. A Product table holding basic item details
  2. A Sale table linked to Product, tracking units sold
  3. A Restock table linked to Product, tracking units received
  4. A Custom Logic field on Product that continuously derives Stock Level from both linked tables

This same pattern — a running total derived from linked activity — works well beyond inventory too. Think available seats after bookings and cancellations, remaining budget after expenses, or available leave days after requests are approved.

Try it yourself

This Inventory Stock Monitor setup is available as a ready-made template. Duplicate it, plug in your own products, sales, and restocks..

Coba Langsung

Halaman ini

Artikel terkait

Jelajahi lebih banyak artikel produk dan praktik terbaik untuk tim yang membangun dengan Ambisius.

Masih Pakai Spreadsheet?
Wajib Coba Ini.

Ubah spreadsheet yang biasa digunakan menjadi sistem terstruktur yang dibangun untuk bisnis Anda

Coba Ambisius Gratis

Tanpa komitmen. Tanpa kartu kredit.

Logo Light

© 2026 Ambisius. Seluruh hak cipta dilindungi.

How to Build an Inventory Stock Monitor That Updates Itself