place_order
Validates customer and items, inserts order lines, and completes order; automatically deletes incomplete orders on failure.
Instructions
The three-call legacy protocol, wrapped with compensation.
HDR_INS validates the customer and creates an 'I' header; each line is inserted with the sequence numbers the backend insists on; FIN totals, decrements stock, and flips the order to pending. If anything fails after the header exists, the incomplete order is DELETED (compensating action) — the backend has no cross-call transactions, so cleanup is the wrapper's job, not the agent's.
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>",
"items": "<items>"
},
"name": "place_order"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| items | Yes | ||
| customer_id | Yes |