Monthly Portfolio Analytics Snapshots
Monthly Portfolio Analytics Snapshots
Deposit Brain automatically pre-computes a portfolio-level analytics snapshot for every organisation on the first of each month. This allows dashboards, reports, and integrations to read pre-aggregated metrics instantly, without running expensive queries at access time.
How It Works
A scheduled workflow fires at 02:00 UTC on the 1st of every month (cron: 0 2 1 * *). It iterates over all active organisations and, for each one, aggregates data across the relevant entities:
tenanciescomplianceChecksdepositReleasesdisputeOutcomesaiDeductionAssessmentsusageEvents
The resulting snapshot is written to the analytics_snapshots table (or, in applicable configurations, stored as a JSON blob within a designated usageEvents row) and is immediately available for consumption.
Snapshot Metrics
Active Tenancy Count
The total number of tenancies currently in an active state for the organisation. Useful for understanding portfolio size at a point in time.
Average Deposit Amount
The mean deposit value held across all active tenancies. Helps benchmark deposit levels against market norms and internal targets.
Compliance Pass Rate
The percentage of compliance checks (e.g. deposit protection, prescribed information) that returned a passing status. A declining rate may indicate process issues requiring attention.
Dispute Rate
The proportion of tenancies that resulted in a formal deposit dispute. Tracked monthly to surface trends and assess whether dispute-prevention measures are effective.
Average Days to Release
The mean number of calendar days between a deposit being held and it being fully released. Lower values indicate a faster, more efficient end-of-tenancy process.
Total Deductions Processed
The cumulative monetary value of all deductions processed within the period. Provides a financial summary of deposit activity across the portfolio.
AI Assessment Usage
The number of AI-powered deduction assessments consumed by the organisation. Relevant for usage-based billing and for understanding adoption of automated features.
Storage
Snapshots are persisted in the analytics_snapshots table, keyed by organizationId and snapshot date. Each row represents one organisation's state at the start of a given month.
In configurations where a dedicated analytics table is not available, the snapshot is written as a structured JSON blob attached to a designated row in usageEvents.
Accessing Snapshot Data
Pre-computed snapshots are read by portfolio dashboards, compliance summary views, and any reporting export that covers monthly or historical trends. Because the data is cached, these views return quickly regardless of portfolio size.
Schedule
| Field | Value |
|---|---|
| Cron expression | 0 2 1 * * |
| Frequency | Once per month |
| Execution time | 02:00 UTC, 1st of the month |
| Workflow type | Report |
Notes
- Snapshots are additive — a new row is created each month, preserving historical data.
- If the workflow fails mid-run (e.g. due to a transient database error), the affected organisation's snapshot for that month will be absent. No partial writes are committed.
- Organisations created after the snapshot window closes will appear in the following month's run.