Adjust stock
hub_adjust_stockChange the count of ONE variant at ONE outlet — the cabinet's "Adjust Inventory" action. CONFIRM WITH THE MERCHANT FIRST, repeating the product, the outlet, the reason and the number: this writes immediately, is permanently recorded against the employee in the stock history, and there is no undo from here. Reasons: STOCK_RECEIVED (a delivery arrived) and RESTOCK_RETURN (a return put back on the shelf) ADD the quantity; DAMAGE, THEFT and LOSS SUBTRACT it; INVENTORY_RECOUNT SETS the count to exactly the quantity you pass (a physical stocktake). Always pass quantity as a positive number — the reason decides the direction. Pick the reason the merchant actually gave; these end up in reports, so recording theft as damage misstates their loss. If stock is not tracked for that variant at that outlet, NOTHING is written and the result says applied: false — do not report success, and do not read it as "the stock is 0". Tracking has to be turned on for the product first. To move units between outlets use create_stock_transfer instead.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| action | Yes | Why the count changed. Adds: STOCK_RECEIVED, RESTOCK_RETURN. Subtracts: DAMAGE, THEFT, LOSS. Sets: INVENTORY_RECOUNT | |
| outletId | Yes | Outlet id from get_outlets — the adjustment applies only there | |
| quantity | Yes | Always positive. Units added or removed — or, for INVENTORY_RECOUNT, the new total on hand | |
| productId | Yes | Product id from get_products | |
| variantId | Yes | Variant id from get_products — the exact variant being counted |