1. Buyer techpack revision → impact assessment before anything is accepted
Rev C arrives at 11:40pm as an attachment called STYLE4471_TECHPACK_revC_FINAL_v2.xlsx. Rev B is somewhere in the shared drive, in a folder named 'latest', next to a folder named 'latest FINAL'. The merchandiser opens both on a laptop at the dining table and scrolls the measurement tab column by column looking for the cells that moved, then messages the fabric store on WhatsApp to ask whether the interlining has already been issued, then guesses at a date because the buyer's mail says 'please confirm by tomorrow'. Cutting starts at 8am and nobody has told them anything.
Trigger: Email / Webhook (revised techpack from the buyer or the vendor portal)
How the workflow runs
- Trigger
Revised techpack arrives. An Email trigger on the merchandising inbox catches the buyer's revision; the same workflow accepts a Webhook push from the buyer's vendor portal (no first-party connector — the portal reaches you via Webhook).
- Knowledge
Pull the in-production spec. A Knowledge node queries the style-master collection — approved techpack, BOM and trim card, scoped to this style only — so the comparison is against what the floor is actually building, not against whichever file was attached last.
- Agent
Diff the revision. An Agent node produces a field-level change list — measurement points, fabric/GSM, trims, print placement, packing — each marked CHANGED / ADDED / REMOVED with the old and new value quoted verbatim from the two documents.
- Tool (MCP)
Score each change with your own rule. A user-defined tool (a SpEL formula authored by merchandising, not code) turns each change row into a severity band using this buyer's own thresholds — so 'a 0.5cm chest change is absorbable, 1cm is not' is a business setting, editable per buyer, not something a developer ships.
- Parallel
Assess the impact three ways at once. A Parallel node fans the scored change list to three assessors — materials, production and costing — so one revision is evaluated on all three axes in a single pass rather than three sequential email threads.
- Supervisor
Merchandiser-supervisor consolidates. A Supervisor agent merges the three assessments into one buyer-facing position: what is absorbable, what moves the ship date, what carries a cost, what is simply not feasible at this stage of the order.
- Approval
Merchandising manager owns the answer. An Approval node holds the whole position — accepting the change, any revised delivery date, any surcharge. A date and a price to a buyer are binding commitments; the agent never sends one.
- Sub-workflow
Trigger re-sampling if the change demands it. If the approved position requires a fresh PP sample, a Sub-workflow node hands off to the sampling recipe below with the style and the accepted change list — one shared sampling workflow, not a copy pasted into every trigger.
- Output
Reply to the buyer + brief the floor. An Output node sends the consolidated response on the buyer's email thread, and a second Output posts the accepted changes to the production floor group on WhatsApp in the line's own language via Sarvam.
Channels & connectors
- Webhook
- Sarvam (Indian languages)
- Knowledge base
- Approval / HITL
- Tool (MCP → ERP/PLM)
Outcome
Every techpack revision comes back as a quoted, field-level change list scored against this buyer's own tolerance rules, with a materials/production/costing position attached — and no date, cost or acceptance leaves the building without a merchandising manager's click.
Why it helps
The mechanism is grounding plus fan-out plus tenant-owned rules: the diff is quoted from the two documents rather than remembered, the three impact views are produced in one parallel pass instead of three sequential threads, and the 'is this absorbable' threshold lives in a formula merchandising can edit per buyer — so the manager decides on a complete picture on day one instead of assembling it by day three.
Build spec
5 agents — 1 diff agent + 3 parallel impact assessors (materials / production / costing) + 1 supervisor that consolidates. Parallel, Approval, Knowledge and Sub-workflow are workflow nodes, not agents. · Pattern: Diff → tenant-authored severity scoring → Parallel fan-out (3 assessors) → Supervisor consolidation → human approval → optional sampling sub-workflow
System prompt (paste-ready)
(Diff agent) Compare the incoming techpack revision against the approved in-production techpack + BOM in Knowledge for style {{style}}. Return strict JSON {changes[{area (MEASUREMENT|FABRIC|TRIM|PRINT|PACKING|LABEL), field, old_value, new_value, delta_cm, status (CHANGED|ADDED|REMOVED), source_quote}], unchanged_confirmed: bool}. Quote old_value and new_value verbatim from the documents — if a value is not stated in one of the two documents, set it null and flag it; NEVER infer or normalise a measurement, and never unit-convert. You produce a change list only: you do not accept the revision, do not estimate a date, and do not price anything.Agent roles & model tiers
Techpack diff agent — Premium tier — the hard step; a missed measurement change becomes cut fabric. Configure an economy fallback model so a provider outage degrades to a slower, flagged diff rather than a stalled buyer thread
Field-level diff of revised vs approved techpack/BOM. Verbatim quoted old/new values, null (not guessed) for anything absent, explicit status per field. No acceptance, no dates, no costing.
Materials assessor (parallel) — Standard tier
Given the scored change list, state materials impact only: which fabric/trim POs are affected, what is already issued or in transit, what must be re-sourced, and the lead time each supplier document actually states. Cite the document; never invent a lead time.
Production assessor (parallel) — Standard tier
Given the scored change list, state production impact only: which cut/sew/finishing operations change, whether cut fabric is affected, whether a new PP sample or re-approval is required, and which line-plan slots move. No dates to the buyer — internal feasibility only.
Costing assessor (parallel) — Standard tier
Given the scored change list, state cost impact only, computed from the rate/BOM data supplied — per-unit material delta, extra operations, rework or write-off of committed material. Show the arithmetic. Never round into a 'ballpark' and never present this as a quoted price.
Merchandiser supervisor — Premium tier — one call, and it produces everything the buyer will read
Merge the three assessments into one draft buyer position: absorbable changes, changes that move the ship date, changes that carry a cost, changes not feasible at this order stage. Flag every conflict between assessors rather than resolving it silently. Output is a DRAFT for the merchandising manager to approve or edit — never phrase it as a confirmed commitment.
MCP connectors
- Apparel ERP / PLM — via Tool (MCP): fetch the style master, BOM and trim card, read which fabric/trim POs are already issued or in transit, and read the current line-plan slot for the style
- Apparel ERP / PLM — via Tool (MCP): attach the approved change note to the style and stamp the accepted revision number (write happens only after Approval)
- Buyer vendor portal — inbound via Webhook (no first-party connector): receives the revision push and its attachment reference
- Email — the buyer's own revision thread, replied to in place
- WhatsApp + Sarvam — floor briefing to the line group in the line's language
Built-in tools
- knowledge_search (style-scoped collection: approved techpack, BOM, trim card, prior revisions for this style only)
- http_request (read line plan and issued POs from the ERP/PLM; attach the approved change note back)
- send_email (reply on the buyer's existing revision thread after approval)
- user-defined tool `change_severity` (SpEL): input.area == 'MEASUREMENT' ? (input.deltaCm > input.buyerToleranceCm ? 'BLOCKING' : 'ABSORBABLE') : (input.area == 'FABRIC' or input.area == 'TRIM' ? 'BLOCKING' : 'REVIEW') — merchandising authors and edits this per buyer in the tool editor; a fussy account gets a tighter tolerance the same afternoon, with no developer and no deployment. It is a formula over the change row only: it reads fields, compares numbers and returns a band. It cannot call the ERP or loop over the change list — the workflow applies it row by row.
Guardrails
- The workflow never accepts a revision, commits a delivery date or quotes a surcharge — all three sit behind the Approval node for the merchandising manager
- Every diff row carries a verbatim source quote; a value absent from either document is returned null and flagged, never inferred — measurements are never normalised or unit-converted silently
- Severity comes from the tenant-authored `change_severity` formula, so the threshold is auditable, per-buyer and editable by the business — the model never decides what counts as absorbable
- The supervisor surfaces assessor disagreement instead of resolving it — a costing/production conflict reaches the human as a conflict
- The floor is briefed and the sampling sub-workflow is triggered only AFTER approval, so no line changes on the strength of an unaccepted revision
Cost strategy
One revision costs: 1 premium diff + 3 standard assessors in parallel + 1 premium consolidation. Parallel buys wall-clock time here, not money — the three assessors cost the same run sequentially or together. Keep the assessors on the standard tier and spend on the two premium calls that bracket them: the diff (where a miss is expensive fabric) and the consolidation (which is what the buyer actually reads). Set an economy fallback model on both premium roles so a provider outage produces a slower flagged answer instead of a dead buyer thread. Revisions are low-volume and high-stakes — the wrong place to economise.
Output & delivery
A quoted field-level change list → each row scored by the tenant's own `change_severity` formula → three parallel impact assessments → one consolidated draft buyer position → the merchandising manager approves or edits at the Approval node → the sampling sub-workflow is triggered if a fresh PP sample is required → an Output node replies on the buyer's email thread while a second Output briefs the floor on WhatsApp via Sarvam, and a Tool (MCP) node attaches the approved change note to the style in the ERP/PLM.