Deposit Amount Reconciliation Integrity Check
Deposit Amount Reconciliation Integrity Check
The Deposit Amount Reconciliation Integrity Check is a nightly automated workflow that validates the financial consistency of every active deposit release. It ensures that the figures recorded for landlord amounts, tenant returns, and individual deductions always add up correctly — and flags any discrepancies before they can cause compliance issues or deposit disputes.
How It Works
Schedule
The workflow runs automatically every night at 03:30 UTC. No manual action is required.
Which Records Are Checked
All depositRelease records with a status of proposed, acknowledged, or released are included in each nightly run. Completed or cancelled releases are excluded.
Validation Logic
Each qualifying deposit release is subjected to two independent checks:
1. Balance Integrity Check
Confirms that the landlord's portion and the tenant's return together equal the total deposit held:
landlordAmount + tenantReturnAmount = totalDepositAmount
A floating-point tolerance of £0.01 is applied to prevent false positives from rounding differences.
2. Deductions Integrity Check
Confirms that the recorded deductions total matches the sum of all individual deduction line items:
deductionsTotal = SUM(depositReleaseDeductions.amount)
What Happens When a Mismatch Is Detected
If either check fails for a given deposit release, the system takes two immediate actions:
1. Compliance Check Record
A failure row is upserted into the compliance_checks table with the rule identifier deposit_release_amount_mismatch. This creates a permanent, auditable record of the discrepancy against the specific deposit release, which can be reviewed in your compliance dashboard.
- Rule:
deposit_release_amount_mismatch - Behaviour: Upsert (creates a new record or updates an existing one for the same release)
2. Urgent In-App Notification
An urgent error notification is sent to all organisation admins via the in-app notification system. Admins are expected to review the flagged deposit release promptly and correct any data inconsistencies.
Entities Involved
| Entity | Role |
|---|---|
depositReleases | Source records being validated |
depositReleaseDeductions | Line-item deductions summed for the deductions check |
complianceChecks | Receives failure records when a mismatch is found |
notifications | Delivers urgent alerts to org admins |
orgMembers | Identifies organisation admins to notify |
For Organisation Admins
If you receive an urgent "Deposit Release Amount Mismatch" notification, it means the nightly reconciliation has detected a financial inconsistency on one or more deposit releases in your organisation. You should:
- Navigate to the Compliance section of your dashboard to view the flagged
deposit_release_amount_mismatchrecords. - Identify the specific
depositReleaserecord(s) with discrepancies. - Review the associated deductions and amounts for data entry errors or system issues.
- Correct the inconsistency and confirm the deposit release figures are accurate before proceeding.
These notifications are marked urgent and should not be dismissed without investigation.
Compliance Context
Accurate deposit accounting is a requirement under the Renters' Rights Act. Mismatches between recorded amounts and actual deductions can result in unlawful deposit retention. This workflow acts as an automated safeguard, catching arithmetic inconsistencies early and ensuring your organisation remains compliant.