ERP: Create a product
erp_product_createCreate a catalog item (a product, or kind='service'): name, sale price, optional cost (purchase price), number/article (generated if not said), barcode, short and full description, maker (the BRAND written on the product — another maker's product keeps its own brand) and characteristics {name: value}; in the SAME card also its goods 'category' (an existing name / «Parent / Child» path from erp_category_list; with new_category=true a name nobody has is created with the product — «Parent / New» inside Parent), the photos the person sent to the bot ('capture_ids', the first one main) and the stock on hand now ('quantity', + 'warehouse' when the company has several). A name that already matches a catalog item is refused naming it (change that item with erp_product_update) unless distinct=true. Without 'quantity' stock starts at 0. Proposed write: one card. 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": {
"name": "<name>",
"price": "<price>"
},
"name": "erp_product_create"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| cost | No | ||
| kind | No | ||
| name | Yes | ||
| price | Yes | ||
| number | No | The article ONLY when the person or the label gives one; leave it out otherwise — a short readable one (BRAND-NAME) is made. | |
| barcode | No | ||
| category | No | The goods category (name or «Parent / Child» path). | |
| currency | No | ||
| distinct | No | The person said it is a different product. | |
| quantity | No | How many are in stock now. | |
| warehouse | No | ||
| capture_ids | No | Photos the person sent to the bot (#numbers of their intake captures). | |
| description | No | ||
| manufacturer | No | ||
| new_category | No | Create 'category' with the product when no category has that name (only after proposing it to the person). | |
| characteristics | No | Characteristics as {name: value}, e.g. {"Форма": "капсули", "Кількість": "120"}. An empty value removes that characteristic. | |
| short_description | No |