store/list-top-products ranks the best-selling products for a date range, by money taken or by units sold.
Calculated from the order lines, so it reflects what was actually bought rather than what a summary table thinks was.
At a glance
| Ability | store/list-top-products |
| Toolset | WooCommerce — toolset/woocommerce |
| Group | WooCommerce › Sales Insight |
| Requires | WooCommerce, active on the site |
| Capability | manage_options |
| Safety | Read-only — changes nothing |
| Repeatable | Idempotent — running it twice leaves the same result |
| Ships in | AcrossAI Abilities Manager 0.0.34 and later |
How it works
The two rankings answer different questions and disagree more often than people expect. Ranked by revenue you see what pays the bills; ranked by units you see what people actually want, which is what drives stock decisions and what tells you which cheap item is quietly bringing everybody to the shop.
The figures come from the order lines rather than the analytics tables, for the same reason as the sales summary: those tables can be empty, mid-import or stalled, and a confidently wrong ranking is worse than a slow one.
Processing and completed orders only. A product that appears in a lot of failed orders is an interesting signal about a payment problem, but it is not a best-seller.
Line-level counting means a variable product’s variations are counted as the lines they were sold as.
Input
| Name | Type | Required | What it is |
|---|---|---|---|
from | string | No | Start date, YYYY-MM-DD. |
to | string | No | End date, YYYY-MM-DD. |
rank_by | string | No | Rank by money taken or by units sold. |
limit | integer | No | How many products to return. |
What comes back
| Name | Type | What it is |
|---|---|---|
products | array | The ranked products with their revenue and unit counts. |
rank_by | string | The ranking used. |
currency | string | The store currency. |
source | string | Where the figures came from. |
success | boolean | Whether the call completed. |
message | string | A one-line summary of what happened, suitable for showing a human. |
error_code | string | Present only on failure — a stable machine-readable reason, such as a missing field, a wrong field type or an unmet confirmation. |
Example
Ask your assistant:
What sold best last quarter?
It resolves to one call:
{
"ability": "store/list-top-products",
"parameters": {
"from": "2026-07-01",
"to": "2026-09-30",
"rank_by": "revenue"
}
}Worth knowing
- Revenue and unit rankings disagree, and the disagreement is the useful part.
- Processing and completed orders only.
- Computed from order lines, not the analytics tables.
Related abilities
- Get Sales Summary — the totals these sit inside
- List Low Stock — whether the best-sellers are running out
Get the plugins:
AcrossAI Abilities Manager · AcrossAI MCP Manager
Browse the rest: Every ability, by category