Inventory fundamentals
Items, containers, lots, and the states stock moves through.
Inventory in Dalea tracks everything physical: vials, plates, tubes, frozen aliquots, kits, columns. It is not a system parallel to your data. An item type is a table in an environment and an item is a row in it, so your stock is part of the same schema, the same queries and the same provenance as the rest of your records.
What inventory adds on top is custody: where a thing is, who has it, which lot it came from, and how much of it is left.
The concepts
- Item type
- An inventory table in an environment. Defines the columns every item of that kind carries, including the quantity role and the unit that column is measured in. Designed in the schema designer.
- Item
- A row in an inventory table. One vial, one tube. Has a quantity, usually an expiration, and usually a placement inside a container.
- Container type
- A class of physical container: "9x9 cryobox", "PCR rack", "freezer shelf". Defines a position format and metadata. Configured in Inventory settings.
- Container
- An instance of a container type, in a place. "Cryobox L-204-B12 in freezer L-204". Containers nest.
- Lot
- A manufacturing batch. Multiple items can share a lot for full traceability.
Item types and items live in the data environment. Container types, containers, placements, lots and sessions live in inventory. The split is between what a thing is, which is schema, and where a thing is, which is custody.
Finding your way around
Inventory has three views, switched from the header of the Inventory page.
- Containers
- The landing view. The physical layout: drill from a room into a freezer, rack and plate. Empty slots open the add-items flow; occupied ones open the item drawer.
- Stock
- Stock levels per item type, stock over time with a projection, what needs attention, and the searchable item list. Filters on the list also drive the chart.
- Settings
- Item types, container types, label templates and import or export.
Items that are staged or checked out live in the Item Tray, a dropdown in the header. Its button counts checked-out items in amber and staged ones in blue; drag a chip from the tray onto an empty slot to place it.
Two independent states
An item does not travel down a single line. It carries two states at once, and they move independently.
Custody status answers "where is it?"
- staged
- Received, but you have not found it a home yet.
- placed
- Sitting in a container, at a position. A grid container type constrains that position to its grid.
- checked_out
- Out on a bench with someone. Still tracked, but not in its container.
- available
- Known and usable, with no placement and not staged or checked out.
- archived
- Removed from the working set. This is what the Discard action does: the row and its history stay, deliberately, so the trail survives.
- conflict
- The custody records disagree, e.g. an item that reads as both placed and checked out. Flagged rather than guessed at.
Items cycle through these repeatedly, but each hop has a precondition. An
available or staged item can be placed; a placed item can be moved or checked
out, which removes its placement; a checked-out item is returned to a container
and a position. That is why an item is never in two places at once, and why
conflict means something has gone wrong rather than something is in transit.
Quantity state answers "how much is left?" It is one of in_stock,
low_stock, depleted or untracked, and it is computed from the quantity
column rather than set by hand.
A vial can be checked_out and depleted, or placed and low_stock. The two
states are independent, but the operations that change them are not
interchangeable. Logging usage requires the item to be checked out by you, so an
item drawn to zero that way ends up checked_out and depleted. To correct a
placed item's quantity without taking it out of its box, use Adjust, which
has no custody precondition. Every transition is logged with operator and
timestamp, and both quantity operations require a reason.
Container types: why position formats matter
A container type's position format controls how items inside it are addressed:
- None: bare list. "Reagent shelf L-204-A". Items have no positional info.
- Numeric: numbered positions (1, 2, 3...). Nothing is constrained, so any position string is accepted.
- Grid: lettered rows and numbered columns. 96-well plates run A1 to H12, a 9x9 cryobox runs A1 to I9. Only positions inside the grid are accepted.
- Custom: an explicit list of position strings ("rotor slot 3", "carousel cell X14"). Set through the API; the container-type dialog offers the first three.
Grid containers get the grid view of their contents. A position holds at most one item on any container type, so placing a second item at A3 is rejected rather than silently overwritten.
SKUs
An item's SKU is its display ID, minted by the item type's display pattern in
exactly the way a naming scheme mints SMP-024 for a sample. A new inventory
table starts with ITEM-{###}. Set the pattern when you design the table:
AB-{###}gives AB-001, AB-002AB-{0001}zero-pads to a fixed width: AB-0007RX-{supplier}-{###}interpolates the item's ownsuppliercolumn
The tokens are the numeric counter ({###} or {0001}), the alphabetic counter
({A}, {AA}), {uuid} and {uuid:8}, and a column reference written as the
column's name. There is no date token: a year has to come from a real column,
and an unrecognised token resolves to an empty string.
The SKU is what gets printed on the label and read back when you scan.
Barcodes and labels
A label template carries a barcode element, and its symbology is one of Code-128, GS1-128, DataMatrix, GS1-DataMatrix, QR or GS1-QR. Printing produces a file: a PDF (an A4 sheet with cut guides, or one label per page) or a ZPL file at 203, 300 or 600 DPI for a Zebra-compatible thermal printer. Dalea does not talk to printers, so you send the file on yourself.
Which label an item prints with is set by the label type role column on its item type:
- The column's default value is the type-level default, so every vial of that kind prints the same label.
- An individual item's own cell overrides it, edited from the Label card on the item's page.
Only templates created as item labels can be used here, because a container or lot template resolves the wrong ids. On scan, Dalea opens the item's detail page directly, which makes a "scan to use" workflow practical.
Low stock
The quantity column of an item type can carry a low-stock threshold. When an
item's quantity falls to or below it, that item's quantity state becomes
low_stock.
The threshold surfaces the state; it does not page anyone. There are no watchers
and no reorder emails. What it gives you is a filterable signal: "every item in
this environment whose quantity state is low_stock" is one saved query, and it
is the honest way to run a reorder list.
Linking to records
An item type's entity link column points at the catalog table its stock instantiates: the Sample Stock table links to Test Articles, so eleven vials resolve to one compound record.
Because both sides are tables, the join is an ordinary query join. "Show me all results generated from antibody lot 24-119" and "total mL of DLA-7 on hand across every freezer" are the same kind of question, and both are answerable without leaving saved queries.
Receiving and consuming in bulk
Single items are fine to edit directly. Past ten, batch the work. There are three session types, all for intake and custody: receiving for a shipment, staging for items with no home yet, and checkout for items on a bench. Batch place and batch check-out move many items in one call.
Drawdown has no session. It is per item (Log Usage, or Adjust to correct a quantity), or an Inventory Operation block in a document, which applies many rows atomically. See receiving and consuming inventory.