Commerce Inventory
Track stock levels, reservations, and adjustments across locations.
How It Works
- Check stock and availability for SKUs across all locations.
- Adjust inventory with a reason code (
received, damaged, cycle_count, correction).
- Reserve stock for pending orders to prevent overselling.
- Confirm reservations on fulfillment or release on cancellation.
- Report updated availability, low-stock signals, and reorder points.
Usage
- CLI:
stateset-inventory ... or stateset-direct inventory <action>
- Writes require
--apply.
- MCP tools:
get_stock, create_inventory_item, adjust_inventory, reserve_inventory, confirm_reservation, release_reservation.
Permissions
- Read:
get_stock — no --apply needed.
- Write:
create_inventory_item, adjust_inventory, reserve_inventory, confirm_reservation, release_reservation — requires --apply.
Examples
stateset inventory get-stock --sku WIDGET-001 --location loc_main
stateset inventory adjust --sku WIDGET-001 --qty 50 --reason received --apply
stateset inventory reserve --sku WIDGET-001 --qty 5 --order-id ord_456 --apply
stateset inventory release-reservation res_789 --apply
Status Flows
Reservation: Pending -> Confirmed (or Released/Expired)
Adjustment: Submitted -> Applied
Output
{"status":"adjusted","sku":"WIDGET-001","available":75,"reserved":10,"on_hand":85,"location_id":"loc_main"}
Present Results to User
- Updated stock levels (
available, reserved, on_hand) per location.
- Any low-stock or reorder warnings with suggested quantities.
- Reason notes and adjustment amounts applied.
- Reservation IDs created or released.
Troubleshooting
- Insufficient stock: check reservations and
on_hand counts; release stale reservations.
- Unknown SKU: ensure the product and inventory item exist via
create_inventory_item.
- Negative available: reservations exceed on-hand; investigate and correct with adjustment.
- Location mismatch: verify the
location_id exists in commerce-warehouse.
Error Codes
INSUFFICIENT_STOCK: Available quantity is below the requested amount.
UNKNOWN_SKU: No inventory item exists for the given SKU.
RESERVATION_EXPIRED: Reservation timed out and was automatically released.
Related Skills
- commerce-warehouse — warehouse locations and bin management
- commerce-fulfillment — pick tasks consume reserved inventory
- commerce-products — product catalog linked to inventory items
- commerce-backorders — tracks unfulfilled demand when stock is zero
References
- references/inventory-commands.md
- /home/dom/stateset-icommerce/cli/.claude/skills/commerce-inventory/SKILL.md
- /home/dom/stateset-icommerce/examples/workflows.md
1---2name: commerce-inventory3description: Manage inventory counts, adjustments, and stock health. Use when running `stateset-inventory`, `stateset-direct inventory`, checking low-stock levels, or managing reservations.4---56# Commerce Inventory78Track stock levels, reservations, and adjustments across locations.910## How It Works11121. Check stock and availability for SKUs across all locations.132. Adjust inventory with a reason code (`received`, `damaged`, `cycle_count`, `correction`).143. Reserve stock for pending orders to prevent overselling.154. Confirm reservations on fulfillment or release on cancellation.165. Report updated availability, low-stock signals, and reorder points.1718## Usage1920- CLI: `stateset-inventory ...` or `stateset-direct inventory <action>`21- Writes require `--apply`.22- MCP tools: `get_stock`, `create_inventory_item`, `adjust_inventory`, `reserve_inventory`, `confirm_reservation`, `release_reservation`.2324## Permissions2526- **Read:** `get_stock` — no `--apply` needed.27- **Write:** `create_inventory_item`, `adjust_inventory`, `reserve_inventory`, `confirm_reservation`, `release_reservation` — requires `--apply`.2829## Examples3031```bash32stateset inventory get-stock --sku WIDGET-001 --location loc_main33stateset inventory adjust --sku WIDGET-001 --qty 50 --reason received --apply34stateset inventory reserve --sku WIDGET-001 --qty 5 --order-id ord_456 --apply35stateset inventory release-reservation res_789 --apply36```3738## Status Flows3940**Reservation:** Pending -> Confirmed (or Released/Expired)4142**Adjustment:** Submitted -> Applied4344## Output4546```json47{"status":"adjusted","sku":"WIDGET-001","available":75,"reserved":10,"on_hand":85,"location_id":"loc_main"}48```4950## Present Results to User5152- Updated stock levels (`available`, `reserved`, `on_hand`) per location.53- Any low-stock or reorder warnings with suggested quantities.54- Reason notes and adjustment amounts applied.55- Reservation IDs created or released.5657## Troubleshooting5859- Insufficient stock: check reservations and `on_hand` counts; release stale reservations.60- Unknown SKU: ensure the product and inventory item exist via `create_inventory_item`.61- Negative available: reservations exceed on-hand; investigate and correct with adjustment.62- Location mismatch: verify the `location_id` exists in commerce-warehouse.6364## Error Codes6566- `INSUFFICIENT_STOCK`: Available quantity is below the requested amount.67- `UNKNOWN_SKU`: No inventory item exists for the given SKU.68- `RESERVATION_EXPIRED`: Reservation timed out and was automatically released.6970## Related Skills7172- commerce-warehouse — warehouse locations and bin management73- commerce-fulfillment — pick tasks consume reserved inventory74- commerce-products — product catalog linked to inventory items75- commerce-backorders — tracks unfulfilled demand when stock is zero7677## References78- references/inventory-commands.md79- /home/dom/stateset-icommerce/cli/.claude/skills/commerce-inventory/SKILL.md80- /home/dom/stateset-icommerce/examples/workflows.md