← 返回
未分类 中文

Client Dashboard

Generates a client-facing executive KPI dashboard from QuickBooks Online data. Produces an Excel workbook with traffic-light scoring, 6-month trend sparkline...
从QuickBooks Online数据生成客户高管KPI仪表板,输出包含红绿灯评分和6个月趋势迷你图的Excel工作簿。
samledger67-dotcom samledger67-dotcom 来源
未分类 clawhub v1.0.2 1 版本 100000 Key: 无需
★ 0
Stars
📥 638
下载
💾 1
安装
1
版本
#latest

概述

Client Dashboard / KPI Report — SKILL.md

What This Skill Does

Generates a client-facing executive KPI dashboard from QuickBooks Online data. Produces an Excel workbook with traffic-light scoring, 6-month trend sparklines, client-specific watch items, and a CDC log tracking KPI changes month-over-month.

When To Use

  • Monthly close is complete and it's time to generate the client dashboard
  • User asks for KPI report, dashboard, or executive summary for any client
  • After running P&L Quick Compare and bank rec — this is the final deliverable step

When NOT To Use

  • NOT a substitute for P&L Quick Compare (different purpose — this is executive summary, not variance analysis)
  • NOT for mid-month snapshots — designed for complete monthly periods
  • NOT for YTD / annual reports — use P&L Deep Analysis for those
  • NOT for clients without QBO integration (no data source)

Pipeline: scripts/pipelines/client-dashboard.py

Prerequisites

pip install openpyxl
# Node.js qbo-client must be authenticated for the target slug

Usage

# Example — March 2026
python3 scripts/pipelines/client-dashboard.py --slug <client-slug> --month 2026-03

# Custom output directory
python3 scripts/pipelines/client-dashboard.py --slug <client-slug> --month 2026-03 --out ~/Desktop/reports

# QBO sandbox
python3 scripts/pipelines/client-dashboard.py --slug <client-slug> --month 2026-03 --sandbox

Arguments

ArgumentRequiredDescription
---------------------------------
--slugCompany slug (must match qbo-client connection)
--monthReport month: YYYY-MM format
--outOutput directory (default: ~/Desktop)
--sandboxUse QBO sandbox environment

Output: Excel Workbook

Filename: KPI_Dashboard_{slug}_{YYYY_MM}.xlsx

TabContents
---------------
Executive SummaryHeadline numbers + traffic-light KPI table with benchmarks
KPI ScorecardFull KPI detail with definitions, thresholds, and score
Trends6-month KPI trend with sparklines (↑↗→↘↓ + block chars)
Cash PositionBalance sheet cash, CF summary, liquidity ratios, runway
Watch ItemsSOP-driven priority items surfaced prominently
CDC LogMonth-over-month KPI delta (what changed since last run)

KPIs Computed

KPIFormulaUnit
--------------------
Revenue MoM Growth(curr_rev - prior_rev) / prior_rev × 100%
Revenue YoY Growth(curr_rev - yoy_rev) / yoy_rev × 100%
Gross Margin %gross_profit / revenue × 100%
Gross Margin (3-Mo Avg)Rolling 3-month GP/Revenue%
Net Margin %net_income / revenue × 100%
OpEx Ratiototal_opex / revenue × 100%
Interest Expense Ratiointerest_expense / revenue × 100%
Current Ratiocurrent_assets / current_liabilitiesx
Quick Ratio(current_assets - inventory) / current_liabilitiesx
Debt-to-Equitytotal_liabilities / total_equityx
DSOar / (revenue / days)days
DPOap / (cogs / days)days
Cash Runwaycash / monthly_burnmonths
Retail % of Revenueretail_revenue / total_revenue × 100%

All math uses Python Decimal for precision.


Traffic Light Scoring

Each KPI is scored GREEN / YELLOW / RED based on configurable thresholds per client SOP.

🟢 GREEN  = On target (within green band)
🟡 WATCH  = Approaching threshold (yellow band)
🔴 ACTION = Below/above acceptable range (outside yellow band)
⬜ N/A    = KPI not applicable or not configured

Thresholds are defined in CLIENT_CONFIGS in the script — one config block per client slug.


Client SOP Integration

Adding a New Client

Add a block to CLIENT_CONFIGS in the script:

"new-slug": {
    "company_name": "Company Name",
    "industry": "Industry",
    "has_ar": True,
    "has_headcount": False,
    "kpis_enabled": ["revenue_mom", "gross_margin", ...],
    "thresholds": {
        "gross_margin": {"green": (Decimal("45"), None), "yellow": (Decimal("35"), Decimal("45"))},
        ...
    },
    "watch_items": [...],
    "benchmarks": {...},
    "benchmark_source": "Source description",
}

CDC (Change Data Capture)

Cache stored at: .cache/client-dashboard/{slug}.json

  • First run: saves full KPI snapshot, CDC tab shows "First run" message
  • Subsequent runs: diffs current KPIs vs. prior run
  • CDC log shows: KPI label | Prior | Current | Delta | % Change | Improved/Declined

Trend Sparklines

6-month trend for each KPI uses two formats:

  1. Direction arrows: ↑↑ ↑ ↗ → ↘ ↓ ↓↓ (based on % change over period)
  2. Block bars: █▇▅▃▁_ (relative to max value — in Trends tab mini-chart section)

Peer Benchmarks

Manual config only. Benchmark values live in CLIENT_CONFIGS[slug]["benchmarks"].

Source attribution displayed in every tab footer.

To update: edit benchmarks dict and benchmark_source string per client.


Integration with Pipeline Suite

This pipeline is designed to run after monthly close is complete:

1. Bank Reconciliation      (bank-reconciliation.py)
2. P&L Quick Compare        (pl-quick-compare.py)
3. P&L Deep Analysis        (pl-deep-analysis.py)      ← optional for controller level
4. Client Dashboard         (client-dashboard.py)      ← this script
5. Cash Flow Forecast       (cash-flow-forecast.py)    ← quarterly advisory

File Locations

FilePath
------------
Pipeline scriptscripts/pipelines/client-dashboard.py
Skill fileskills/client-dashboard/SKILL.md
CDC cache.cache/client-dashboard/{slug}.json
Output (default)~/Desktop/KPI_Dashboard_{slug}_{YYYY_MM}.xlsx

Troubleshooting

QBO CLI error: Ensure your QBO integration is authenticated for the slug.

Missing KPIs: If Balance Sheet accounts don't match expected labels, values default to 0. Check extract_bs_metrics() candidates list for account name variants.

New client config: Add slug to CLIENT_CONFIGS before first run. Default config uses generic thresholds (not client-specific).

Decimal errors: All financial math uses Python Decimal. Do not mix float — use to_d() helper for any external values.

版本历史

共 1 个版本

  • v1.0.2 当前
    2026-05-02 01:43 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

data-analysis

AdMapix

fly0pants
AdMapix 原始数据层,提供广告创意、应用、排名、下载/收入及市场元数据。返回 AdMapix API 的结构化 JSON;调用方...
★ 297 📥 142,544
data-analysis

Data Analysis

ivangdavila
{"answer":"数据分析与可视化。查询数据库、生成报告、自动化电子表格,将原始数据转化为清晰可行的见解。适用于:(1) 您……"}
★ 214 📥 71,040
business-ops

Budget Vs Actual

samledger67-dotcom
对企业进行月度及季度预算与实际差异分析,比较计划与实现的收入、费用及利润率,识别有利/不利差异。
★ 0 📥 1,776