PRIME PRODUCTS · MISSION CONTROL
AI-first transformation · by TPL · vanos.tpl.one

Docs / 08-transformation/03-discovery/sample-order-emails-analysis-2026-07-13

Prime Key-Account — Discovery Note: Automated Order Entry & Quotation↔Order Mapping

Discovery note based on sample email threads from key-account client Prime Products, as the basis for a project that automatically registers orders and maps them to quotations — where all communication happens exclusively by email.

type: note updated: 2026-07-15 owner: taranas

Prime Key-Account — Discovery Note: Automated Order Entry & Quotation↔Order Mapping

Raw source: raw/data-samples/sample-order-emails-2026-07-08-13.md (per ADR-012) — this note supersedes the first metadata-only pass with a full distillation, the underlying PDFs having since been read via Outlook web (see §8). Feeds REQ-014.

1. Purpose

Build a system for our key-account client Prime Products (Prime LTD, Piraeus) that automatically registers incoming orders and maps each order to its originating quotation. The defining constraint: all business communication happens exclusively over email — there is no customer portal, EDI, or API. The mailbox is therefore the only data-entry point, and the whole automation must be built on top of email ingestion + parsing.

About the data below: these 5 threads are example orders deliberately requested as a sample corpus, so the automation can be designed for Prime. They are not live tasks to action here — they are the project’s reference dataset.

2. Data source (sample corpus)

  • Forwarded by: Fotini Tsampa — Customer Service, Prime Products (ftsampa@primeltd.com)
  • Landing point: the shared mailbox prime@tpl.gr (kotsalidis explicitly asked her to send everything there so the whole TPL team receives it — TEIDE thread, 7 Jul 2026)
  • Volume: 6 messages across 5 threads (LPG ECO ARCTIC arrived as 2 near-duplicates)
  • Period: 8–13 July 2026
  • Access note: the real order/quotation content lives in PDFs nested inside forwarded emails, read via Outlook web (see §8).

3. The threads at a glance

VesselLifecycle stageCustomer (shipowner/manager)Key document(s)RefsPort / destination
MV DESERT SPRINGQuotation → Order (complete)Atlantic Bulk Carriers Mgmt11777.PDF (quote), E_ORD_MORI-3S904085B.pdf (order)Offer 11777 / PO MORI-3S904085A→BSingapore (agent: Unitrust)
MV STAR CARIOCAOrder acknowledged (upstream)Star BulkMartek Sales Order Ack 36222 so.pdfPrime PO 4474 / Martek SO 36222Younghung, Korea (agent: Olympic Maritime)
MV SASEBO GREENRFQ → quoting in progressFundador Compania Naviera SARFQ email + Martek gas-mix quoteJubail, Saudi Arabia (or via Fujairah)
MV LPG ECO ARCTICFulfillment / logistics(via Martek shipping)Air Waybill 020-41858316 Shippers Copy.pdfAWB 020-41858316Cairo (air freight, LH949/LH8290)
MV TEIDEFollow-up / chasernone (text only)

4. The supply chain (parties & roles)

Every order moves through a consistent four-tier chain. The automation’s data model must represent all of them:

  • Customer / shipowner-manager — places the requirement for a specific vessel:
    • Atlantic Bulk Carriers Management (purchasing@atlanticbulk.gr, Giannis Lamprou)
    • Star Bulk (msqkamsar@starbulk.com, Vania Vlachou)
    • Fundador Compania Naviera SA (tech@fundador.gr, John Georgiadis / Konstantinos Andreadakis)
  • Broker / distributor — Prime Products (the client we’re building for), Piraeus. Contacts: Fotini Tsampa (customer service), customer.service@primeltd.com, sales@primeltd.com, servicegr@primeltd.com (Alexandra Apergi / “Prime 247”), Andromachi Tsatsou (atsatsou@…), Theofilos Makris (tmakris@…).
  • Manufacturer — Martek Marine Ltd / FastCalGas, Rotherham UK (maggi.taylor@martek-marine.com, Amanda Woolley, Sarah Rouse). Prime sources the goods here.
  • Port delivery agent — receives/delivers at the vessel’s port: Unitrust Marine Services (Singapore), Olympic Maritime Inc (Korea), local agents at Jubail/Fujairah, Cairo (air-freight leg).

Note on the extra Prime-side contacts (Tsatsou, Makris, Apergi, and the sales@/servicegr@ mailboxes): the sample corpus doesn’t confirm whether these people sit inside the 3-person cylinders team (department-cylinders.md) or in a separate Prime customer-service/sales function. Treat as unconfirmed until the pending team-details email lands — don’t assume they fill the “2 more operators” slot.

5. Document lifecycle over email

