30 days free. No credit card. Full access from the moment you connect your site.

Start free trial

List Top Products

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

Abilitystore/list-top-products
ToolsetWooCommerce — toolset/woocommerce
GroupWooCommerce › Sales Insight
RequiresWooCommerce, active on the site
Capabilitymanage_options
SafetyRead-only — changes nothing
RepeatableIdempotent — running it twice leaves the same result
Ships inAcrossAI 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

NameTypeRequiredWhat it is
fromstringNoStart date, YYYY-MM-DD.
tostringNoEnd date, YYYY-MM-DD.
rank_bystringNoRank by money taken or by units sold.
limitintegerNoHow many products to return.

What comes back

NameTypeWhat it is
productsarrayThe ranked products with their revenue and unit counts.
rank_bystringThe ranking used.
currencystringThe store currency.
sourcestringWhere the figures came from.
successbooleanWhether the call completed.
messagestringA one-line summary of what happened, suitable for showing a human.
error_codestringPresent 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 the plugins:
AcrossAI Abilities Manager · AcrossAI MCP Manager

Browse the rest: Every ability, by category


Keep reading