AI tools — Sales

5 tools. The latest schema is always in sales_tool_catalog once connected.

Orders by id

ReadScope: sales:read
sales_orders_get

Summary of orders by id list: code, type, status, customer, total, paid, outstanding, order date.

ParameterTypeRequiredDescription
orderIdsstring[]yesOrder ids (max 100)

Or call over REST with an API key

curl -X POST https://api.nextx.vn/api/v1/ai/tools/sales/sales_orders_get/read \
  -H "X-Api-Key: $API_KEY" -H "Content-Type: application/json" \
  -d '{"orderIds":["0199a1b2-c3d4-7e5f-8a9b-0c1d2e3f4a5b"]}'
MCP call example (for AI assistants)

AI assistants send this call themselves when you ask in plain words; you only need it when debugging an MCP connection.

{
  "name": "sales_orders_get",
  "arguments": {
    "args": {
      "orderIds": [
        "0199a1b2-c3d4-7e5f-8a9b-0c1d2e3f4a5b"
      ]
    }
  }
}

Stock by branch

ReadScope: sales:read
sales_products_stock

Stock of one product broken down by branch.

ParameterTypeRequiredDescription
productIdstringyesProduct id (from sales_products_search)

Or call over REST with an API key

curl -X POST https://api.nextx.vn/api/v1/ai/tools/sales/sales_products_stock/read \
  -H "X-Api-Key: $API_KEY" -H "Content-Type: application/json" \
  -d '{"productId":"0199a1b2-c3d4-7e5f-8a9b-0c1d2e3f4a5b"}'
MCP call example (for AI assistants)

AI assistants send this call themselves when you ask in plain words; you only need it when debugging an MCP connection.

{
  "name": "sales_products_stock",
  "arguments": {
    "args": {
      "productId": "0199a1b2-c3d4-7e5f-8a9b-0c1d2e3f4a5b"
    }
  }
}