{
        "dataSource": "/api/reports/revenue-by-customer/:orgId",
        "autoRefresh": 120000,
        "pagination": {
            "enabled": true,
            "pageSize": 25,
            "pageSizes": [10, 25, 50, 100]
        },
        "columns": [
            {
                "field": "customer_name",
                "label": "Customer",
                "sortable": true,
                "searchable": true,
                "width": "20%",
                "render": "link",
                "linkAction": "reports:view-customer-details"
            },
            {
                "field": "customer_status",
                "label": "Status",
                "sortable": true,
                "width": "10%",
                "render": "badge",
                "badgeColors": {
                    "active": "success",
                    "recent": "info",
                    "inactive": "warning",
                    "dormant": "error"
                }
            },
            {
                "field": "total_revenue",
                "label": "Total Revenue",
                "sortable": true,
                "width": "12%",
                "format": "currency",
                "align": "right"
            },
            {
                "field": "revenue_ytd",
                "label": "Revenue YTD",
                "sortable": true,
                "width": "12%",
                "format": "currency",
                "align": "right"
            },
            {
                "field": "revenue_90_days",
                "label": "Last 90 Days",
                "sortable": true,
                "width": "12%",
                "format": "currency",
                "align": "right"
            },
            {
                "field": "revenue_30_days",
                "label": "Last 30 Days",
                "sortable": true,
                "width": "12%",
                "format": "currency",
                "align": "right"
            },
            {
                "field": "invoice_count",
                "label": "Invoices",
                "sortable": true,
                "width": "8%",
                "format": "count",
                "align": "center"
            },
            {
                "field": "avg_invoice_amount",
                "label": "Avg Invoice",
                "sortable": true,
                "width": "10%",
                "format": "currency",
                "align": "right"
            },
            {
                "field": "last_invoice_date",
                "label": "Last Invoice",
                "sortable": true,
                "width": "10%",
                "format": "date"
            }
        ],
        "filters": [
            {
                "field": "customer_status",
                "label": "Customer Status",
                "type": "select",
                "options": [
                    {"value": "", "label": "All Statuses"},
                    {"value": "active", "label": "Active"},
                    {"value": "recent", "label": "Recent"},
                    {"value": "inactive", "label": "Inactive"},
                    {"value": "dormant", "label": "Dormant"}
                ],
                "default": ""
            },
            {
                "field": "min_revenue",
                "label": "Min Revenue",
                "type": "number",
                "placeholder": "0.00"
            },
            {
                "field": "date_from",
                "label": "Date From",
                "type": "date"
            },
            {
                "field": "date_to",
                "label": "Date To",
                "type": "date"
            },
            {
                "field": "search",
                "label": "Search",
                "type": "text",
                "placeholder": "Search customer name..."
            }
        ],
        "rowActions": [
            {
                "label": "View Details",
                "icon": "fa-eye",
                "action": "reports:view-customer-details",
                "color": "info"
            },
            {
                "label": "Invoice Drill-Down",
                "icon": "fa-list",
                "action": "reports:drill-down-invoices",
                "color": "primary"
            },
            {
                "label": "Send Statement",
                "icon": "fa-envelope",
                "action": "reports:send-customer-statement",
                "color": "accent",
                "confirm": "Send statement to this customer?"
            },
            {
                "label": "Export Customer Report",
                "icon": "fa-file-export",
                "action": "reports:export-customer-csv",
                "color": "secondary"
            }
        ],
        "bulkActions": [
            {
                "label": "Export Selected",
                "icon": "fa-file-csv",
                "action": "reports:export-selected-csv",
                "color": "secondary"
            },
            {
                "label": "Send Statements",
                "icon": "fa-paper-plane",
                "action": "reports:send-statements-bulk",
                "color": "primary",
                "confirm": "Send statements to {count} customers?"
            },
            {
                "label": "Analyze Trends",
                "icon": "fa-chart-line",
                "action": "reports:analyze-customer-trends",
                "color": "info"
            }
        ],
        "summaryWidgets": [
            {
                "id": "total-customer-revenue",
                "type": "stat",
                "title": "Total Revenue",
                "icon": "fa-dollar-sign",
                "color": "success",
                "dataPath": "totals.total_revenue",
                "format": "currency"
            },
            {
                "id": "customer-count",
                "type": "stat",
                "title": "Total Customers",
                "icon": "fa-users",
                "color": "info",
                "dataPath": "totals.customer_count",
                "format": "count"
            },
            {
                "id": "avg-customer-revenue",
                "type": "stat",
                "title": "Avg Revenue per Customer",
                "icon": "fa-chart-bar",
                "color": "primary",
                "dataPath": "totals.avg_revenue",
                "format": "currency"
            },
            {
                "id": "top-customer",
                "type": "stat",
                "title": "Top Customer",
                "icon": "fa-trophy",
                "color": "warning",
                "dataPath": "totals.top_customer_name",
                "subtitle": {
                    "dataPath": "totals.top_customer_revenue",
                    "format": "currency"
                }
            }
        ],
        "exportOptions": [
            {
                "label": "Export to CSV",
                "action": "reports:export-csv",
                "icon": "fa-file-csv",
                "params": {"reportType": "revenue-by-customer"}
            },
            {
                "label": "Export to PDF",
                "action": "reports:export-pdf",
                "icon": "fa-file-pdf",
                "params": {"reportType": "revenue-by-customer"}
            }
        ]
    }