commerce.order_create
Creates a verified e-commerce customer order (COD or QR payment) with atomic inventory validation and deduction, server-side total calculation, and post-write database verification.
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": {
"customerName": "<customerName>",
"customerPhone": "<customerPhone>",
"customerAddress": "<customerAddress>"
},
"name": "commerce.order_create"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| size | No | Shorthand single-item size | |
| color | No | Shorthand single-item color | |
| items | No | Array of line items: [{ productId?, productName?, variant?, size?, color?, quantity }] | |
| siteId | No | Optional store Site ID | |
| variant | No | Shorthand single-item variant name | |
| quantity | No | Shorthand single-item quantity | |
| siteName | No | Optional store name (e.g. 'Pokhara Clothing') | |
| productId | No | Shorthand single-item product ID | |
| productName | No | Shorthand single-item product name | |
| customerName | Yes | Customer full name | |
| deliveryType | No | Delivery or pickup (default: 'delivery') | |
| customerEmail | No | Optional customer email | |
| customerPhone | Yes | Customer phone number | |
| paymentMethod | No | Payment method (default: 'cod') | |
| customerAddress | Yes | Delivery address |