ERP: Change the stock of several items
erp_stock_batchChange the stock of SEVERAL catalog items in ONE proposal (one confirmation card for all lines). mode='recount': each 'quantity' is what was counted («актуальний залишок B1 — 50, C — 120»); mode='receive': each 'quantity' arrived without a document («прийшло 100 шт B1»; the stock history says «Надходження»); mode='adjust': each 'quantity' is a ± change (write-offs negative). Use it also for ONE line when the person reports a count or an arrival. 'item' as the person said it (name words, number/SKU or barcode) — the server finds the item; any line that matches several items or none refuses the proposal and names the candidates of every such line: ask the person once (offer the candidates as choices), then call again with ALL lines using the item numbers. 'warehouse' only when the company has several (the refusal lists them). Proposed write: the card shows item: before → after for each line. A supplier's invoice or receipt as a photo/PDF goes through the bot's intake instead. CONFIRMATION: this tool is PROPOSED, never performed directly. You get status='confirmation_required' with an action_id and a plan_token, and the write happens only after confirm_action.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"mode": "<mode>",
"lines": "<lines>"
},
"name": "erp_stock_batch"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mode | Yes | ||
| lines | Yes | ||
| reason | No | ||
| warehouse | No |