{
        "title": "Revenue by Customer Analysis",
        "header": [
            {
                "type": "button",
                "label": "Export CSV",
                "onClick": "exportTableToCSV",
                "icon": "fa-download"
            },
            {
                "type": "button",
                "label": "Refresh",
                "onClick": "refreshModule",
                "icon": "fa-sync"
            }
        ],
        "body": [
            {
                "type": "table",
                "options": {
                    "tableName": "revenue_by_customer",
                    "dataSource": "/api/aggregate?table=revenue_by_customer",
                    "columnsToShow": [
                        "customer_name",
                        "email",
                        "phone",
                        "total_invoices",
                        "paid_invoices",
                        "total_revenue",
                        "avg_invoice_amount",
                        "revenue_last_30_days",
                        "revenue_ytd",
                        "customer_status",
                        "customer_since"
                    ],
                    "columnLabels": {
                        "customer_name": "Customer Name",
                        "email": "Email",
                        "phone": "Phone",
                        "total_invoices": "Total Invoices",
                        "paid_invoices": "Paid Invoices",
                        "total_revenue": "Total Revenue",
                        "avg_invoice_amount": "Avg Invoice",
                        "revenue_last_30_days": "Last 30 Days",
                        "revenue_ytd": "YTD Revenue",
                        "customer_status": "Status",
                        "customer_since": "Customer Since"
                    },
                    "showGlobalSearch": true,
                    "addButton": false,
                    "sortColumn": "total_revenue",
                    "sortDirection": "DESC"
                }
            }
        ],
        "footer": [
            {
                "type": "button",
                "label": "Close",
                "onClick": "closeModal"
            }
        ]
    }