Read yesterday's Shopify sales, orders and AOV in one morning card

Each morning: yesterday's Shopify net sales, order count, average order value and best-selling product, against the day before.

Runs
Every day at 7:15
Uses
Shopify
Posts
Stat tile

What lands on your board

Acme StoreNet sales$6,142+3% vs previous period, bettervs last report
Orders86+6.2% vs previous period, better
Average order$71.42-2.9% vs previous period, worse
Top productLinen tote
An example with made-up numbers. Your agent posts your real ones.

What it does

Store owners open the Shopify app before they get out of bed, see today's first two orders and learn nothing. The question worth answering in the morning is how yesterday went as a whole: sales, orders, basket size and what sold.

The agent closes yesterday in the shop's own timezone, leaves out test and canceled orders, and counts sales after discounts and returns, before shipping and tax, so the number holds up when you compare it with the month-end reports.

How it works

  1. 1Get the shop's timezone

    Query shop { ianaTimezone currencyCode } with the Admin GraphQL API and set yesterday from 00:00 to 24:00 in that zone.

  2. 2Pull yesterday's orders

    Page through orders(first: 250, query: "created_at:>='2026-10-15T00:00:00-04:00' created_at:<'2026-10-16T00:00:00-04:00'") with test, cancelledAt, discountCodes, currentSubtotalPriceSet and lineItems(first: 50) { nodes { quantity product { title } discountedTotalSet { shopMoney { amount } } } }, following pageInfo.endCursor.

  3. 3

    3Count net sales

    Leave out orders with test: true or a cancelledAt. Net sales is the sum of currentSubtotalPriceSet.shopMoney.amount (after discounts and returns, before shipping and tax); average order value is net sales divided by orders.

  4. 4

    4Find the top product

    Group line items by product, sum discountedTotalSet and quantity, and rank by sales. Keep the top five for the card.

  5. 5

    5Write the report

    Net sales, orders and average order value against the day before and the same weekday last week, the top product, the top five, and the discount codes used.

  6. Post it to the board

    With BRIEFKIN_TOKEN set, the agent sends the result as one card that updates in place every run. Without it, you get the report in the chat.

What you get

  • Net sales yesterday, against the day before and the same weekday last week.
  • Orders and average order value.
  • Top product by sales, and the top five with units and sales.
  • Discount codes used and refunds issued, if any.

Install and run it

Pick your agent, where the data comes from and how to schedule it; the commands below follow.

Agent
Data
Schedule
  1. 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.

    shellcurl -fsSL https://briefkin.dev/skills/shopify-daily-sales-report/install | sh
  2. Run it

    Ask Claude Code:

    promptRun the shopify-daily-sales-report skill

    Or paste the prompt instead of installing:

    promptUsing the Shopify Admin GraphQL API for my store (read only), report on yesterday from midnight to midnight in the shop's timezone. Pull every order created in that window, leave out test and canceled orders, and count net sales as the sum of currentSubtotalPriceSet (after discounts and returns, before shipping and tax). Give me net sales, the number of orders and average order value, each against the day before and the same weekday last week. Group line items by product and name the top product by sales, plus a top five with units and sales. Mention any discount codes used and refunds issued.
  3. Put it on a schedule

    Every day at 7:15, from cron on any machine where Claude Code is signed in:

    crontab15 7 * * * claude -p "Run the shopify-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.

  4. Send it to your board

    Connect Briefkin once with curl -fsSL https://briefkin.dev/install | sh and every run lands on your board as a stat tile. How setup works

View the SKILL.mdRaw file
SKILL.md---
name: shopify-daily-sales-report
description: "Each morning: yesterday's Shopify net sales, order count, average order value and best-selling product, against the day before. Use when the user asks for this, or when it runs on a schedule."
---

# Shopify daily sales report

Each morning: yesterday's Shopify net sales, order count, average order value and best-selling product, against the day before.

Store owners open the Shopify app before they get out of bed, see today's first two orders and learn nothing. The question worth answering in the morning is how yesterday went as a whole: sales, orders, basket size and what sold.

The agent closes yesterday in the shop's own timezone, leaves out test and canceled orders, and counts sales after discounts and returns, before shipping and tax, so the number holds up when you compare it with the month-end reports.

## 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 Shopify custom app (created in the Dev Dashboard, or in older stores under Settings, Apps and sales channels, Develop apps) with the `read_orders` and `read_products` Admin API scopes; its access token in `SHOPIFY_ADMIN_TOKEN` and the store's `.myshopify.com` domain.
- Or a Shopify connector or MCP server that can query the Admin API for your store.

If something is missing, say what and stop; do not invent numbers.

### Steps

1. **Get the shop's timezone** (Shopify): Query `shop { ianaTimezone currencyCode }` with the Admin GraphQL API and set yesterday from 00:00 to 24:00 in that zone.
2. **Pull yesterday's orders** (Shopify): Page through `orders(first: 250, query: "created_at:>='2026-10-15T00:00:00-04:00' created_at:<'2026-10-16T00:00:00-04:00'")` with `test`, `cancelledAt`, `discountCodes`, `currentSubtotalPriceSet` and `lineItems(first: 50) { nodes { quantity product { title } discountedTotalSet { shopMoney { amount } } } }`, following `pageInfo.endCursor`.
3. **Count net sales**: Leave out orders with `test: true` or a `cancelledAt`. Net sales is the sum of `currentSubtotalPriceSet.shopMoney.amount` (after discounts and returns, before shipping and tax); average order value is net sales divided by orders.
4. **Find the top product**: Group line items by product, sum `discountedTotalSet` and `quantity`, and rank by sales. Keep the top five for the card.
5. **Write the report**: Net sales, orders and average order value against the day before and the same weekday last week, the top product, the top five, and the discount codes used.

