# Advance Manufacturers — Email Quote Funnel

> Client-facing overview of how inbound customer emails are captured, routed, answered with
> AI assistance, and tracked. Built on Zammad (self-hosted) with Claude for drafting.

## In one sentence

Every customer email lands in one place, is automatically sent to the right team, gets a
ready-to-edit AI draft tailored to fine jewelry, and is sent only after a person reviews it — with
response times tracked end to end.

> **Customers never access Zammad.** Their only touchpoint is the email they send to one of our
> addresses; they receive our reply in their own inbox. Zammad is an **internal, staff-only** tool
> for routing and handling those emails — there is no customer portal, login, or self-service ticket.

## The funnel at a glance

> Rendered images (SVG/PNG) for slides: [`docs/presentation/diagrams/`](diagrams/).

```mermaid
flowchart TD
    C(["Customer<br/>sends an email — never uses Zammad"]) --> MB

    subgraph MB["Dedicated mailboxes (the only customer touchpoint)"]
      direction LR
      Q["quote@"]
      S["sales@"]
      CAD["cad@"]
      D["delivery@"]
      AC["accounting@"]
      SUP["support@"]
      CT["contact@"]
    end

    MB -->|"IMAP ingestion"| Z

    subgraph INT["Internal workspace — staff only (Zammad)"]
      Z["Zammad<br/>every email becomes a tracked ticket"]
      Z --> R{"Routing"}
      R -->|"by recipient address"| TEAM["Right department / team"]
      R -->|"general inbox, by subject keywords"| TEAM
      R -->|"urgent wording"| PRIO["High priority + SLA timer"]
      PRIO --> TEAM
      TEAM --> AI["AI draft<br/>Claude Writing Assistant<br/>jewelry-aware, with placeholders"]
      AI --> H["Human review and edit<br/>mandatory"]
      H --> T["Tracking<br/>status, tags, SLA, reporting"]
    end

    H --> SEND["Reply sent with company signature"]
    SEND -->|"by email"| CR(["Customer<br/>receives the reply in their own inbox"])
```

## Stage by stage

1. **Capture — never miss a request.** Customers write to dedicated addresses (`quote@`, `sales@`,
   `cad@`, `delivery@`, `accounting@`, `support@`) plus a general `contact@` catch-all. All are real
   monitored mailboxes.
2. **Centralize — one shared workspace.** Zammad pulls every mailbox and turns each email into a
   **ticket** with a unique number, history, and owner. Nothing gets lost in a personal inbox.
3. **Route — straight to the right people.** Each address maps to a department. The general
   `contact@` inbox is **auto-classified by subject keywords** to the correct team. Urgent wording
   raises priority and starts the response timer.
4. **Assist — a strong first draft in seconds.** On reply, the agent triggers **Claude** through the
   Writing Assistant. The draft is **specific to fine jewelry** (metal and karat, gemstones, plating,
   setting, MOQ) and leaves clear **`[placeholders]`** for anything a human must confirm (price, lead
   time). It never invents prices or commitments.
5. **Review — a person is always in control.** The agent reads the draft, fills the placeholders,
   edits freely, and only then sends. **No email is ever sent automatically.**
6. **Respond — on brand.** The reply goes out with the **company signature** (Advance Manufacturers,
   Bangkok, RJC-certified). First-response time is measured against the **SLA**.
7. **Track — full visibility.** Ticket states, tags, per-team work lists (overviews), SLA escalation,
   and one-click **macros** for routine actions keep the whole pipeline transparent.

## How routing decides (the `contact@` general inbox)

Dedicated mailboxes go straight to their team. The shared `contact@` inbox is sorted automatically:

```mermaid
flowchart LR
    A["contact@ general inbox"] --> K{"Subject keywords?"}
    K -->|"quote, rfq, pricing"| G1["Quote / Estimating"]
    K -->|"invoice, payment, PO"| G2["Accounting"]
    K -->|"delivery, shipping, lead time"| G3["Logistics"]
    K -->|"drawing, CAD, STEP file"| G4["Engineering / CAD"]
    K -->|"complaint, warranty, RMA"| G5["After-sales / Quality"]
    K -->|"no match"| G6["Stays in General / Triage"]
```

## How the AI assist works (human-in-the-loop)

```mermaid
sequenceDiagram
    autonumber
    participant Cust as Customer
    participant Agent
    participant WA as Writing Assistant
    participant Claude as Claude (Anthropic)

    Cust->>Agent: Quote request (e.g. 200 18k gold pendants)
    Agent->>WA: Select notes, choose "Draft quote reply"
    WA->>Claude: Customer context + jewelry instruction
    Claude-->>WA: First-draft reply with [placeholders]
    WA-->>Agent: Draft proposed (Approve / Cancel)
    Agent->>Agent: Review, fill [price] and [lead time], edit
    Agent->>Cust: Send with signature (never automatic)
```

Two assist tools are configured today:
- **Draft quote reply** — first-pass RFQ answer for `quote@` / `sales@` / `cad@`.
- **Reply to complaint** — empathetic after-sales answer for `support@` (no admission of fault, no
  promises).

## Why it matters for the business

- **Faster quotes**: a solid first draft in seconds instead of a blank page.
- **Nothing slips**: every inquiry is a tracked ticket with an owner and an SLA.
- **Right team, every time**: routing by address and by keyword removes manual sorting.
- **Consistent and on brand**: shared signatures, jewelry-aware wording, no "AI" tells.
- **Safe by design**: mandatory human review, no auto-send, prices always confirmed by a person.

## Status

Currently validated on a **test domain** (routing proven end to end on a 14-email simulation). The
switch to the live `advmfr.com` mailboxes plus email deliverability (SPF/DKIM/DMARC) is the final
go-live step. See `docs/prod-readiness.md`.
