flow
Propose Customer Invoice — command lifecycle
One propose_invoice call end to end: queue → human approve → applier creates the QBO invoice from the approved lines.
Flow
Overview
The AR-side creation write. Second in the go-live order (after bill-date correction), once U6 idempotency (QBO RequestId keyed to the proposal id) ships — a created invoice is customer-visible, so retry-safety is a precondition.
The flow
How it works
- Max (agent) on claude.ai → MCP tool call
- Propose Customer Invoice → queue only — no vendor write
- Approval Bus queues the proposal → pending + widget token minted
- Proposal Created → approval card renders
- Cleared human reviews the card → human click — approve
- Commit Approval (app-only) → RBAC + atomic pending→approved claim
- Approval Bus claims + dispatches → exactly-once claim
- Proposal Approved → dispatch by kind: invoice-generation
- InvoiceGenerationApplier → one SalesItemLineDetail per approved line
- QBO Create Invoice → the one vendor write
- QuickBooks Online → result recorded on the proposal
- Mutation Applied → card refreshes
- Terminal: proposal
applied(a thrown apply recordsfailedinstead — Mutation Failed)