## Route B: the browser

### What you need

- Signed in to Shopify as the store owner or a staff member whose permissions include **Reports** and **Orders**; pick the store first if the account has several.

If something is missing, say what and stop; do not invent numbers.

### Steps

Start at https://admin.shopify.com/. The user is signed in already; never type passwords or codes, and ask if a sign-in page appears.

1. **Open the store's sales report**: From the store picker at admin.shopify.com, open the store, then **Analytics > Reports** and open **Sales over time**. Set the date picker to **Yesterday** and **Compare to: Previous day**. Analytics already uses the store's timezone.
2. **Read the day's totals**: Take **Net sales**, **Orders** and **Average order value** from the summary row, each with the change shown against the day before. Then change the comparison to a custom range for the same weekday last week and note those three numbers too.
3. **Rank the products**: Back in **Reports**, open **Sales by product**, keep the date on **Yesterday** and sort by **Net sales**. Read the top five with **Net items sold** and net sales.
4. **Check discounts and refunds**: Open the **Sales by discount** report for yesterday to see each code and the orders it was used on. Then go to **Orders**, filter **Date: Yesterday** and **Status: Refunded** or **Partially refunded**, and note the count and amounts.

Note: Shopify Analytics books a return on the day the refund happens, while the API route counts yesterday's orders at their current value, so net sales can differ slightly between the two routes. Test orders are already excluded from Analytics. Reports can take up to a few hours to catch up on the latest orders.

## The report

- **Net sales** yesterday, against the day before and the same weekday last week.
- **Orders** and **average order value**.
- **Top product** by sales, and the top five with units and sales.
- Discount codes used and refunds issued, if any.

## 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": "shopify-daily-sales-report/<date of this run, e.g. 2026-10-16>",
  "item_key": "shopify-daily-sales-report",
  "project": "Acme Store",
  "source": "Shopify daily sales report skill",
  "kind": "metric",
  "title": "Yesterday: $6,142 in sales from 86 orders",
  "metric": {
    "label": "Net sales",
    "value": 6142,
    "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": 86,
            "delta": 6.2
          }
        },
        {
          "type": "Stat",
          "props": {
            "label": "Average order",
            "value": 71.42,
            "prefix": "$",
            "delta": -2.9
          }
        },
        {
          "type": "Stat",
          "props": {
            "label": "Top product",
            "value": "Linen tote"
          }
        }
      ]
    }
  ],
  "widget": [
    {
      "type": "Table",
      "props": {
        "columns": [
          "Product",
          "Units",
          "Sales"
        ],
        "align": [
          "left",
          "right",
          "right"
        ],
        "rows": [
          [
            "Linen tote",
            31,
            "$1,209"
          ],
          [
            "Ceramic mug",
            22,
            "$528"
          ],
          [
            "Wool throw",
            4,
            "$440"
          ],
          [
            "Beeswax candle",
            17,
            "$323"
          ],
          [
            "Canvas apron",
            7,
            "$245"
          ]
        ]
      }
    },
    {
      "type": "KeyValue",
      "props": {
        "items": [
          {
            "key": "Discount codes",
            "value": "FALL15 on 12 orders"
          },
          {
            "key": "Refunds",
            "value": "1 order, $39"
          },
          {
            "key": "Same weekday last week",
            "value": "$5,480 from 79 orders"
          }
        ]
      }
    }
  ],
  "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: Every day at 7:15 (`15 7 * * *`). From cron, with the agent signed in on that machine:

```bash
15 7 * * * claude -p "Run the shopify-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/shopify-daily-sales-report#schedule

Source: https://briefkin.dev/skills/shopify-daily-sales-report

What your agent needs

  • A Shopify custom app (created in the Dev Dashboard, or in older stores under Settings, Apps and sales channels, Develop apps) with the read_orders and read_products Admin API scopes; its access token in SHOPIFY_ADMIN_TOKEN and the store's .myshopify.com domain.

  • Or a Shopify connector or MCP server that can query the Admin API for your store.

Connecting Shopify

  1. Shopify AI Toolkit. Shopify's plugins for Claude Code, Codex and Cursor run store tasks through Shopify CLI's authenticated store context. Its Dev MCP server (npx -y @shopify/dev-mcp@latest) covers docs and API schemas, not your store's orders; for store data, community MCP servers exist.
  2. Admin API with an app token. Create an app for the store, install it with read scopes such as read_orders, read_products and read_inventory, and store SHOPIFY_STORE_DOMAIN (acme.myshopify.com) and SHOPIFY_ACCESS_TOKEN. Requests go to https://acme.myshopify.com/admin/api/2026-10/graphql.json with the X-Shopify-Access-Token header. Orders older than 60 days also need read_all_orders.

Request only read_ scopes when you install the app; Shopify enforces them per token, so the agent can't edit products, refund or cancel orders.

Questions

Why doesn't it match Total sales in Shopify Analytics?

Total sales in Analytics includes shipping and taxes and books a return on the day it happens. This skill reports net sales of yesterday's orders, after discounts and returns and without shipping and tax, which is the number most owners track day to day.

Are POS and wholesale orders included?

Yes, every sales channel by default. To report the online store only, say so: the agent reads each order's sourceName and keeps web, or splits the card by channel.

Do I need Briefkin to use the Shopify 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 Shopify pages themselves: the agent opens admin.shopify.com 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.

Watch net sales on your board, run after run

Skills are free to use with any agent. Briefkin is where their results land: one board for every report, number and question your agents send, with a ping when something needs you.

Free during the open beta. No card.