Agent context
Shopify models
3 SQL models that turn the raw Shopify tables into the reports people ask about. Deploy them in Weld and your agent queries the definitions behind every number.
How the set is built
- 11Raw tables
- 11Staging
- 4Core
- 3Analytics
Staging cleans each raw table once, core holds the logic, and analytics is the table dashboards and agents read.
- Sales Over TimeRecreates Shopify's "Total sales over time" on Shopify's own event grain, so returns land on the refund date and order edits on the edit date. Returns the full sales equation plus parity variants, the returns detail block, gift-card columns, and location, sales-channel, country and fulfilment dimensions.grain: day x store x order x location x channel x row type · 8 raw tables
- Product Sales Over TimeThe sales equation at line grain - day x store x order x line - read from the agreement event log, so it reconciles to the sales report. Carries COGS and gross profit from Shopify's own cost history.10 raw tables
- Sales by ProductRecreates Shopify's "Total sales by product": units, orders and revenue for every product, variant and SKU per day, so you can rank top sellers and break the numbers down by product type or vendor.grain: product x variant (SKU) x day, on the ORDER date · 3 raw tables
- Weld or dbt
- The same SQL in both dialects. Sync the folder with GitHub Sync, or copy the dbt models into your project.
- Check before you rely on it
- Reconcile a month against Shopify's own reports first. Each model's notes say what the synced data can and can't support.
Connect Shopify.
Your agents start with context.
Sync Shopify to your warehouse, deploy these models, and query them from Claude, Cursor or ChatGPT over MCP. Free for 14 days, no credit card.