INVSTOCK: Stock Level
Site-level stock record for a component, tracking quantities for consumables and listing individual assets for tracked items.
Default definition. This article describes the default
INVSTOCK definition shipped with DemandFlow. Administrators can add, remove, rename, or re-type fields, change which ones are required, and alter the layout from the Definitions screen in Settings. Your tenant's current schema may differ from what is shown here. To read the current definition at any time, GET the DEFINITION object whose id matches INVSTOCK.Entity properties
| Property | Value |
|---|---|
| Entity code | INVSTOCK |
| Display name | Stock Level |
| Plural | Stock Levels |
| Level | 55000 |
Use cases
Unified stock position record: one per component per site. For consumables (indAsset=false), qtyOnHand/qtyReserved track aggregate quantities. For individually tracked items (indAsset=true), qtyOnHand reflects the count of COMPINV records and the Individual Assets panel shows each one.
Fields
Stock Identity
| Field | Type | Required | Notes |
|---|---|---|---|
name | text | Yes | Auto-generated or manual label, e.g. 'SFP-10G @ London DC' |
siteId | reference → SITE | Yes | Site. |
componentId | reference → COMP | Yes | Component. |
bomId | reference → BOM | The BOM this stock is associated with | |
status | enum | Valid ids: active (Active), lowStock (Low Stock), outOfStock (Out of Stock), discontinued (Discontinued). | |
binLocation | text | Shelf, bin, or storage location reference | |
notifyUserId | reference → user | User to notify when stock falls to or below reorder level |
Quantities
| Field | Type | Required | Notes |
|---|---|---|---|
qtyOnHand | number | Yes | Qty On Hand. |
qtyReserved | number | Qty Reserved. | |
qtyAvailable | number | On hand minus reserved | |
reorderLevel | number | Trigger alert when on-hand falls to this level | |
reorderQty | number | Suggested quantity to order | |
minStock | number | Minimum Stock. | |
maxStock | number | Maximum Stock. | |
unitCost | number | Unit Cost. |
Activity & Counting
| Field | Type | Required | Notes |
|---|---|---|---|
lastMovementDate | date | Date of the last INVTX affecting this stock | |
lastCountDate | date | Last Count Date. | |
lastCountQty | number | Last Count Qty. | |
variance | number | Difference between counted qty and system qty at time of count | |
notes | text (multi-line) | Notes. |
Relationships
- Lookups:
siteIdpoints at aSITErecord;componentIdpoints at aCOMPrecord;bomIdpoints at aBOMrecord;notifyUserIdpoints at a user. - Related lists:
INVTX,COMPINV.
Creating a Stock Level via the API
POST /v1/objects
Authorization: Bearer <your-pat>
Content-Type: application/json
{
"entity": "INVSTOCK",
"level": 55000,
"comboKey": "SUB:<your-sub-id>|ENT:",
"name": "Example",
"siteId": "",
"componentId": "",
"qtyOnHand": 1
}
Listing Stock Levels
# All records in your tenant
GET /v1/entities/INVSTOCK/SUB:<your-sub-id>