create_sales_order
Create a new sales order, updating inventory, transactions, and customer totals in a single transaction. Supports confirm and idempotency validation.
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": {
"farmId": "<farmId>",
"items": "<items>"
},
"name": "create_sales_order"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| tax | No | Tax amount (>= 0, default 0) | |
| items | Yes | List of order line items | |
| notes | No | Optional order notes (max 2000 chars) | |
| farmId | Yes | The unique farm ID | |
| status | No | Order status (default Pending) | |
| confirm | No | Set to true to commit, false for dry-run preview | |
| shipping | No | Shipping cost (>= 0, default 0) | |
| orderDate | No | Order date in YYYY-MM-DD format (defaults to today UTC) | |
| customerId | No | Existing customer ID | |
| fulfillment | No | Fulfillment method (default ship) | |
| newCustomer | No | ||
| customerEmail | No | Existing customer email | |
| paymentStatus | No | Payment status (default unpaid) | |
| idempotencyKey | No | Unique request idempotency key | |
| trackingNumber | No | REJECTED: Do not provide trackingNumber. |