What it does
WooCommerce emails you about every order but never about the day. Store owners end up opening Analytics in wp-admin each morning, setting the date to yesterday and comparing it in their head with last week.
The agent reads yesterday's totals from WooCommerce Analytics, lines them up with the same weekday a week earlier, and adds the five products that sold best. The card lands before you open the laptop, and a slow day shows up next to its reason: fewer orders, smaller baskets, or a coupon that ran wider than planned.
How it works
1Read yesterday and the 13 days before
Call
GET /wp-json/wc-analytics/reports/revenue/stats?interval=day&after=<14 days ago>T00:00:00&before=<yesterday>T23:59:59&per_page=14with your consumer key and secret over HTTPS, using the store's local dates. Each entry inintervalshassubtotalswithgross_sales,net_revenue,orders_count,coupons,refunds,shippingandtaxes.- 2
2Work out the day
Net sales is
net_revenue(gross sales less coupons and refunds). Average order value is net sales divided byorders_count. Compare yesterday with the same weekday last week, since weekend and weekday sales differ more than any trend. 3Find the best sellers
Call
GET /wp-json/wc/v3/orders?after=<yesterday>T00:00:00&before=<yesterday>T23:59:59&status=processing,completed&per_page=100, add upline_itemsbyproduct_id(quantity andtotal), and keep the top 5. Note whichcoupon_linescodes were used most.- 4
4Post the tile
Net sales is the headline with 14 days of history; orders, average order value and refunds go in the glance, and the breakdown and top products in the opened card.
Post it to the board
With
BRIEFKIN_TOKENset, the agent sends the result as one card that updates in place every run. Without it, you get the report in the chat.
Install and run it
Pick your agent, where the data comes from and how to schedule it; the commands below follow.
Install the skill
One command. It puts the SKILL.md in ~/.claude/skills and in ~/.agents/skills, which Codex, Cursor, Gemini CLI, Copilot CLI and OpenCode read too.
shell
curl -fsSL https://briefkin.dev/skills/woocommerce-daily-sales-report/install | shRun it
Ask Claude Code:
prompt
Run the woocommerce-daily-sales-report skillOr paste the prompt instead of installing:
prompt
Using the WooCommerce REST API on my store (wc-analytics/reports/revenue/stats with interval=day for the last 14 days, and wc/v3/orders for yesterday), give me yesterday's net sales, orders, average order value (net sales divided by orders) and refunds, each compared with the same weekday last week. Show gross sales, coupons, refunds, shipping and taxes for yesterday, the top 5 products by revenue, and the coupon codes used most. End with one line on what explains the day.Put it on a schedule
Daily at 8:00, from cron on any machine where Claude Code is signed in:
crontab
0 8 * * * claude -p "Run the woocommerce-daily-sales-report skill"Add it with
crontab -e. A laptop asleep at that time runs it when it wakes if you use launchd or Task Scheduler instead; GitHub Actions works for the API route.Send it to your board
Connect Briefkin once with
curl -fsSL https://briefkin.dev/install | shand every run lands on your board as a stat tile. How setup works
View the SKILL.mdRaw file
SKILL.md---
name: woocommerce-daily-sales-report
description: "Every morning: yesterday's WooCommerce net sales, orders and average order value against the same day last week, with the best-selling products. Use when the user asks for this, or when it runs on a schedule."
---
# WooCommerce daily sales report
Every morning: yesterday's WooCommerce net sales, orders and average order value against the same day last week, with the best-selling products.
WooCommerce emails you about every order but never about the day. Store owners end up opening Analytics in wp-admin each morning, setting the date to yesterday and comparing it in their head with last week.
The agent reads yesterday's totals from WooCommerce Analytics, lines them up with the same weekday a week earlier, and adds the five products that sold best. The card lands before you open the laptop, and a slow day shows up next to its reason: fewer orders, smaller baskets, or a coupon that ran wider than planned.
## Two ways to get the data
Use the API or MCP route when you have an MCP server, a CLI or an API token for the app. Otherwise, if you can drive a browser the user is signed in to (Claude in Chrome, a Playwright or Chrome DevTools MCP server), use the browser route. Say which one you used.
## Route A: API or MCP server
### What you need
- A WooCommerce REST API key with Read permission (WooCommerce > Settings > Advanced > REST API), in `WC_CONSUMER_KEY` and `WC_CONSUMER_SECRET`, and the store URL on HTTPS.
- WooCommerce Analytics enabled (it is on by default). The WooCommerce MCP integration is in developer preview as of October 2026 and covers orders and products, not Analytics.
If something is missing, say what and stop; do not invent numbers.
### Steps
1. **Read yesterday and the 13 days before** (WooCommerce): Call `GET /wp-json/wc-analytics/reports/revenue/stats?interval=day&after=<14 days ago>T00:00:00&before=<yesterday>T23:59:59&per_page=14` with your consumer key and secret over HTTPS, using the store's local dates. Each entry in `intervals` has `subtotals` with `gross_sales`, `net_revenue`, `orders_count`, `coupons`, `refunds`, `shipping` and `taxes`.
2. **Work out the day**: Net sales is `net_revenue` (gross sales less coupons and refunds). Average order value is net sales divided by `orders_count`. Compare yesterday with the same weekday last week, since weekend and weekday sales differ more than any trend.
3. **Find the best sellers** (WooCommerce): Call `GET /wp-json/wc/v3/orders?after=<yesterday>T00:00:00&before=<yesterday>T23:59:59&status=processing,completed&per_page=100`, add up `line_items` by `product_id` (quantity and `total`), and keep the top 5. Note which `coupon_lines` codes were used most.
4. **Post the tile**: Net sales is the headline with 14 days of history; orders, average order value and refunds go in the glance, and the breakdown and top products in the opened card.
## Route B: the browser
### What you need
- Signed in to the store's WordPress admin with the Shop manager or Administrator role, which is what WooCommerce Analytics requires.
If something is missing, say what and stop; do not invent numbers.
### Steps
Start at https://example.com/wp-admin/admin.php?page=wc-admin&path=%2Fanalytics%2Frevenue. The user is signed in already; never type passwords or codes, and ask if a sign-in page appears.
1. **Open Analytics > Revenue in your own wp-admin**: The URL is on your own site, so replace `example.com` with the store's domain, or sign in to wp-admin and open **Analytics > Revenue**. Set **Date range** to a custom range covering the last 14 days ending yesterday and **Interval** to `Day`; the table under the chart gives one row per day with gross sales, returns, coupons, net sales, taxes, shipping and orders.
2. **Work out yesterday against the same weekday last week**: From the table take yesterday's row and the row seven days earlier. Net sales and orders come straight from the columns; average order value is net sales divided by orders. Give each number with its change.
3. **Find the best sellers and coupons**: Open **Analytics > Products**, set the date range to yesterday and sort the table by **Net sales** for the top 5. Then **Analytics > Coupons** for the same day to see which codes were used most.
4. **Write the tile**: Net sales is the headline with the 14 daily values from the Revenue table as history; orders, average order value and refunds (the returns column) go next to it, then the breakdown and the products. The **Download** button on each report gives a CSV when the table is long.
Note: Analytics uses the statuses and date type set under Analytics > Settings, so it can differ from the Orders list. The tables fill from a background import; if a day looks short, the Settings page has an **Import historical data** button that catches it up. Multi-site owners need one run per store.
## The report
- **Net sales** yesterday and the change on the same day last week, with 14 days of history.
- **Orders**, **average order value** and **refunds**, each with its change.
- **The breakdown**: gross sales, coupons, refunds, shipping and taxes.
- **Top 5 products** by revenue, and the coupon codes used most.
- One line on what moved the day.
## Post it to Briefkin
When `BRIEFKIN_TOKEN` is set, or `~/.config/briefkin/env` exists (the installer from https://briefkin.dev/docs writes it), also send the result to the user's Briefkin board as one card. Keep the `item_key` the same on every run so the card updates in place, use a new `event_id` per run, and put today's real numbers in place of the example ones. If the request fails, say so once and carry on.
```bash
[ -n "${BRIEFKIN_TOKEN:-}" ] || . ~/.config/briefkin/env
curl -sS -X POST "${BRIEFKIN_URL:-https://briefkin.dev}/v1/events" \
-H "authorization: Bearer $BRIEFKIN_TOKEN" \
-H "content-type: application/json" \
-d @- <<'JSON'
{
"v": 1,
"event_id": "woocommerce-daily-sales-report/<date of this run, e.g. 2026-10-16>",
"item_key": "woocommerce-daily-sales-report",
"project": "Acme Store",
"source": "WooCommerce daily sales report skill",
"kind": "metric",
"title": "Net sales $3,184 yesterday, up 14%",
"metric": {
"label": "Net sales",
"value": 3184,
"prefix": "$",
"better": "higher",
"period_start": "<start of the period, ISO 8601>",
"period_end": "<end of the period, ISO 8601>"
},
"glance": [
{
"type": "Grid",
"props": {
"columns": 3
},
"children": [
{
"type": "Stat",
"props": {
"label": "Orders",
"value": 41,
"delta": 11
}
},
{
"type": "Stat",
"props": {
"label": "Avg order value",
"value": 77.66,
"prefix": "$",
"delta": 3
}
},
{
"type": "Stat",
"props": {
"label": "Refunds",
"value": 86,
"prefix": "$",
"better": "lower"
}
}
]
}
],
"widget": [
{
"type": "KeyValue",
"props": {
"items": [
{
"key": "Gross sales",
"value": "$3,412"
},
{
"key": "Coupons",
"value": "-$142"
},
{
"key": "Refunds",
"value": "-$86"
},
{
"key": "Net sales",
"value": "$3,184"
},
{
"key": "Shipping",
"value": "$296"
},
{
"key": "Taxes",
"value": "$241"
}
]
}
},
{
"type": "Table",
"props": {
"columns": [
"Product",
"Sold",
"Revenue"
],
"align": [
"left",
"right",
"right"
],
"rows": [
[
"Organic cotton tee",
18,
"$540"
],
[
"Canvas tote",
12,
"$336"
],
[
"Wool beanie",
9,
"$297"
],
[
"Ceramic mug",
11,
"$242"
],
[
"Linen apron",
4,
"$188"
]
]
}
},
{
"type": "Callout",
"props": {
"text": "The cotton tee sold 18 the day after the newsletter, and 9 of the 41 orders used the code FALL10.",
"tone": "info"
}
}
],
"size": "md"
}
JSON
```
Widgets come from the Briefkin catalog (https://briefkin.dev/v1/catalog). Without a token, just give the user the report.
Set `period_start` and `period_end` to the window the number covers: the tile names it from them ("Last 7 days", "Today", "This month"). For a count right now (open items, a balance), send `"period_label": ""` so no period shows; for another name, send it as `period_label` (at most 24 characters).
## Run it on a schedule
Suggested: Daily at 8:00 (`0 8 * * *`). From cron, with the agent signed in on that machine:
```bash
0 8 * * * claude -p "Run the woocommerce-daily-sales-report skill"
# Codex: codex exec, Gemini CLI: gemini -p, Copilot CLI: copilot -p, OpenCode: opencode run
```
Or use the agent's own scheduler (Claude Code routines, Codex automations, Claude or ChatGPT scheduled tasks): https://briefkin.dev/skills/woocommerce-daily-sales-report#schedule
Source: https://briefkin.dev/skills/woocommerce-daily-sales-report
What your agent needs
A WooCommerce REST API key with Read permission (WooCommerce > Settings > Advanced > REST API), in
WC_CONSUMER_KEYandWC_CONSUMER_SECRET, and the store URL on HTTPS.WooCommerce Analytics enabled (it is on by default). The WooCommerce MCP integration is in developer preview as of October 2026 and covers orders and products, not Analytics.
Connecting WooCommerce
- WooCommerce MCP, built into WooCommerce and in developer preview (as of October 2026). Turn on the
mcp_integrationfeature (wp option update woocommerce_feature_mcp_integration_enabled yes) and the store serves MCP athttps://yourstore.com/wp-json/mcp/mcp-adapter-default-server, with abilities to query, create and update products and orders. Connect through WordPress's MCP proxy with an Application Password:claude mcp add --env WP_API_URL=https://yourstore.com/wp-json/mcp/mcp-adapter-default-server --env WP_API_USERNAME=<user> --env WP_API_PASSWORD=<application-password> --transport stdio woocommerce -- npx -y @automattic/mcp-wordpress-remote@latest. Codex and Cursor take the same command and variables (docs). - REST API with keys. Under WooCommerce > Settings > Advanced > REST API, add a key with Read permission, and store
WC_STORE_URL,WC_CONSUMER_KEY(ck_...) andWC_CONSUMER_SECRET(cs_...). Requests use basic auth over HTTPS.
A Read-permission REST key can't change orders or products. For the MCP route, WooCommerce recommends a dedicated WordPress user with only the capabilities the client needs, since orders hold customers' personal details.
Questions
Why doesn't it match the Orders page?
Analytics leaves out the order statuses listed under Analytics > Settings > Excluded statuses (pending, failed and cancelled by default) and dates orders by the date type set there. It also fills its tables from a background import, so an order placed a minute ago can show up a little later.
Does it need a reporting plugin?
No. Analytics ships with WooCommerce and its REST routes accept the same consumer key and secret as the rest of the API. Give the key Read permission only; the skill never writes to the store.
Do I need Briefkin to use the WooCommerce daily sales report skill?
No. The skill runs with your own agent and gives you the report in the chat. With a Briefkin token set, each run also posts it to your board as a stat tile, so you can glance at it instead of asking again.
Which agents can run it?
Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot CLI, OpenCode, Windsurf and Amp all read SKILL.md files. The install command puts it in ~/.claude/skills and ~/.agents/skills, where they look. ChatGPT, the Claude app and Grok take the prompt instead. Pick your agent under "Install and run it" and the commands change to match.
Can it work without an API or MCP server, from my browser?
Yes. Switch the data source to "Your browser" and the steps change to the WooCommerce pages themselves: the agent opens example.com/wp-admin/admin.php?page=wc-admin&path=%2Fanalytics%2Frevenue in a browser you are signed in to and reads the numbers off the page. Claude Code, Codex, Cursor, Claude app and ChatGPT can drive a browser out of the box; Gemini CLI, Copilot CLI and OpenCode need a Playwright or Chrome DevTools MCP server first. It is slower than the API and needs you signed in, so it suits a report you run by hand or from a scheduler on your own computer.