The same document types recur in a predictable sequence — this is the pipeline to automate:

  1. RFQ (free-text email from customer) — e.g. Fundador for SASEBO GREEN.
  2. Quotation — Prime PDF named <OfferNo>.PDF (e.g. 11777.PDF).
  3. Purchase Order — customer PDF named E_ORD_<PO>.pdf (e.g. E_ORD_MORI-3S904085B.pdf).
  4. Sales Order Acknowledgment — manufacturer PDF from Martek (e.g. 36222 so.pdf), against Prime’s PO number.
  5. Shipping / logistics docs — Air Waybill, tracking/POD (e.g. 020-41858316 Shippers Copy.pdf).
  6. ETA / port notices — from port agents (e.g. Olympic Maritime, ETA Younghung 08-Jul).
  7. Follow-up / chasers — status requests (e.g. TEIDE).

6. Worked example — DESERT SPRING (full quote → order chain)

Real data extracted from the two PDFs.

① QUOTATION — 11777.PDF (Subject: MORI-3S904085A)

  • Prime Products, Offer No 11777, dated 30/06/2026, vessel DESERT SPRING.
  • Customer: Atlantic Bulk Carriers Management, attn Giannis Lamprou.
  • Item 1 — code 85153803T: CALIBRATION CYLINDER 2.5% CO2/N2, 103LT (only 8 in stock) — 1 PCS × 140.00, disc 10% → 126.00
  • Item 2 — code 152: FREIGHT EXPENSES (UK → Singapore) — 1 PCS × 320.00 → 320.00
  • Gross 460.00 − Discount 14.00 = Net 446.00 EUR. Terms: valid 30 days, 60-day credit, ex works UK, FedEx, ~5 working days transit.

② ORDER — E_ORD_MORI-3S904085B.pdf (P.O. MORI-3S904085B, 03/07/2026)

  • Vessel DESERT SPRING, Dept DECK-SAFETY, Order Port/Due Singapore / 29/06/2026, Vendor Reference 11777 (= the quotation’s Offer No).
  • Item — code 900001, 1 SET: CO2 CALIBRATION CYLINDER (2.5% vol, flow 0.2 LPM, size 60DA, gas CO2; object: CO2 meter, NDIR, model iGAS CO2 by SENKO) — 140.00 less discount → Total 126.00 EUR.
  • Cover email (Lamprou → Prime): “FREIGHT EXPENSES WELL NOTED AND APPROVED” — freight (quote item 2) approved separately.
  • Deliver to: Unitrust Marine Services Pte Ltd, Singapore.

The quote↔order mapping to automate:

QuotationOrder
ReferenceMORI-3S904085AMORI-3S904085B
PDF11777.PDFE_ORD_MORI-3S904085B.pdf
Link keyOffer No 11777Vendor Reference 11777
Cylinder126.00126.00 ✅
Freight320.00approved separately

Two independent match keys: (a) shared base P.O. id with suffix A=quote / B=order, and (b) Offer No == Vendor Reference (11777). They cross-validate each other.

7. Additional extracted data (other threads)

STAR CARIOCA — upstream order acknowledgment (Martek). Customer Star Bulk. Martek Sales Order Acknowledgment 36222 so.pdf: our (Prime) Purchase No 4474, Martek SO 36222, order/ship date 08 July 2026, 45-day credit, INCOTERM Delivered At Place, vessel 9719549 STAR CARIOCA, ship-to via Olympic Maritime (Korea). Line items (gas detector calibration cylinders), currency USD:

CodeDescriptionQtyUnit (USD)Line (USD)
103432FCG40075 (12M) 20ppm H2S, 60ppm CO, 1.45% CH4, 15% O2/N2 (34L)265.00130.00
101217FCG30020 (30M) Gas 50% CH4/N2 (34L)155.0055.00
107648FCG59264 Gas 20ppm H2S, 60ppm CO, 2.5% CO2, 1.45% CH4, 15% O2/N2 (34L)298.00196.00
103351FCG28002 (30M) Gas 99.99% N2 (34L)155.0055.00
SRV001Carriage to customer1248.00248.00
Total incl. VAT684.00

Port ETA: Younghung, Korea 08-Jul-2026 (agent Olympic Maritime). Note the second currency (USD here vs EUR on the Atlantic order) — the model must be currency-aware.

SASEBO GREEN — RFQ, quoting in progress. Customer Fundador Compania Naviera SA. RFQ (Mar 2026): 2 pcs gas 25ppm H2S/100ppm CO/1% CO2/2.2% CH4/18% O2/N2 (34L, “new mix”), 1 pc gas 0.5ppm PH3/N2 (34L), 1 pc fixed-flow regulator 0.5 LPM — delivery at Jubail (or via Fujairah), asking for delivery cost. Martek/FastCalGas quoted the made-to-order mix at $116.02, 5 working days, ex works UK.

