Android Order Skill (点餐)
This skill uses the paired Android device (OpenClaw SMS Demo app with order capability) to manage an in-app menu and cart: get menu, add/remove items, view cart, submit order. Inspired by EdgeOSToolService (MEOW PAY); implementation is in-memory on the device (demo, no real POS backend).
When to use this skill
- User asks to order food/drinks, view menu, add to cart, or submit an order on the paired Android device: use the
order.* commands below.
Commands overview
| Command |
Description |
order.getGoods |
Return menu (id, name, priceCents, price). |
order.getSelectedGoods |
Return current cart with quantities and subtotals. |
order.addGoods |
Add by id or name (and optional quantity). |
order.removeGoods |
Remove by id or name (and optional quantity). |
order.clearGoods |
Clear cart. |
order.submitOrder |
Submit cart as order; returns summary (demo only). |
order.batchAddGoods |
Add multiple items: list = [{"id":"1","quantity":2},...]. |
How to call the underlying commands
Invoke via the OpenClaw gateway node invoke API:
- command: one of
order.getGoods, order.getSelectedGoods, order.addGoods, order.removeGoods, order.clearGoods, order.submitOrder, order.batchAddGoods.
- paramsJSON: JSON object string, or
null for no-param commands.
order.getGoods
command: "order.getGoods"
paramsJSON: null or "{}"
- Success: payload is a JSON array of
{ "id", "name", "priceCents", "price" }.
order.getSelectedGoods
command: "order.getSelectedGoods"
paramsJSON: null or "{}"
- Success: payload is a JSON array of cart items with
id, name, quantity, priceCents, subtotalCents.
order.addGoods
command: "order.addGoods"
paramsJSON: provide id or name (or both); optional quantity (default 1).
{ "id": "1", "quantity": "2" }
or
{ "name": "拿铁", "quantity": "1" }
Success: payload includes success: true and message (e.g. "已添加 拿铁 x1").
order.removeGoods
command: "order.removeGoods"
paramsJSON: same shape as addGoods (id or name, optional quantity).
order.clearGoods
command: "order.clearGoods"
paramsJSON: null or "{}".
order.submitOrder
command: "order.submitOrder"
paramsJSON: null or "{}".
- Success: payload includes
success, message, totalCents, items. Cart is cleared after submit.
- Error:
CART_EMPTY if cart is empty.
order.batchAddGoods
command: "order.batchAddGoods"
paramsJSON: { "list": "[{\"id\":\"1\",\"quantity\":2},{\"id\":\"2\",\"quantity\":1}]" }
- Success: payload includes
success and message (e.g. "已批量添加 2 项").
Error handling
- GOODS_NOT_FOUND: No menu item matched the given id or name. Suggest calling
order.getGoods to see the menu.
- NOT_IN_CART: Item not in cart when removing.
- CART_EMPTY: Cannot submit when cart is empty.
- INVALID_REQUEST: Missing or malformed params (e.g. empty
list for batchAddGoods).
Demo menu (default on device)
The in-app menu includes items such as: 拿铁, 美式, 卡布奇诺, 三明治, 沙拉, 蛋糕 (with ids "1"–"6"). Use order.getGoods to get the current list and prices.
Safety notes
- This is a demo flow: submit order does not charge or send to a real POS. Do not expose as real payment.
- Prefer confirming with the user before submitting an order (e.g. read back cart and total).
1---2name: android-order3description: Order food/drinks (点餐) on an Android device paired as an OpenClaw node. Uses in-app menu and cart; add goods, view cart, submit order (demo, no real payment).4---56# Android Order Skill (点餐)78This skill uses the paired Android device (`OpenClaw SMS Demo` app with order capability) to manage an in-app menu and cart: get menu, add/remove items, view cart, submit order. Inspired by EdgeOSToolService (MEOW PAY); implementation is in-memory on the device (demo, no real POS backend).910## When to use this skill1112- User asks to order food/drinks, view menu, add to cart, or submit an order on the paired Android device: use the `order.*` commands below.1314## Commands overview1516| Command | Description |17|--------|-------------|18| `order.getGoods` | Return menu (id, name, priceCents, price). |19| `order.getSelectedGoods` | Return current cart with quantities and subtotals. |20| `order.addGoods` | Add by `id` or `name` (and optional `quantity`). |21| `order.removeGoods` | Remove by `id` or `name` (and optional `quantity`). |22| `order.clearGoods` | Clear cart. |23| `order.submitOrder` | Submit cart as order; returns summary (demo only). |24| `order.batchAddGoods` | Add multiple items: `list` = `[{"id":"1","quantity":2},...]`. |2526## How to call the underlying commands2728Invoke via the OpenClaw gateway node invoke API:2930- **command**: one of `order.getGoods`, `order.getSelectedGoods`, `order.addGoods`, `order.removeGoods`, `order.clearGoods`, `order.submitOrder`, `order.batchAddGoods`.31- **paramsJSON**: JSON object string, or `null` for no-param commands.3233### order.getGoods3435- `command`: `"order.getGoods"`36- `paramsJSON`: `null` or `"{}"`37- Success: payload is a JSON array of `{ "id", "name", "priceCents", "price" }`.3839### order.getSelectedGoods4041- `command`: `"order.getSelectedGoods"`42- `paramsJSON`: `null` or `"{}"`43- Success: payload is a JSON array of cart items with `id`, `name`, `quantity`, `priceCents`, `subtotalCents`.4445### order.addGoods4647- `command`: `"order.addGoods"`48- `paramsJSON`: provide **id** or **name** (or both); optional **quantity** (default 1).4950 ```json51 { "id": "1", "quantity": "2" }52 ```53 or54 ```json55 { "name": "拿铁", "quantity": "1" }56 ```5758- Success: payload includes `success: true` and `message` (e.g. "已添加 拿铁 x1").5960### order.removeGoods6162- `command`: `"order.removeGoods"`63- `paramsJSON`: same shape as addGoods (`id` or `name`, optional `quantity`).6465### order.clearGoods6667- `command`: `"order.clearGoods"`68- `paramsJSON`: `null` or `"{}"`.6970### order.submitOrder7172- `command`: `"order.submitOrder"`73- `paramsJSON`: `null` or `"{}"`.74- Success: payload includes `success`, `message`, `totalCents`, `items`. Cart is cleared after submit.75- Error: `CART_EMPTY` if cart is empty.7677### order.batchAddGoods7879- `command`: `"order.batchAddGoods"`80- `paramsJSON`: `{ "list": "[{\"id\":\"1\",\"quantity\":2},{\"id\":\"2\",\"quantity\":1}]" }`81- Success: payload includes `success` and `message` (e.g. "已批量添加 2 项").8283## Error handling8485- **GOODS_NOT_FOUND**: No menu item matched the given id or name. Suggest calling `order.getGoods` to see the menu.86- **NOT_IN_CART**: Item not in cart when removing.87- **CART_EMPTY**: Cannot submit when cart is empty.88- **INVALID_REQUEST**: Missing or malformed params (e.g. empty `list` for batchAddGoods).8990## Demo menu (default on device)9192The in-app menu includes items such as: 拿铁, 美式, 卡布奇诺, 三明治, 沙拉, 蛋糕 (with ids "1"–"6"). Use `order.getGoods` to get the current list and prices.9394## Safety notes9596- This is a demo flow: submit order does not charge or send to a real POS. Do not expose as real payment.97- Prefer confirming with the user before submitting an order (e.g. read back cart and total).