Skip to content
Topolo Platform Topolo Docs
Open workspace
Documentation

Inventory

Items, locations, signed stock movements, review metadata and CSV upserts, with accurate dashboard and organization privacy boundaries.

On this page

Choose an authorized workspace#

Inventory maintains item records, locations, a signed movement ledger, CSV import jobs and movement review settings. Auth owns canonical workspace identity, creation, rename and default selection. Discover exact granted Inventory resources through CLI or MCP; bootstrap only returns identity projections. Reads do not initialize a local mirror; creation and settings can do so.

Build an item catalog#

Create items with a unique workspace SKU, optional unit and nonnegative low-stock threshold; initial stock is zero. A missing SKU derives from the ASCII name slug. Items remain readable after archival, while new movement creation refuses them. Updating an archived item with omitted status writes active; explicitly preserve archived when editing without reactivation.

Add locations and record signed movements#

The first location is default and later locations are not; no published location deletion or default-changing action exists. Record one nonzero signed delta against an active item and a location in the same workspace. Quantities sum all deltas across locations and may be negative or fractional. Type labels do not enforce sign or create paired transfer entries. Repeated calls create additional ledger rows.

Understand what review actually changes#

A positive configured threshold flags new movements when their absolute delta meets or exceeds it. Null disables review for future movements. A pending movement already contributes to stock, and rejection changes review metadata without reversing quantity or emitted notifications. Only pending rows can be reviewed once. Correcting stock requires a separately authorized opposite movement; the original record remains.

Import CSV with explicit overwrite scope#

CSV requires sku and name headers and at least one row. Optional description, unit and lowStockThreshold fields are supported, quoted commas and escaped quotes work within a line, and multiline quoted values are unsupported. Each successful row upserts by workspace/SKU, preserving an existing id but replacing descriptive fields/threshold and status active. A repeated import makes a new job. Failed parsing or batch execution retains a failed job and can emit a notification.

Read dashboard and widget counts correctly#

The dashboard includes active item and low-stock counts, all locations and the newest 100 movements, with ten recent rows. Its movementCount is capped at 100. The widget counts all ledger rows and gives zero-filled movement volume/net delta series for seven UTC calendar dates; every review status contributes. A granted workspace can be ready with zero data. No count proves a delivered notification.

Separate ledger success from external effects#

After movement insertion, the service can emit low-stock/out-of-stock/adjustment/review notifications and one unit of stock_movements usage. Threshold changes and review decisions do not emit those effects on their own. The movement response proves a local row, not live recipient delivery or accepted metering. Notifications are conditional on configured integration context.

Handle archive and organization privacy deliberately#

Workspace archival requires a local mirror and no items, locations, imports, settings or movements, including archived and failed records. Canonical Auth archival precedes local mirror removal without a cross-service transaction. Organization export reads six stores across every local workspace, returns raw column names and creator/free-text data, and does not redact those fields. Erasure refuses pending reviews/processing imports, deletes movements before the core batch, verifies residual counts and may partially fail across databases. Auth identity, other-owner delivered data and backups remain; later authorized writes can recreate local rows.

Execute and verify from worked examples#

Verify credential identity, pinned organization and environment; discover exact action and granted resource, validate input, inspect the unchanged plan and authorize its effects. Perform the stated follow-up reads and keep returned identifiers. Examples use real local SQLite with synthetic Auth/grants and simulated integrations; native typed agent guidance is stored separately from readable Markdown.

Action reference#

Browse Inventory actions

Evidence#

Captured exported Worker responses use both real local SQLite D1 databases with all six committed migrations, synthetic Auth/workspace grants and simulated Notify/Nexus/archive transport. They prove local handler shapes and scoped behavior, not live authorization, notification delivery, metering acceptance or environment deployment. Large 100-row list/capped-dashboard captures are retained in local evidence; committed tests verify those limits while worked guides use smaller complete responses.