AI tools — Sales
5 tools. The latest schema is always in sales_tool_catalog once connected.
Search buyers
ReadScope:sales:readsales_customers_searchSearch buyers by name, customer code or phone, with order count, revenue (net of returns), outstanding debt, last purchase and owner.
| Parameter | Type | Required | Description |
|---|---|---|---|
q | string | no | Name, customer code or phone |
status | string | no | Customer status |
page | integer | no | Page, starting at 1 |
pageSize | integer | no | Rows per page, max 50 |
Or call over REST with an API key
curl -X POST https://api.nextx.vn/api/v1/ai/tools/sales/sales_customers_search/read \
-H "X-Api-Key: $API_KEY" -H "Content-Type: application/json" \
-d '{"q":"0901234567"}'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_customers_search",
"arguments": {
"args": {
"q": "0901234567"
}
}
}Orders by id
ReadScope:sales:readsales_orders_getSummary of orders by id list: code, type, status, customer, total, paid, outstanding, order date.
| Parameter | Type | Required | Description |
|---|---|---|---|
orderIds | string[] | yes | Order 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"
]
}
}
}Search orders
ReadScope:sales:readsales_orders_searchSearch orders by code, customer name or product name, filtered by order type, status, date range and unpaid orders; returns the total match count and one page.
| Parameter | Type | Required | Description |
|---|---|---|---|
q | string | no | Order code, customer name or product name |
status | string | no | Order status, comma-separated for several |
orderType | string | no | Order type, e.g. SALES_ORDER, PRE_ORDER |
dateFrom | string | no | Order date from (YYYY-MM-DD) |
dateTo | string | no | Order date to (YYYY-MM-DD) |
hasDebt | boolean | no | true = unpaid orders only |
page | integer | no | Page, starting at 1 |
pageSize | integer | no | Rows per page, max 50 |
Or call over REST with an API key
curl -X POST https://api.nextx.vn/api/v1/ai/tools/sales/sales_orders_search/read \
-H "X-Api-Key: $API_KEY" -H "Content-Type: application/json" \
-d '{"hasDebt":true,"dateFrom":"2026-10-01"}'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_search",
"arguments": {
"args": {
"hasDebt": true,
"dateFrom": "2026-10-01"
}
}
}Search products and stock
ReadScope:sales:readsales_products_searchSearch products by name, SKU or barcode, filtered by status and stock range; each row has price, current stock and minimum stock level.
| Parameter | Type | Required | Description |
|---|---|---|---|
q | string | no | Name, SKU or barcode |
status | string | no | ACTIVE or INACTIVE |
stockFrom | number | no | Stock from (>=) |
stockTo | number | no | Stock to (<=); 0 for out-of-stock items |
page | integer | no | Page, starting at 1 |
pageSize | integer | no | Rows per page, max 50 |
Or call over REST with an API key
curl -X POST https://api.nextx.vn/api/v1/ai/tools/sales/sales_products_search/read \
-H "X-Api-Key: $API_KEY" -H "Content-Type: application/json" \
-d '{"stockTo":0}'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_search",
"arguments": {
"args": {
"stockTo": 0
}
}
}Stock by branch
ReadScope:sales:readsales_products_stockStock of one product broken down by branch.
| Parameter | Type | Required | Description |
|---|---|---|---|
productId | string | yes | Product 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"
}
}
}