COS-INQ-002

Email Inquiry Intake & Job Creation

Module Inquiry & Intake
Status Ready
Phase 1
Dependencies None
Downstream COS-RTE-001
Last Updated June 2026

Purpose

Some customers (primarily older US accounts) send inquiries by email. This spec covers parsing inbound emails and creating Jobs using the same pipeline as COS-INQ-001. Output to the RM is identical — they see the same queue card regardless of intake channel.

Actors

Actor Type Role
Customer External Sends email with brief and attachments
Email inbound parser System Receives and parses email
AI Intake Engine System Parses body and attachments into structured brief
RM Internal Receives job in queue

Trigger

New email arrives at monitored mailbox — orders@chandrajewels.com or individual RM mailboxes forwarded to system inbox.

Full Flow

1. Email received via IMAP polling or SendGrid inbound parse webhook
2. Parse email:
   → sender email → match to clients table
   → subject line → extract any style reference numbers
   → body text → send to AI Intake Engine
   → attachments (images / PDFs) → upload to S3
3. Session grouping: same email thread (message-id chain) → same Job
4. Create job record (same schema as COS-INQ-001)
   → intake_channel = "email"
   → intake_raw_ref = email_message_id
5. Create job_communication { channel: email, direction: inbound }
6. AI Intake Engine parses → brief_structured
7. Same confidence threshold as COS-INQ-001
   → low confidence → send reply email with clarifying questions
8. Auto-reply sent immediately on receipt:
   "Received your inquiry. Job ID: CJ-2026-XXXXXX.
    Your account manager will follow up shortly."
9. Job surfaces in RM queue (same as COS-INQ-001)

Key Differences from COS-INQ-001

Aspect WhatsApp (INQ-001) Email (INQ-002)
Clarification channel WhatsApp bot on same thread Reply email from system
Voice notes Yes — transcribed No
Session grouping 30-min window Email thread (subject/message-id chain)
File types accepted Images Images + PDFs
Speed expectation Near-instant Within 15 minutes
Auto-acknowledgement Not needed (WA shows delivery) Auto-reply with Job ID

Business Rules

  • Email thread replies (same subject line) are appended to existing Job, not treated as a new Job.
  • Unknown sender — create draft client, flag RM. Job still created.
  • PDF attachments stored in S3 but not AI-parsed in v1 — RM reads manually.
  • Auto-reply sent on every new email (not on thread replies).

API Endpoints

POST /webhooks/email
  Inbound parse webhook (SendGrid or IMAP trigger)

POST /internal/jobs/create-from-email   [async]
  Same output as COS-INQ-001

Out of Scope

Item Handled in
WhatsApp channel COS-INQ-001
Routing COS-RTE-001