service

BillDateCorrectionApplier (workflow #2)

Applies an approved bill-date correction: re-fetches the bill for a fresh SyncToken, then sparse-updates the one date field in QBO.

ServiceApplier — runs only on human approvalkind: bill-date-correction

Overview

src/workflows/bill-date-correction/bill-date-correction.applier.ts. Receives Proposal ApprovedProposal ApprovedEventv0.1.0A cleared human approved in the card (app-only commit path, RBAC-checked against the authenticated session).Ownervisionary-engineeringMapView docs dispatched by kind (bill-date-correction) from the Approval Bus (command service — owns the queue)Approval Bus (command service — owns the queue)Servicev0.1.0The command side: owns the proposal queue. propose_* only queue; a cleared human approves in the card; only then does th...Publishesproposal-created, proposal-approved +3Subscribespropose-vendor-bill, propose-bill-date-correction +6Ownervisionary-engineeringMapRepoView docs — in code this is a synchronous by-kind dispatch inside the commit path, not a broker subscription (see the event’s implementation note). Two vendor operations per apply: a QBO read (Accounting Read (customers · reports · aging)Accounting Read (customers · reports · aging)Queryv0.1.0QBO customers, cash-flow/P&L reports and AR/AP aging (OAuth2 with rotated-token write-back).Ownervisionary-engineeringMapView docs — re-fetch the bill for a fresh SyncToken), then the sparse write (QBO Update Bill (sparse)QBO Update Bill (sparse)Commandv0.1.0Sparse-updates one field on an existing bill using a fresh SyncToken (bill-date correction).Ownervisionary-engineeringMapView docs — one field, TxnDate or DueDate). Naturally idempotent (re-applying the same date is a no-op) and the optimistic-lock 409 path is tested — which is why this is the recommended first live command.

Watch the full lifecycle: Propose Bill-Date Correction — command lifecyclePropose Bill-Date Correction — command lifecycleFlowv0.1.0One propose_bill_date_correction call end to end — the recommended FIRST live command: single reversible field, QBO-only...Ownervisionary-engineeringView flowView docs (from Propose Bill-Date CorrectionPropose Bill-Date CorrectionCommandv0.1.0Workflow #2 — the next-day QBO follow-up: correct a bill's TxnDate/DueDate to the vendor invoice date. Queued for approv...Ownervisionary-engineeringSchemaMapView docs to the vendor write).

Architecture diagram