LPG ECO ARCTIC — fulfillment/logistics. Martek/FastCalGas air-freight: Air Waybill 020-41858316 (Shippers Copy.pdf), Lufthansa LH949 / LH8290, ETA Cairo 01:30 / 26. Vessel transiting Suez.

TEIDE — follow-up. 13 Jul, Fotini → kotsalidis (cc taranas, tsamis): asking whether there’s any news / anything else needed. No attachments. Shows the manual chasing the automation should remove.

8. Where the data lives (access constraint)

The order/quotation PDFs exist, but they are nested inside forwarded emails (message/rfc822), not direct attachments. Two access paths behave differently:

  • Microsoft 365 search connector — does NOT expose nested content (“nested item content is not exposed”); MIME parts have no Graph message ID. Returns metadata only.
  • Outlook web (browser) — opening the email → the forwarded Outlook Item → the PDF renders in full. This is how §6/§7 were extracted.

Implication: the automation needs Microsoft Graph with full access to nested items + attachments ($value, recursion into rfc822) or direct mailbox access (IMAP/EWS) plus PDF text extraction / OCR. A plain search connector is not sufficient.

9. Patterns that anchor the automation

  • Single ingestion point — everything converges on prime@tpl.gr.
  • Quote→order numbering — same base P.O. id, suffix A=quotation, B=order (MORI-3S904085A/B).
  • Offer↔Order cross-key — the quotation’s Offer No reappears as the order’s Vendor Reference (11777): a second, independent join key.
  • PDF filename convention — orders E_ORD_<PO>.pdf; Prime quotations <OfferNo>.PDF; Martek acks <SO> so.pdf. Filename alone gives type + reference.
  • Structured subjectsVSL: <vessel>, ORDER|QUOTATION: <ref>, VENDOR: <name> and MV <vessel> ETA <port> — regex-parseable.
  • Four-tier party model — customer → Prime → manufacturer → port agent (see §4).
  • Multi-currency — EUR and USD both appear; store currency per document.
  • Nested/forwarded MIME — chains carry multiple forwards; parser must recurse and keep the latest valid state.
  • Dedup — near-duplicates occur (LPG ECO ARCTIC ×2) and must not create double records.
  • Consistent identities — fixed sender domains (primeltd.com, martek-marine.com, atlanticbulk.gr, starbulk.com, fundador.gr) enable routing/whitelisting.

10. Requirements (draft)

  • Email ingestion from prime@tpl.gr with full body + nested attachments (Graph app permission / IMAP / EWS).
  • PDF extraction (text + OCR fallback) for quotations, orders, Martek acks, AWBs.
  • Subject + document parser (regex) for VSL / ORDER / QUOTATION / VENDOR / ETA / port / Offer No / Vendor Reference.
  • Quote↔Order matcher on (a) base P.O. id suffix and (b) Offer No = Vendor Reference.
  • Data model: Vessel, Customer, Vendor/Manufacturer, PortAgent, Quotation, Order, SalesOrderAck, LineItem, Shipment/AWB, Thread/Message, with currency + status.
  • Idempotence / dedup, and latest-state tracking per thread across forwards.
  • Lifecycle status engine — RFQ → Quoted → Ordered → Acknowledged → Shipped → Delivered → Closed.

11. Conclusion

The sample corpus confirms this is automatable and reveals a clean, repeatable structure. Prime’s business runs as an email-driven brokerage: shipowners send vessel-specific requirements, Prime quotes (sourcing from Martek/FastCalGas in the UK), the shipowner issues a PO that ties back to the quotation by number, Martek acknowledges against Prime’s PO, and goods ship to a port agent — every step arriving as email + PDF. The two deterministic join keys (P.O. base id A/B, and Offer No = Vendor Reference) make quote↔order mapping reliable without fuzzy matching. The main build risk is access, not logic: the payload lives in PDFs nested inside forwarded emails, so the ingestion layer must use Graph/IMAP with nested-attachment + PDF-extraction support, not the simple search connector. With that in place, a parser keyed on the subject/filename conventions plus a currency-aware, four-tier data model covers the full observed lifecycle end to end.

12. Open questions

  • Full scope of vendors/manufacturers beyond Martek/FastCalGas, and of customers beyond the three seen.
  • Are Prime quotations and orders always the observed PDF templates, or do formats vary by customer?
  • Target system of record for a registered order (ERP / DB / spreadsheet)?
  • Desired approval step before an order is committed automatically?
  • How are multi-currency and freight-as-separate-line handled downstream?

Source: 6 emails from ftsampa@primeltd.com (8–13 Jul 2026), mailbox prime@tpl.gr. PDFs read via Outlook web after the M365 connector could not expose nested content — see §8.