Create a sales order
create_sales_orderDraft a sales order for a customer in these books, for delivery and invoicing later. A line with an item and no unit_price is priced by the price rules exactly as on the website; a line nothing can price is REFUSED, never filled in at $0.00 — ask the user for the price. confirm: true opens it straight away, otherwise it is a draft. Usually queued for the account holder to approve (read staged). Nobody is invoiced or charged by this.
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": {
"customer_id": "<customer_id>",
"lines": "<lines>"
},
"name": "create_sales_order"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| memo | No | ||
| lines | Yes | ||
| confirm | No | Open the order now instead of saving a draft. | |
| entity_id | No | Another entity in the same books (ids from `list_entities`). Leave out to use the entity the person is working in. | |
| tax_total | No | Sales tax on the order, if known. Default 0. | |
| order_date | No | ISO date. Default today. | |
| customer_id | Yes | From `list_customers`. | |
| customer_po | No | The customer's own purchase-order number. | |
| expected_date | No | ISO date the customer expects it. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | No | The created or updated record's id, when the write was applied rather than staged. | |
| note | No | Why the result was truncated, when it was. | |
| staged | No | TRUE means nothing has changed yet — the write is queued in the account holder's Approvals queue in Seayora. Say it is waiting for approval; never report it as done. | |
| draft_id | No | The staged proposal's id, when it was queued rather than performed. | |
| truncated | No | Present and true when the result was too large to return in full. Treat it as a partial answer. | |
| total_available | No | How many rows existed before truncation. |