service

InvoiceGenerationApplier (workflow #3)

Applies an approved customer invoice: creates it in QBO with one SalesItemLineDetail per approved line.

ServiceApplier — runs only on human approvalkind: invoice-generation

Overview

src/workflows/invoice-generation/invoice-generation.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 (invoice-generation) 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). Single vendor write: QBO Create InvoiceQBO Create InvoiceCommandv0.1.0Creates a customer invoice from approved proposal lines.Ownervisionary-engineeringMapView docs. Shares the U6 idempotency dependency (QBO native RequestId keyed to the proposal id) with create-bill — WRITE_MODE=gated refuses to boot against live write connectors until U6 ships.

Watch the full lifecycle: Propose Customer Invoice — command lifecyclePropose Customer Invoice — command lifecycleFlowv0.1.0One propose_invoice call end to end: queue → human approve → applier creates the QBO invoice from the approved lines.Ownervisionary-engineeringView flowView docs (from Propose Customer InvoicePropose Customer InvoiceCommandv0.1.0Workflow #3 — draft a customer invoice (AR) for approval; created in QBO only once a cleared human approves.Ownervisionary-engineeringSchemaMapView docs to the vendor write).

Architecture diagram