Reconcile revenue across all sales channels (Shopify, Etsy, Amazon) against QuickBooks and the Supabase operations database. Use this skill for daily reconciliation checks, weekly margin reports, monthly P&L preparation, or whenever discrepancies are detected between channel reports and financial records.
Ensure that revenue reported by each sales channel matches what's recorded in QuickBooks and the Supabase operations database. Catch discrepancies early — a $50 error today could be a $5,000 pattern by month-end.
| Frequency | Scope | Trigger |
|---|---|---|
| Daily (6 AM ET) | Previous day's orders across all channels vs. Supabase | Cron |
| Weekly (Monday 9 AM ET) | Week-to-date revenue by channel vs. QuickBooks | Cron |
| Monthly (2nd business day) | Full month P&L reconciliation | Cron + ceo review |
For each active channel, get yesterday's order totals:
Shopify:
Etsy (when live):
Amazon (when live):
Query orders table for the same date range:
SELECT channel,
COUNT(*) as order_count,
SUM(total_price) as gross_revenue,
SUM(total_discounts) as discounts,
SUM(total_shipping) as shipping_collected,
SUM(total_tax) as tax_collected
FROM orders
WHERE DATE(created_at) = DATE('yesterday')
AND financial_status != 'voided'
GROUP BY channel;
Compare channel source data vs. Supabase records:
| Check | Acceptable Variance | Action if Exceeded |
|---|---|---|
| Order count mismatch | 0 (exact match) | Flag immediately — missing orders |
| Revenue variance | <$5 or <0.5% | Log only |
| Revenue variance $5-$50 | N/A | Flag for ceo, 48-hour SLA |
| Revenue variance >$50 | N/A | Flag URGENT for ceo, 24-hour SLA |
| Refund not reflected | 0 (exact match) | Flag — refunds must propagate |
Daily reconciliation report format:
DAILY RECONCILIATION — 2026-03-20
═══════════════════════════════════
SHOPIFY
Orders: 12 (Supabase: 12) ✓
Gross Revenue: $1,847.50 (Supabase: $1,847.50) ✓
Refunds: $0.00 ✓
Net Revenue: $1,847.50 ✓
ETSY
Orders: 3 (Supabase: 3) ✓
Gross Revenue: $245.00 (Supabase: $245.00) ✓
DISCREPANCIES: None
DAILY TOTAL: $2,092.50 across 15 orders
Compare Supabase weekly totals against QuickBooks:
The most comprehensive check. Produces a full P&L comparison:
products.cogs_confirmed × units sold vs. QuickBooks COGS entriesOutput feeds into the channel_profitability_monthly materialized view.
Reconciliation is a read-heavy, write-light operation, but when it does write (logging discrepancies, updating sync status):
skill_invocations for a reconciliation run on the same date before runningON CONFLICT for any upsert operationsQuickBooks API access is not yet configured. Until it is:
{
"date": "2026-03-20",
"type": "daily",
"channels": {
"shopify": {"orders": 12, "gross_revenue": 1847.50, "status": "matched"},
"etsy": {"orders": 3, "gross_revenue": 245.00, "status": "matched"}
},
"discrepancies": [],
"total_revenue": 2092.50,
"total_orders": 15,
"quickbooks_status": "not_connected"
}