Integrations
External services this dashboard talks to: HubSpot CRM (five dashboards across BC, TQC, TCE), Microsoft Graph for calendar, Basiq for Open Banking, the LMS via HMAC-signed iframe, three Supabase orgs, plus deferred Vanguard and accounting.
HubSpot
| Item | Value |
|---|---|
| Portal ID | 141955450 |
| Instance | EU1 (api.hubapi.eu) |
| Auth | Private app access token (HUBSPOT_ACCESS_TOKEN) |
| API | CRM Search API v3 (/crm/v3/objects/deals/search) |
| Plan | Enterprise (all features) |
Proven query: TCE Revenue (ex GST) — see /api/hubspot/tce-revenue/route.ts.
- Stages:
closedwon,4745402615,4745402614 - Pipelines:
default,3468486848 - Amount property:
amount_in_home_currency - Date handling: AWST→UTC conversion with GTE/LT operators
Remaining dashboards (need spec):
| Entity | Dashboard | What to spec |
|---|---|---|
| BC | Marketing | Metrics, properties, filters, time range |
| BC | Sales | Metrics, properties, filters, time range |
| TQC | Lead Flow | Lead volume, conversion, by source/type |
| TCE | Lead Flow | Lead volume, conversion, by source/type |
Microsoft Graph (Calendar)
| Item | Value |
|---|---|
| Account | aj@finchmax.com |
| Tenant | finchmax.com (Entra ID) |
| Scopes | Calendar.ReadWrite |
| Auth | OAuth2 client credentials (MS_GRAPH_CLIENT_ID, MS_GRAPH_CLIENT_SECRET, MS_GRAPH_TENANT_ID) |
| Endpoint | graph.microsoft.com/v1.0/me/calendarView |
Basiq (Open Banking)
| Item | Value |
|---|---|
| Provider | Basiq (owned by Cuscal) |
| Auth | API key (BASIQ_API_KEY) |
| CDR banks | Westpac, ANZ, Macquarie |
| Screen scrape | Amex (CDR expected mid-2026) |
| Sync schedule | Daily 06:00 AWST (22:00 UTC) via system cron |
| Consent expiry | Annual (CDR). More frequent for screen scrape. |
Bank accounts to configure (needs AJ input):
| Entity | Institution | Account type | Basiq method |
|---|---|---|---|
| Personal | Westpac | Transaction | CDR |
| Personal | Macquarie | Cash management | CDR |
| Personal | ANZ | Credit card | CDR |
| BC | Westpac | Business transaction | CDR |
| BC (Source) | Westpac | Business transaction | CDR |
| BC | Amex | Credit card | Screen scrape |
| TQC | Westpac | Business transaction | CDR |
| TQC | Amex | Credit card (x2) | Screen scrape |
| TCE | Westpac | Business transaction | CDR |
LMS (Lead Management System)
| Item | Value |
|---|---|
| Owner | TQC / Solar Market |
| Developer | Steven Miles |
| Auth method | HMAC-SHA256 signed URL (5-min lifetime) |
| Secret | LMS_AUTH_SECRET (shared with Steven) |
| Dashboard route | /api/lms/token generates signed URL |
| Display | iframe in TQC tab |
| PHP change needed | ~20 lines token validation (Steven Miles) |
Supabase
| Org | URL env var | Key env var | Access pattern |
|---|---|---|---|
| Personal | NEXT_PUBLIC_SUPABASE_URL | NEXT_PUBLIC_SUPABASE_ANON_KEY | Client-side direct |
| Bright Connect | SUPABASE_BC_URL | SUPABASE_BC_SERVICE_ROLE_KEY | Server-side API routes |
| Solar Market | SUPABASE_SM_URL | SUPABASE_SM_SERVICE_ROLE_KEY | Server-side API routes |
Vanguard (Investments)
| Item | Value |
|---|---|
| Accounts | Family Trust, SMSF |
| Current method | Manual entry |
| Future options | Basiq screen scrape investigation, CSV import |
| Table | investment_balance_snapshots (Personal Supabase) |
Accounting (not yet integrated)
| Entity | System | Potential use |
|---|---|---|
| Bright Connect | MYOB | AR aging, GST liability, budget vs actual |
| Source Energy | Xero | AR aging, GST liability |
| TQC | MYOB | AR aging, GST liability |
| TCE | Xero | AR aging, GST liability |