service

ArCollectionsApplier (workflow #4)

Applies an approved AR collections email: sends via Microsoft Graph sendMail. The approval IS the send gate; the human can edit subject/body at send.

ServiceApplier — runs only on human approvalkind: ar-collections-email

Overview

src/workflows/ar-collections/ar-collections.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 (ar-collections-email) 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: Graph Send MailGraph Send MailCommandv0.1.0Sends the approved AR collections email via Microsoft Graph sendMail (app-only client credentials).Ownervisionary-engineeringMapView docs (app-only client credentials). The most outward-facing write in the system — a customer receives it — which is why the edit-at-send path (unique to this kind) snapshots the human’s edited subject/body onto the proposal before apply, so the audit trail records exactly what was approved. Blocked on Mail.Send admin consent before live.

Watch the full lifecycle: Propose AR Collections Email — command lifecyclePropose AR Collections Email — command lifecycleFlowv0.1.0One propose_ar_collection_email call end to end: queue → human reviews AND CAN EDIT subject/body → approve is the send →...Ownervisionary-engineeringView flowView docs (from Propose AR Collections EmailPropose AR Collections EmailCommandv0.1.0Workflow #4 — a relationship-aware dunning email queued for approval. The approval IS the send gate; the human can edit ...Ownervisionary-engineeringSchemaMapView docs to the vendor write).

Architecture diagram