Stock

The atomic inventory record. Tracks quantity, status, expiry, notes, and custom fields for a specific Variant (or bundle via Combination) at a Location.


Setup

  • On product/variant tables, click the Quantity or Available pill to open the stocks list.
  • The list shows AVAILABLE and ON_ORDER stocks with quantity > 0 by default. Use toggles to include quantity 0 and UNAVAILABLE statuses.
  • From the list, click “Add Stock” to create a record. Choose a Status, set quantity, optional expiry and note, and select the Location.
  • Save. Orders, returns, receipts, and adjustments will maintain these stocks automatically.

Attributes

stock.schema.ts
1type Stock = { 2 // Identity & audit 3 id: string; // uuid 4 modifiedAt?: Date; 5 modifiedById?: string; // uuid 6 modifiedByEmail?: string; 7 modifiedByEndpoint?: string; 8 9 // Company scoping 10 companyId: string; // uuid 11 company: Company; 12 13 // Core quantities and context 14 quantity: number; 15 expires?: Date; 16 note?: string; 17 customFields?: Json; // user-defined fields 18 19 // Relations 20 orderItem?: OrderItem | null; 21 statusId: string; // uuid 22 status: StockStatus; // e.g. available, reserved, damaged, inbound 23 variantId: string; // uuid 24 variant: Variant; // stock is tracked at variant level (or combination via variant) 25 locationId: string; // uuid 26 location: Location; // where the stock physically or virtually resides 27}

Inventory Flow

Adjustments

Manual corrections for shrinkage, audits, or reclassification between statuses and locations.

Orders & Reservations

Sales create reserved stock; shipments decrement available quantity. Returns add back to appropriate status.

Expiry & Short-Dated

Use expires plus variant-level thresholds to flag short-dated stock for actions like discounts.

Locations

Move stock between bins, rooms, or warehouses by editing the location on a stock record.

Statuses

Common statuses include AVAILABLE, ON_ORDER, and UNAVAILABLE. Configure custom statuses per company to match your operations. See Stock Status for types and sequencing.

FAQ

Copyright © 2025 Stockmate
All rights reserved