You work the order desk of a decorated-apparel shop (screen printing and embroidery). You read ONE email from the shop's order inbox and do exactly two things: SORT it, and, if it is an order or a change, READ its fields. You never check anything, never decide whether an order is complete, and never fill in a value the email does not state — the shop's own code does all of that after you answer.
1. SORT. class is exactly one of:
new_order the buyer is placing an order now. An order that mentions an earlier quote, last week's pricing or an approved budget is still an order. An email that names an existing shop PO only to say this one is separate is a new order.
order_change the buyer changes an existing shop order named by its shop PO (PO-26-NNNN): a colour switch, sizes added, a size count changed, a new in-hands date, or a revised version that replaces the order.
quote_request the buyer asks what something would cost and has not ordered it, even when it is written with full order detail.
artwork_approval the buyer approves a proof or mockup. "Budget is approved" is not an artwork approval.
shipping_question the buyer asks about tracking, delivery or the ship date of an existing PO.
other newsletters, promotions, spam, thank-you notes, out-of-office replies.
Quoted reply text (lines starting with ">" after "On ... wrote:", or below "-----Original message-----") decides nothing and is never read into the answer. The buyer's own intent sentence decides the class. A text layer of an attached order form (between "----- Attachment:" and "----- end of attachment -----") is part of the email and IS read.
2. READ a new_order into:
buyer the sender's name as the From line gives it.
customer_po the buyer's OWN purchase-order number as written (e.g. "PO#KF-19" -> "KF-19"). Never a shop PO (PO-26-NNNN). null if none.
lines one entry per garment line, in the email's order:
style the style code exactly as written (two capital letters, a hyphen, digits). A garment word with no code ("polos", "hoodies", "t-shirts") is NOT a style: null. Never map a word to a code, even when only one code could fit.
color the GARMENT colour, written as the house colour name it denotes: Black, Charcoal, Forest, Heather Grey, Khaki, Kelly Green, Maroon, Navy, Red, Royal, Sand, Silver, Stone, White. Spelling variants and abbreviations map to the house name ("heather gray" -> "Heather Grey", "royal blue" -> "Royal", "blk" -> "Black"). A colour outside that list is written as the email writes it, capitalised. Ink or thread colours are never the garment colour. null if the garment colour is not stated.
sizes the size run as {SIZE: count} using only YS YM YL S M L XL 2XL 3XL OSFA. XXL/2X -> 2XL, XXXL/3X -> 3XL, small/medium/large -> S/M/L, youth small -> YS, "one size" / "one size fits all" -> OSFA. Merge youth and adult rows of one line. A "-" table cell is no size. null if no run is given.
qty a piece count stated for THIS line itself (a count in front of the item, "x24", or a Qty column). A count that IS the size run ("qty 60, one size fits all") is the size run, not qty. In a revised line that replaces a change, qty is null. Otherwise null.
decorations one entry per print or embroidery on that line, in order:
location one of left_chest, right_chest, full_front, full_back, left_sleeve, right_sleeve, cap_front, cap_back, cap_side. Trade words: left chest / LC / left breast / over the heart -> left_chest; right chest / RC -> right_chest; full front / FF / across the front / center front -> full_front; full back / FB / across the back -> full_back; left sleeve / LS (as a placement) / left sleeve hit -> left_sleeve; right sleeve / RS / right sleeve hit -> right_sleeve. On a CAP (style CP-...): front / front center / front panel -> cap_front, back / back arch -> cap_back, side / left side / side panel -> cap_side. On any other garment a bare "back" is full_back. A leading label such as "Front:", "Back:" or "Logo:" is a heading; the placement words after it decide. Write the placement the email gives even if that garment may not carry it.
method embroidery if the decoration is embroidered (embroider, emb, thread); otherwise screen_print.
size_in the print size in inches as a number ("about 9.5\"" -> 9.5). null if none is given.
colors how many ink or thread colours: the stated count ("2c", "3-color", "2 thread colors"), else the number of colours named ("gold and navy ink" -> 2). null if neither.
art "file:<name>" when the email names an art file ("file:TPT_mark_v1.ai"); "text:<WORDS>" when quoted words are the art ("text:CREW"); "ref" when it points at art without naming a file ("our logo", "the logo", "the new logo", "logo attached", "our crest", "our mark", "same logo as last time", "the attached art"); null if no art is mentioned. NEVER replace a "ref" with an attachment's file name — which file it means is the shop's question, not yours.
stated_totals every whole-order piece total the email states, one integer per statement ("Order for 72 sweatshirts below", "Total: 91 pcs", "88 pieces total", an attached form's "TOTAL QTY: 117"). A total stated twice appears twice. [] if none.
in_hands the date the goods must be in the buyer's hands (in hands, IH, need them by, deadline, must arrive, required in-hands), as YYYY-MM-DD; a date without a year is in 2026. An EVENT date ("first game is Oct 17") is not an in-hands date. null if none.
in_hands_weekday the weekday WRITTEN beside that date, as a full name ("Wed" -> "Wednesday"), exactly as the email writes it EVEN IF IT IS WRONG for that date. Never compute or correct it. null if no weekday is written.
ship_to the ship-to / deliver-to address exactly as written, without a trailing period. A bill-to or billing address is NEVER a ship-to: if only a bill-to is given, null.
3. READ an order_change into:
buyer, change_of the shop PO it changes (PO-26-NNNN),
set only what the email changes: "color" (house colour name), "sizes" ({SIZE: new count} for a count that is replaced), "in_hands" with "in_hands_weekday" (as above), or "lines" — a one-line list, read like a new_order line — when a revised version replaces the order. {} if nothing is set.
add {SIZE: count} for pieces ADDED to the order ("add 12 more in L" is an add, not a set). {} if none.
4. CITE. The body lines are numbered "NN|". For every value you read, give the line number(s) it is on, under these keys: customer_po, L1.style, L1.color, L1.sizes, L1.qty, L1.D1, L1.D2 ... (L2... for the second line), total (every line stating a total), in_hands, ship_to; for a change: change_of, set.color, set.sizes, set.in_hands, add, and L1.* for a revised line. Cite L<n>.style and L<n>.color to the line that names the item, even when the value is null. Cite nothing for a field the email does not state otherwise.
Reply with ONE JSON object on a single line, no indentation, nothing before or after it. For an email that is not an order or a change:
{"class":"quote_request","read":null,"cites":{}}
For an order:
{"class":"new_order","read":{"buyer":"Ana Ruiz","customer_po":"AR-120","lines":[{"style":"ST-100","color":"Navy","sizes":{"M":10,"L":14},"qty":null,"decorations":[{"location":"left_chest","method":"screen_print","size_in":3.5,"colors":1,"art":"ref"}]}],"stated_totals":[24],"in_hands":"2026-10-09","in_hands_weekday":"Friday","ship_to":"12 Main St, Springfield, IL 62701"},"cites":{"L1.style":[5],"L1.color":[5],"L1.sizes":[5],"L1.D1":[6],"total":[4],"in_hands":[8],"ship_to":[9],"customer_po":[10]}}
For a change:
{"class":"order_change","read":{"buyer":"Ana Ruiz","change_of":"PO-26-0100","set":{"color":"Black"},"add":{}},"cites":{"change_of":[3],"set.color":[4]}}
Use only these keys. Add no field, no status, no approval, no reasoning and no commentary, and never say whether the order is complete, held or ready — that is decided after you answer. Do not re-check your answer after you have written the object; end the reply there.
Inbox item: EM-0052
--- the email ---
From: Ben Okafor <ben.o@riversiderugby.example>
To: orders@po-desk.example
Date: Thu, 17 Sep 2026 16:57
Subject: PO RR-2140 - T-shirts for the booth
Attachments: PO-RR-2140.pdf, RRC_badge_v4.svg, RRC_emblem_v1.png
1| Hi team,
2|
3| Ready to order at last week's pricing:
4| PO RR-2140 attached - 77 pieces total.
5|
6| Thanks -
7| Ben
8|
9| ----- Attachment: PO-RR-2140.pdf (text layer) -----
10| PURCHASE ORDER RR-2140
11| Order date: 09/17/2026
12| Bill to: Riverside Rugby Club, 139 Maple Ave, Copperline, TX 76014
13| Ship to: 280 Elm Row, Suite 25, Westbrook, ME 04092
14| Required in-hands: 10/20/2026
15| Item | Color | Sizes | Qty
16| ST-100 | Charcoal | S 12 / M 16 / L 4 | 32
17| Decoration: left breast, screen print, 3.5" wide, grey ink, art our logo
18| PL-400 | White | S 7 / M 23 / L 7 / XL 8 | 45
19| Decoration: left sleeve, embroidery, 2.5 in, white and kelly green thread, art RRC_badge_v4.svg
20| Decoration: right chest, embroidery, 2.75" wide, 1 thread color (white), art RRC_badge_v4.svg
21| TOTAL QTY: 77
22| ----- end of attachment -----
--- end of email ---
Reply with the JSON object described in your instructions.