> ## Documentation Index
> Fetch the complete documentation index at: https://docs.vinmake.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Email → Style

> Turn an inbound client RFQ email into a draft style record

# Email → Style

⚪ **Planned (Phase 2)**

The most common way a new style enters the studio is through a client RFQ email with
tech pack, POM sheet, and measurement files attached. This workflow turns that email
into a draft style record ready for merchandiser review.

## When this fires

A client email arrives at a monitored mailbox. Brain's classifier identifies it as an
RFQ based on attachments (tech pack, POM, measurement file), keywords, sender domain,
or explicit `[RFQ]` tagging.

Example: Kaimook at Jaspal sends an email with style reference J26WGW153 and three
attachments — tech pack PDF, POM Excel, measurement sheet.

## What Brain does

### Step 1 — Tag the email

Brain assigns one or more tags so the team can scan the inbox quickly:

* `RFQ received`
* `New style request`
* `Tech pack attached`
* `Measurement file attached`
* `Quotation required`
* `Client follow-up needed`
* `Duplicate check required`

Tags are surfaced in the Inbox so anyone with the right role can see what's pending.

### Step 2 — Create a task

A task appears in the Task surface:

```text theme={null}
Task: Create new style from Jaspal RFQ email
Client: Jaspal
Client PIC: Kaimook
Style Ref: J26WGW153
Attachments: Tech pack, POM, measurement sheet
Status: Waiting for human approval
```

### Step 3 — Approval gate

A merchandiser or manager opens the task and chooses:

* **Approve** — let Brain extract and draft the style record
* **Reject** — close the task; mark the email for follow-up
* **Mark as duplicate** — skip extraction; link to existing style
* **Assign to merchandiser** — route to a specific person
* **Ask AI to extract more info first** — get more context before approving

### Step 4 — Extract style fields

Brain reads the email body and attachments and extracts:

| Field                   | Source                               |
| ----------------------- | ------------------------------------ |
| Client                  | Sender domain, signature, body       |
| Client PIC              | Email sender / signature             |
| VinMake PIC             | Routing logic or manual assignment   |
| Style reference         | Tech pack header, email body         |
| Style name              | Tech pack, email body (if available) |
| Category                | Tech pack content + image analysis   |
| Gender                  | Tech pack, image analysis            |
| Season                  | Email body, tech pack header         |
| Product images          | Tech pack, email attachments         |
| Attachments             | Listed in order received             |
| RFQ date                | Email timestamp                      |
| Required quotation date | Email body parsing                   |
| Target delivery date    | Email body parsing                   |
| Notes                   | Any special instructions             |

Each field carries a confidence score (High / Medium / Low) and a link to its source.

### Step 5 — Duplicate detection

Before drafting anything new, Brain checks for duplicates against CutMake.

**Case 1: Exact match.** If the style reference already exists for the same client,
Brain does not create a new style. The task is updated:

```text theme={null}
Status: Duplicate detected — no new style created
Matched style: J26WGW153
```

**Case 2: Near match.** If the style looks similar but not exact (J26WGW153 vs
J26WGW153A, J26WGW155, same image but different code, etc.), Brain does not decide
alone. It surfaces the candidates for human disambiguation:

> "I found a similar style. Please confirm whether this is a new style or a
> variant of the existing one."

Options:

* Create as new style
* Link to existing style
* Mark as duplicate
* Ask client to clarify

### Step 6 — Draft preview

Before writing to CutMake, Brain shows the merchandiser a draft:

| Field            | AI Draft                 | Confidence |
| ---------------- | ------------------------ | ---------: |
| Client           | Jaspal                   |       High |
| Style Ref        | J26WGW153                |       High |
| Category         | Women's jacket           |     Medium |
| Client PIC       | Kaimook                  |       High |
| Internal PIC     | Mai                      |     Medium |
| Attachments      | 3 files detected         |       High |
| Product Image    | Extracted from tech pack |     Medium |
| Duplicate Status | No exact match found     |       High |

The merchandiser can:

* Approve and create the style record in CutMake
* Edit any field inline
* Reject
* Mark as duplicate
* Ask Brain to re-read attachments

### Step 7 — Write to CutMake

Only after approval does Brain promote the draft into CutMake.

### Step 8 — Suggest next step

After the style record exists, Brain offers the next action:

> "Style created. The next usual step is to create a true cost. Would you like me
> to draft the BOM from the tech pack now?"

This typically chains into [Tech Pack → BOM](/brain/staging/workflows/tech-pack-to-bom).

## What gets logged

* Every extracted field with its confidence and source
* Every human edit (AI draft vs. final value)
* Decision on duplicate detection (especially the near-match cases)
* Time from email arrival to draft, draft to approval, approval to CutMake write

See [Observability](/brain/staging/architecture/observability) for what feeds the
correction log.

## Related

* [Style Creation](/brain/staging/workflows/style-creation) — the standalone version
  used by command
* [Tech Pack → BOM](/brain/staging/workflows/tech-pack-to-bom) — the usual next step
* [Oversight Agent](/brain/staging/workflows/oversight) — monitors flow from this
  point onward
