Skip to main content
When a SourceMedium number and Shopify’s disagree, this skill finds out why. Your coding agent pulls both sides for the same days, matches them order by order, and attributes the whole difference to named causes: a different timezone, a different day for a refund, a different rule for which orders count. Most differences are two tools counting different things, not missing data.

Prerequisites

The install command requires npx, which comes with Node.js 18+. Run node -v to check. If you see “command not found,” install Node.js from nodejs.org first. The skill works on every plan through your SourceMedium connection. It reads the SourceMedium side with custom SQL, so the teammate running it needs data access to all brands; see member data access. It also uses the SM BigQuery Analyst skill and Python 3.9+. For Shopify’s side, the agent uses the first of these it can:
  1. Your SourceMedium connection’s Shopify tools. run_shopifyql_report reads Shopify Analytics, the data behind Shopify’s own reports, with nothing to export. It needs Shopify’s permission to read reports: a store connected before November 2026 gains it when you reconnect Shopify.
  2. A raw Shopify table you selected under Warehouse → Raw data, on any paid plan.
  3. A browser the agent may drive, signed in to your Shopify admin with permission to view reports.
  4. A CSV you export from Shopify and hand to the agent.

Install

If your agent does not support automatic install through the skills CLI, copy the skill folder into that agent’s configured skills directory.

Update

After updating, start a new agent session so it lists your connection’s current tools.

Quick start

Paste this into your coding agent and replace the number and dates with your own.

What it does

Counts the same thing on both sides. It reads Shopify’s figure the way Shopify reports it, by each row’s own day, and re-buckets SourceMedium’s days into the store’s timezone, padding the window by a day on each side. Matches orders, not totals. Orders are matched by their Shopify ID. Orders only one side has, and orders whose amounts differ, are listed individually. Names every difference. The whole gap is split into named classes that add up to the headline difference: refunds dated differently, refunds across the window edge, orders SourceMedium leaves out as not valid, draft and point-of-sale channels, currency, and anything still unexplained. Never calls data wrong from a total. If something stays unexplained, the report says so and shows the orders behind it.

What you get


Valid orders

Which orders SourceMedium counts, and why some Shopify orders are left out.

Refund logic

Which date a refund counts on, and how exchanges book.