DA Agreement Structure
A DA agreement in OpenInsure contains:Creating a DA Agreement via API
Runtime Enforcement
DA enforcement runs at two checkpoints:1. Quote-Time Pre-Check
WhenPOST /v1/submissions/:id/quote is called, the rating engine reads the DA agreement from CF D1 (cached at the edge) and validates:
- Requested limits ≤ DA maximums
- Risk state is in
authorizedStates - NAICS code is not in
excludedNaicsCodes - Insured revenue ≤
maxInsuredRevenue(if set) - No referral trigger conditions are met
daFlags array explaining the issue. The quote is still generated (so the producer knows the premium), but binding is blocked.
2. Bind-Time Hard Stop
WhenPOST /v1/submissions/:id/bind is called, the system re-runs all DA checks atomically (using a database transaction with row-level locking on the DA aggregate counter). This prevents race conditions where two simultaneous binds could collectively exceed an aggregate limit.
Breach Handling
A DA breach occurs when a bound policy is discovered to violate the DA terms post-bind (e.g., a NAICS code was misclassified, or a state eligibility error was made). The breach workflow:- Detection — The compliance engine or carrier audit flags a breach.
- Notification — The carrier’s compliance contact is automatically notified via email + API webhook.
- Referral — The policy is moved to
carrier_reviewstatus and blocked from further endorsements. - Resolution — Carrier may approve (retroactive) or require cancellation.
- Root Cause — Breach record is documented with corrective action.
Aggregate Tracking
The DA module provides real-time aggregate utilization reporting:Monthly Reporting to Carriers
At the end of each month, the DA module generates a utilization report for the carrier showing:- All policies bound during the period (with premium, state, class, limit)
- Running aggregate vs. limit
- Any referrals made and their disposition
- Any DA exceptions granted