Record an order
order_createRecord a new order in the connected shop. Input includes paymentMode, and items[]. Each item can be of type 'catalog' (with productId), 'department' (with price and deptId) or 'free' (with title and price). Check if the client already exists using data_list_clients and if the client exists, only specify idClient. If provided, paymentMode should correspond to a payment ID from data_list_payments_modes tool. Returns a sale confirmation JSON including: a link to the PDF invoice, and a link to a private order page showing full order details which can also be used by the client to pay online. IMPORTANT: before creating a validated invoice (payment ≠ -2), call account_show_infos to verify that shopName, adressline1, and companyRegistrationNum are all set. If any of these fields are empty, warn the user and suggest using account_edit to fill them in before issuing invoices.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| items | Yes | List of sale items (at least one required) | |
| client | No | Inline customer details (used when no existing idClient) | |
| idUser | No | Staff member ID to assign the sale to | |
| idtable | No | Table ID for table-service orders | |
| payment | No | Payment method ID; omit to leave as unpaid quote | |
| idClient | No | Existing customer ID (alternative to inline client object) | |
| idcaisse | No | Cash register ID | |
| pagerNum | No | Pager/buzzer number for the customer | |
| numcouverts | No | Number of covers/guests | |
| publicComment | No | Comment visible on the receipt | |
| deliveryMethod | No | Delivery method: 0=takeaway, 1=delivery, 2=on-site, 3=drive, 4=relay, 5=table service, 6=room service | |
| privateComment | No | Internal staff-only comment |