AGT-804 — Revenue Recognition
Layer 8: Revenue Operations · ASC 606 recognition · Deferred revenue schedules · Usage metering · GTM OS feeds · Finance-owned
L8 · Agent 04
Built · v26
Owns: RevenueRecognitionLog, DeferredRevenueSchedule, UsageMeteringLog
v26 — promoted from Specced to Built. This is the audit-critical agent in L8: ASC 606 recognized revenue feeds AGT-702's Magic Number, the canonical efficiency metric in MBR/QBR. Recognition methods, deferred revenue schedule, and the UsageMeteringLog integration are now spec-locked. UsageMeteringLog has its own
production schema document with full field definitions, idempotency model, reconciliation tolerances, and a go-live checklist. AGT-804 itself is the recognition logic that sits on top of that schema; the production schema doc is the data contract for the ingestion service. Building one without the other is incoherent.
Purpose
AGT-804 computes revenue recognition per ASC 606, writes deferred revenue schedules for consumption by the accounting system (NetSuite or equivalent), and receives usage metering data from the external product system. It is the canonical source of recognized revenue in the OS — AGT-702's Magic Number calculation and AGT-402's expansion revenue forecast both read from AGT-804's outputs. It also feeds AGT-503 usage expansion signals and AGT-501 seat utilization data via UsageMeteringLog.
Recognition methods by SKU type
| SKU type | Method | Mechanics |
| Seat license | Straight-line ratable | Total contract value ÷ contract term in months = monthly recognized amount. Recognition begins on term_start date regardless of when the invoice is paid. DeferredRevenueSchedule records the full schedule at order activation. |
| Consumption | Usage recognized | Recognized in the period consumed per UsageMeteringLog. Up to committed amount recognized as each metering period closes. Overage recognized when invoiced. No deferred revenue on consumption — recognized as used. |
| Professional services | Milestone delivery | Recognized when milestone is complete and customer has signed off (TechnicalMilestoneLog.customer_sign_off = TRUE). Revenue deferred until sign-off. Each milestone is an independent performance obligation under ASC 606. |
Recognition is independent of billing cadence. An annual upfront invoice for a seat license generates 12 months of deferred revenue that unwinds ratably — billing timing does not affect recognition. AGT-804 separates billed amounts (from InvoiceLog) from recognized amounts (RevenueRecognitionLog) so AGT-702 always uses recognized revenue, not billed revenue, in Magic Number calculation.
UsageMeteringLog
Usage data originates from the external product metering system. The ingestion service writes to UsageMeteringLog; AGT-804 and other OS agents read from it. AGT-804 does not write to UsageMeteringLog — it consumes the table for recognition computation. Full field definitions, idempotency rules, quality checks, reconciliation tolerances, retention tiers, and the go-live checklist live in the production schema document — see reference below.
| Key | Granularity | Notes |
| account_id + sku_id + period_start + period_end + source_system + ingest_event_id + record_version | One row per natural-key per ingest event per version | Idempotent UPSERT on (source_system, ingest_event_id). Corrections increment record_version. Consumers always filter to MAX(record_version) per natural key. See production schema doc. |
| Consumer | What they read | Purpose |
| AGT-804 (self) | units_consumed, overage_units, overage_amount_usd, prior-period corrections | Recognition computation for consumption SKUs. Prior-period corrections trigger ASC 606 prior-period adjustments in RevenueRecognitionLog. |
| AGT-802 Billing & Invoicing | units_consumed, overage_amount_usd | Consumption invoice line generation |
| AGT-503 Expansion Trigger | UsageThresholdEvents subscription (real-time) + daily aggregate poll (fallback) | Consumption overage (+40 pts) and seat utilization ≥80% for 2+ periods (+30 pts) expansion signals. Bypasses scheduled cycle. |
| AGT-501 Customer Health | Daily aggregate per account: max(seat_utilization_pct) over trailing 30 days | Seat utilization dimension (18 pts max in health model) |
UsageMeteringLog is the single metering source for all OS agents. AGT-503 and AGT-501 do not independently query the product system — they read UsageMeteringLog. This concentrates external integration risk in one place (the ingestion service that writes UsageMeteringLog) and gives Finance + the auditor exactly one place to validate ASC 606 source data.
Deferred revenue schedule
AGT-804 writes DeferredRevenueSchedule at order activation. The accounting system (NetSuite or equivalent) reads from this table to post journal entries — AGT-804 computes the schedule, it does not post journals directly.
| Field | Purpose |
total_contract_value_usd | Full contract value for this SKU — basis for deferred calculation |
monthly_recognition_amount_usd | TCV ÷ term months. Null for milestone-based SKUs. |
cumulative_recognized_usd | Running total of recognized revenue to date. Updated monthly. |
deferred_balance_usd | TCV − cumulative_recognized. This is the deferred revenue liability on the balance sheet. |
schedule_status | active / complete / amended. Amended when a mid-term change affects the recognition schedule. |
GTM OS feeds
| Consumer | What AGT-804 provides | How used |
| AGT-702 GTM Health Monitor | RevenueRecognitionLog — recognized revenue by period | Magic Number numerator (net new recognized revenue). Ensures efficiency metrics use recognized revenue, not billed revenue. |
| AGT-402 Forecast Adjuster | UsageMeteringLog — consumption trends | Expansion ACV probability weighting. Accounts trending toward overage have higher expansion probability. |
| AGT-503 Expansion Trigger | UsageMeteringLog — overage and seat utilization signals | Consumption overage (+40 pts) and seat utilization >80% for 2+ months (+30 pts). AGT-804 usage events bypass AGT-503's scheduled daily cycle — usage threshold events trigger directly. |
| AGT-501 Customer Health | UsageMeteringLog — seat utilization | Seat utilization dimension (18 pts max). Units consumed vs licensed seats. |
Production controls & audit (v26)
AGT-804 is the audit-critical agent in L8. Recognized revenue feeds Magic Number, NRR, and CAC Payback — the metrics the CRO and CFO carry into the board room. The controls below are mandatory before AGT-804 outputs are used downstream of internal review.
| Control | Mechanism | Owner |
| UsageMeteringLog source data verified | Monthly reconciliation against product DB within ±0.01% tolerance. AGT-804 month close holds if reconciliation fails. | Finance + DataEng |
| Recognition method per SKU type immutable within a period | Recognition method is captured at OrderLog activation. Method change requires AGT-801 amendment + Finance Director approval. AmendmentLog records prior method. | Finance |
| Deferred revenue schedule reconciles to balance sheet | Monthly: SUM(DeferredRevenueSchedule.deferred_balance_usd) WHERE schedule_status = 'active' must equal accounting system deferred revenue liability within ±$1. | Finance + Accounting |
| Recognition computed from MAX(record_version) | All consumption queries filter UsageMeteringLog to latest record_version per natural key. Hard CHECK in agent code. | DataEng |
| Prior-period adjustments flagged distinctly | RevenueRecognitionLog.prior_period_adjustment = TRUE on rows derived from UsageMeteringLog corrections to closed periods. AGT-702 sums these separately. | Finance |
| Milestone billing requires customer sign-off | AGT-804 only recognizes services revenue when TechnicalMilestoneLog.customer_sign_off = TRUE. IE-only completion does not unlock recognition. | Finance + IE |
| Audit trail preserved for 7 years | RevenueRecognitionLog and DeferredRevenueSchedule retained in cold storage 7+ years per ASC 606. UsageMeteringLog same per its own production schema. | Finance + Platform |
| Restatement workflow defined | If a closed-period figure must be restated (auditor request, material correction), AGT-804 emits a RevenueRecognitionLog entry with restatement_flag = TRUE and reason; AGT-702 surfaces as a separate line in MBR/QBR. | Finance + RevOps |
Edge cases & failure modes
| Scenario | Behavior |
| UsageMeteringLog reconciliation fails for the close period | AGT-804 monthly recognition close holds. Notifies Finance + RevOps. Cascades to AGT-702 MetricsCalcLog — AGT-704 MBR/QBR staleness gate fires (per AGT-704 spec). |
| Prior-period correction lands after period close | AGT-804 emits a RevenueRecognitionLog row with prior_period_adjustment = TRUE for the original period AND a current-period offset row, per ASC 606 prior-period adjustment treatment. |
| Mid-term contract amendment changes commit_units | AGT-801 writes AmendmentLog. AGT-804 amends DeferredRevenueSchedule with schedule_status = 'amended', preserves the original schedule, and writes a new schedule from amendment effective date forward. |
| Customer disputes a usage measurement | UsageMeteringLog row transitions to audit_status = 'disputed'. AGT-804 excludes disputed rows from recognition until resolved. AGT-802 may issue a credit memo per AGT-802 spec; AGT-804 ingests the resolution path. |
| SKU type changes mid-term (consumption → hybrid) | Treated as a new performance obligation under ASC 606. Original schedule completes; new schedule begins on transition date. Documented in AmendmentLog. |
| Customer churns mid-term | DeferredRevenueSchedule.schedule_status = 'complete'. Remaining deferred balance unwinds per termination terms (typically immediate recognition of remaining balance net of any refund obligation, or pro-rata refund treatment). |
| Source system replays a full month of events | Idempotency on (source_system, ingest_event_id) absorbs replay without double-count. AGT-804 unaffected. Reconciliation should pass. |
| UsageMeteringLog ingestion offline for >24h during a close period | AGT-804 holds the close pending data catch-up. Finance receives explicit notification. No partial-data recognition under any circumstance. |