flow

Propose AR Collections Email — command lifecycle

One propose_ar_collection_email call end to end: queue → human reviews AND CAN EDIT subject/body → approve is the send → Graph sendMail → MutationApplied.

Flow

Overview

The most outward-facing write in the system — a customer receives it — so the approval is the send gate, and the edit-at-send path (unique to this kind) snapshots the human’s edited subject/body onto the proposal before apply: the audit trail records exactly what was approved, not what was proposed. Blocked on Mail.Send admin consent before live.

The flow

How it works

  1. Max (agent) on claude.aiMCP tool call
  2. Propose AR Collections Emailqueue only — no vendor write
  3. Approval Bus queues the proposalpending + widget token minted
  4. Proposal Createdapproval card renders
  5. Cleared human reviews the cardhuman click — approve
  6. Commit Approval (app-only)RBAC + atomic pending→approved claim
  7. Approval Bus claims + dispatchesexactly-once claim
  8. Proposal Approveddispatch by kind: ar-collections-email
  9. ArCollectionsApplier — send exactly what was approvedthe approved (possibly edited) email
  10. Graph Send Mailthe one vendor write
  11. Microsoft 365 (Graph)result recorded on the proposal
  12. Mutation Appliedcard refreshes
  13. Terminal: proposal applied (a thrown apply records failed instead — Mutation Failed)