Skip to content
Development
Command

/expense-summary

Summarize expenses by client, vendor, or date range in QuickBooks Online

From plugin
msp-claude-plugins
39200 skills141 agents200 commands
Install
$ npx -y skills add wyre-technology/msp-claude-plugins --agent claude-code

How it fires

How this command gets triggered: by you, by Claude, or both.

  • Fires itselfClaude auto-loads it when your prompt matches the work.
  • You can call itInvoke it directly when you want it.
  • Slash command/expense-summary

Context preview

What this command does when you run it.

Summarize expenses by client, vendor, or date range in QuickBooks Online

Command definition

expense-summary.md
description: Summarize expenses by client, vendor, or date range in QuickBooks Online
argument-hint: "[from] [to] [customer] [vendor] [group_by]"
arguments: [from, to, customer, vendor, group_by]

QuickBooks Online Expense Summary

Summarize expenses by client, vendor, or date range to track per-client costs and overall spending.

Prerequisites

  • Valid QBO OAuth2 token (`QBO_ACCESS_TOKEN`)
  • Company ID configured (`QBO_REALM_ID`)
  • User must have expense and purchase read permissions

Steps

1. **Parse parameters**

  • Set date range (default: current month)
  • Set customer/vendor filter
  • Set grouping mode

2. **Fetch expense data**

  • Query Purchase entities in date range
  • Query Bill entities in date range
  • Include line-level customer allocations

3. **Aggregate results**

  • Group by customer, vendor, or expense category
  • Calculate totals per group
  • Identify billable vs non-billable

4. **Format and display**

  • Summary table by chosen grouping
  • Totals and breakdown
  • Profitability context where applicable

Parameters

| Parameter | Type | Required | Default | Description | |-----------|------|----------|---------|-------------| | from | string | No | 1st of month | Start date (YYYY-MM-DD) | | to | string | No | today | End date (YYYY-MM-DD) | | customer | string | No | - | Filter to specific customer | | vendor | string | No | - | Filter to specific vendor | | group_by | string | No | customer | Group by: customer, vendor, category |

Examples

Current Month by Customer

/expense-summary

Specific Date Range

/expense-summary --from 2026-01-01 --to 2026-01-31

Single Customer Expenses

/expense-summary --customer "Acme Corp"

By Vendor

/expense-summary --group_by vendor --from 2026-01-01 --to 2026-01-31

Specific Vendor

/expense-summary --vendor "Microsoft" --from 2026-01-01 --to 2026-01-31

By Category

/expense-summary --group_by category

API Calls

Fetch Purchases in Date Range

curl -s -H "Authorization: Bearer $QBO_ACCESS_TOKEN" \
  -H "Accept: application/json" \
  "https://quickbooks.api.intuit.com/v3/company/$QBO_REALM_ID/query?query=SELECT%20*%20FROM%20Purchase%20WHERE%20TxnDate%20%3E%3D%20'2026-02-01'%20AND%20TxnDate%20%3C%3D%20'2026-02-23'%20ORDERBY%20TxnDate%20DESC&minorversion=73"

Fetch Bills in Date Range

curl -s -H "Authorization: Bearer $QBO_ACCESS_TOKEN" \
  -H "Accept: application/json" \
  "https://quickbooks.api.intuit.com/v3/company/$QBO_REALM_ID/query?query=SELECT%20*%20FROM%20Bill%20WHERE%20TxnDate%20%3E%3D%20'2026-02-01'%20AND%20TxnDate%20%3C%3D%20'2026-02-23'%20ORDERBY%20TxnDate%20DESC&minorversion=73"

Fetch P&L by Customer (Alternative)

curl -s -H "Authorization: Bearer $QBO_ACCESS_TOKEN" \
  -H "Accept: application/json" \
  "https://quickbooks.api.intuit.com/v3/company/$QBO_REALM_ID/reports/ProfitAndLoss?start_date=2026-02-01&end_date=2026-02-23&summarize_column_by=Customers&minorversion=73"

Fetch Expenses by Vendor Report

curl -s -H "Authorization: Bearer $QBO_ACCESS_TOKEN" \
  -H "Accept: application/json" \
  "https://quickbooks.api.intuit.com/v3/company/$QBO_REALM_ID/reports/ExpensesByVendor?start_date=2026-02-01&end_date=2026-02-23&minorversion=73"

Output

By Customer (Default)

Expense Summary - By Customer
================================================================
Period: 2026-02-01 to 2026-02-23

+---------------------------+-----------+-----------+------------+---------+
| Customer                  | Billable  | Non-Bill  | Total      | % Total |
+---------------------------+-----------+-----------+------------+---------+
| Acme Corporation          | $1,250.00 | $0.00     | $1,250.00  | 32.1%   |
| TechStart Inc             | $820.00   | $0.00     | $820.00    | 21.1%   |
| Global Widgets LLC        | $650.00   | $0.00     | $650.00    | 16.7%   |
| Metro Dental Group        | $450.00   | $100.00   | $550.00    | 14.1%   |
| (Unallocated)             | $0.00     | $625.00   | $625.00    | 16.0%   |
+---------------------------+-----------+-----------+------------+---------+
| TOTAL                     | $3,170.00 | $725.00   | $3,895.00  | 100%    |
+---------------------------+-----------+-----------+------------+---------+

Billable expense recovery:
  Billable:     $3,170.00 (81.4%)
  Non-billable: $725.00 (18.6%)
  Unallocated:  $625.00 (16.0%)

Quick Actions:
  - View by vendor: /expense-summary --group_by vendor
  - View customer detail: /expense-summary --customer "Acme Corp"
  - Compare to revenue: /get-balance
================================================================

Single Customer Detail

/expense-summary --customer "Acme Corp"

Expense Detail - Acme Corporation
================================================================
Period: 2026-02-01 to 2026-02-23

+------------+----------------------+---------------------------------+-----------+----------+
| Date       | Vendor               | Description                     | Amount    | Billable |
+------------+----------------------+---------------------------------+-----------+----------+
| 2026-02-15 | Microsoft            | M365 Business Premium - 30 seats| $450.00   | Yes      |
| 2026-02-15 | SentinelOne          | Endpoint Protection - 30 seats  | $120.00   | Yes      |
| 2026-02-15 | Datto                | Cloud Backup - 500GB            | $80.00    | Yes      |
| 2026-02-10 | Amazon Web Services  | Azure AD Connect hosting        | $45.00    | Yes      |
| 2026-02-08 | Cabling Plus LLC     | Network cabling - conference rm | $555.00   | Yes      |
+------------+----------------------+---------------------------------+-----------+----------+
| TOTAL                                                               | $1,250.00 |          |
+------------+----------------------+---------------------------------+-----------+----------+

Breakdown:
Read more
Ships withmsp-claude-plugins

One command to supercharge Claude Code for MSP workflows. Then restart Claude Code. That's it. Documentation: mcp.wyre.ai

Get the whole plugin, auto-invoked
Stats
39
Stars
0
Views
17
Forks
Active
Maintenance
Astro
Language
Apache-2.0
License
1d ago
Last commit
6mo ago
Created

Repo: wyre-technology/msp-claude-plugins