Simulate Order Placement
simulate_order_placementPlaces a simulated order by validating stock, decrementing inventory, calculating totals from catalog prices, and returning a receipt. Rejects the entire order if any item is unavailable.
Instructions
Write-action tool: places a new simulated order, validating stock availability for every line item, decrementing inventory counts, computing the order total from current catalog prices, and returning a success receipt with the updated stock levels. Rejects the entire order (no partial writes) if any item is unavailable or under-stocked. The whole read-validate-write runs inside the provider's transaction, so a concurrent order cannot both pass a stock check and oversell. This permanently changes the dataset until reset_demo_state is called.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| items | Yes | One or more line items for this order. | |
| customer_name | Yes | Full name of the customer placing the order. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| receipt | Yes | ||
| success | Yes | ||
| updatedStockLevels | Yes |