Websites
Inventory tracking for a small online store: every change recorded
Inventory tracking for a small online store means knowing how many of each item you have, with stock going down as orders arrive and a warning before it runs out. On OneCraft the agent writes it with the inventory guide: a stock movement for every change, stock levels and a low stock list, and deliveries and stocktakes in your site's admin.
A movement for every change
Stock changes only through movements. Each movement has a product, an optional variant and location, a quantity up or down, a reason (received, sold, returned, adjusted, stocktake or transfer), a reference such as the order id, and who made it. Movements are never edited or deleted; a mistake is fixed with another movement, so the history always adds up.
Orders take stock down
When place_order writes an order it adds a sold movement for each line in the same transaction, and a trigger updates the stock number the shop reads. A sold out product is refused at the moment of ordering. A cancel or refund adds a returned movement that puts the stock back.
Deliveries, stocktakes and transfers
In the admin, Receive stock lets you search products, enter quantities with a supplier and a reference, and save one received movement each. A stocktake shows a count sheet per location with on hand beside a Counted box, then a review of the differences before Apply records them. Transfer moves stock between locations as two linked movements.
Low stock and what buyers see
Each product has a reorder level, and a low stock view lists everything at or under it, with a count on the admin dashboard and a Low only filter. Product pages show lines such as Only 3 left or Sold out from the stock number. The stock tables are admin only; visitors see just that line on the product.
How it works, in three steps
Step 1
Ask for stock tracking
Mention stock, deliveries and stocktakes in the generator's brief for a shop, or ask in chat for inventory on a site that already has products and orders.
Step 2
Give it a database
Every plan gets a hosted site database, or you can connect your own Supabase account in the site's Settings, Database card. Connect Stripe in account Settings, Payments for card payments.
Step 3
Check it and publish
Sign in to /admin with the admin account the agent reports, try it in the preview, then publish from the builder on a paid plan.
Limits worth knowing
- Counts are typed: there is no barcode scanning, and the phone app has no camera.
- Inventory builds on the catalog and orders capabilities; a site without products has nothing to track.
- Stock is taken when an order is placed, before payment, so cancel unpaid orders to free their stock.
- A hosted database comes with every plan, or you can connect your own Supabase account in the site's Settings, Database card.
- The Free plan builds and previews a site but cannot publish it, connect a domain, take payments or run Expo builds.
Questions people ask
Does stock go down when an order is placed or when it is paid?
When it is placed. Place_order adds a sold movement for each line in the same transaction that writes the order, so two buyers cannot both take the last item. If the order is cancelled or refunded, a returned movement puts the stock back. An order left unpaid stays pending, so cancel it in the admin to free its stock.
Can I track stock in more than one place?
Yes. Movements can carry a location, such as a shop and a storeroom, and stock levels are shown per location when there are several. A stocktake count sheet is per location, and Transfer moves a quantity from one location to another as two linked movements, so the total stays right.
Can I type over a stock number to fix it?
No, by design. Once inventory exists, the stock number on a product changes only through movements, so the admin form does not let you type over it. To correct a count, record an adjusted movement or run a stocktake, which records the difference between on hand and what you counted, with your name and the time.
Does it track stock for each size and colour?
Yes, when the shop has variants that hold their own stock. Movements then name the variant, and each variant has its own reorder level, so a medium in black can show as low while the large is fine. Products without variants track one number.
Can I record suppliers?
Yes, when your brief mentions them. The agent adds a suppliers table with name, email, phone and notes, and Receive stock lets you pick the supplier and a reference such as their invoice number. The movement history then shows which delivery each unit came from.
Can I get stock levels into a spreadsheet?
Yes. With the csv capability, admin tables get an Export button that writes a CSV file in your browser and guards cells that start with a formula sign. That gives you on hand per product for your accountant, or a reorder list to send a supplier.
Make your own website
The button opens the generator with this use case already described. Change the wording to match yours, generate, then edit anything you like.
Create a website with OneCraftNot ready to start? See the AI website builder page first.
Related pages
Product variants for your online store: each combination with its own price
Product variants let one product in an online store come in several sizes or colours, each with its own price, stock and SKU. On OneCraft the agent writes them with the catalog guide when your brief mentions sizes or colours: a product_options table for the choices and a product_variants table for each combination.
Import products from CSV with a preview before anything is added
To import products from CSV, you match a spreadsheet's columns to your product fields and add the rows in one go. On OneCraft the agent writes the importer into your site's admin with the csv guide: pick a file, see the first 50 rows with problems marked, then insert them in batches, and export any admin table the same way.
Referral program for your website, with links and rewards
A referral program gives each customer a personal link and rewards them when a friend they sent buys. It pays only when rewards follow real purchases, not sign ups, and when the rules stop people referring themselves with throwaway accounts.
More finished work of this kind is on the website examples hub.
Written and checked by the OneCraft team. Last checked .