---
name: shopify-abandoned-checkouts
description: "Every Monday: how many Shopify checkouts were abandoned last week, the value left behind, and how many from the week before were recovered. Use when the user asks for this, or when it runs on a schedule."
---

# Shopify abandoned checkouts

Every Monday: how many Shopify checkouts were abandoned last week, the value left behind, and how many from the week before were recovered.

An abandoned checkout is a customer who got as far as giving you an email address and then left. Shopify records each one and sends the reminder, but the Abandoned checkouts page is a list, not a trend, and the recovery rate is nowhere on it.

The agent counts them every week, totals the value left in carts, checks how many from the week before were completed in the end, and lists the products that keep coming up. Founders see the money on the table; marketers see whether the recovery emails earn their place.

## 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 or connector with the `read_orders` scope, which covers abandoned checkouts; add `read_customers` only if you want names in the report.
- The Admin API access token in `SHOPIFY_ADMIN_TOKEN` with the store's `myshopify.com` domain, or a Shopify MCP server the agent can call.

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

### Steps

1. **Pull last week's abandoned checkouts** (Shopify): Query the Admin GraphQL API `abandonedCheckouts(first: 250, query: "created_at:>=<last Monday>")`, paging with `pageInfo.endCursor`, and keep `createdAt`, `completedAt`, `totalPriceSet.shopMoney.amount` and the `lineItems` titles and quantities.
2. **Check the week before for recoveries** (Shopify): Run the same query for checkouts created 8 to 14 days ago. Those with a `completedAt` were recovered (the `recovery_state:recovered` query filter gives the same set); dividing them by the total gives a recovery rate on checkouts that had a full week to come back.
3. **Total and group**: Sum and count last week's checkouts, and group line items by product to find the ones abandoned most. Bucket by cart value too: a store that loses most of its value above $150 has a shipping or payment question.
4. **Post the tile**: Abandoned value is the number, where lower is better, with 8 weeks of history. The glance shows the count, recovery rate and recovered value; the card opens to the products table.

## Route B: the browser

### What you need

- Signed in to the Shopify admin as a staff member with the Orders permission, which includes abandoned checkouts, and with Export allowed.

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

### Steps

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

1. **Open Abandoned checkouts for last week**: Open `https://admin.shopify.com/checkouts` (Orders, then `Abandoned checkouts`; pick the store first if you have several). Add a `Date` filter from last Monday to last Sunday and read the number of checkouts and the `Total` column.
2. **Export when the list is long**: The list shows 50 checkouts per page. Over about 100, click `Export`, choose the current filter and CSV; the file includes line items, which the next step needs.
3. **Measure recovery on the week before**: Change the date filter to 8 to 14 days ago and add `Recovery status` `Recovered`. Recovered count over the total for that range is the recovery rate; sum their totals for recovered value.
4. **Group products and value bands**: From the export (or by opening checkouts), count how often each product appears and its value, and count checkouts over $150 with their share of the value.
5. **Write it up**: Abandoned value and count for last week, recovery rate and recovered value for the week before, the top 5 products, the value bands, and one thing to try.

Note: Shopify only records a checkout once the shopper enters an email or phone number, and deletes abandoned checkouts older than three months, so the history in the UI is short. Recovered means the order was completed by any route, not only through the reminder email.

## The report

- **Abandoned value** last week, with an 8-week trend.
- **Abandoned checkouts**: count and average value.
- **Recovery rate** and recovered value, measured on the week before so reminders had time to work.
- **Products** that appear most in abandoned checkouts.
- **Value bands**, when most of the loss sits in large carts.

## 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-abandoned-checkouts/<date of this run, e.g. 2026-10-16>",
  "item_key": "shopify-abandoned-checkouts",
  "project": "Acme Store",
  "source": "Shopify abandoned checkouts skill",
  "kind": "metric",
  "title": "$14,380 left in abandoned checkouts last week",
  "metric": {
    "label": "Abandoned checkout value",
    "value": 14380,
    "prefix": "$",
    "better": "lower",
    "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": "Checkouts",
          "value": 212,
          "better": "lower"
        }
      },
      {
        "type": "Stat",
        "props": {
          "label": "Recovery rate",
          "value": 10.6,
          "unit": "%"
        }
      },
      {
        "type": "Stat",
        "props": {
          "label": "Recovered",
          "value": 1512,
          "prefix": "$"
        }
      }
    ]
  },
  "widget": [
    {
      "type": "Table",
      "props": {
        "columns": [
          "Product",
          "Checkouts",
          "Value"
        ],
        "align": [
          "left",
          "right",
          "right"
        ],
        "rows": [
          [
            "Merino crew sweater",
            41,
            "$3,690"
          ],
          [
            "Waxed canvas tote",
            33,
            "$1,980"
          ],
          [
            "Leather card holder",
            29,
            "$1,015"
          ],
          [
            "Wool beanie",
            24,
            "$720"
          ],
          [
            "Linen shirt",
            18,
            "$1,170"
          ]
        ]
      }
    },
    {
      "type": "Callout",
      "props": {
        "text": "Carts over $150 are 38 of the 212 checkouts but $7,020 of the value. Check what shipping costs at that size before blaming the reminder emails.",
        "tone": "warn"
      }
    }
  ],
  "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: Mondays at 7:00 (`0 7 * * 1`). From cron, with the agent signed in on that machine:

```bash
0 7 * * 1 claude -p "Run the shopify-abandoned-checkouts 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-abandoned-checkouts#schedule

Source: https://briefkin.dev/skills/shopify-abandoned-checkouts
