All projects

Tan Quoc SteelWorking ERP prototype "Thep Tan Quoc"

AI steel quotation platform and quote-to-cash ERP prototype

Drawing to draft quote in about 31 seconds (recorded demo)

Role: Designed the quote-to-cash process and the AI extraction rules

Supply chain problem

Manual quotes from drawings slowed order-to-cash; fragmented stock data risked overpromising.

  • Order-to-cash
  • Available-to-promise
  • Procurement
  • Production yield

Tech I used

LLM extraction + barem weight engine for order-to-cash speed, linked to available-to-promise stock

  • Anthropic Claude API
  • React
  • Google Apps Script
  • Google Sheets
  • Vercel serverless

Result

Drawing to draft quote in ~31 s in the recorded demo, against ~200 min manually (my observed estimate).

Recorded walkthrough (silent, steps captioned on screen), with a demo customer, a sample drawing and prices blurred: enter the customer, upload the drawing, AI (Claude API) reads every line item, the quote is built with barem weights and a stock check, then exported to PDF or Excel. About 31 seconds from drawing to quote in this recording.

Before vs after

Before

Manual quoting

~200 minper manual quote (my observed estimate)

  • Read the customer drawing by eye
  • Retype every plate and section
  • Missed items, wrong numbers copied
  • About 200 min per quote (observed)

After

With the platform

~31 sdrawing to draft quote (recorded demo)

  • Upload a photo or drawing
  • AI extracts the steel line items
  • Weights and prices computed automatically
  • Draft quote in ~31 s (recorded demo)

Manual time is my observed estimate from watching sales staff quote, not a timed study. The ~31 s comes from the on-screen timer in the recorded demo.

How I engineered Claude to read steel drawings

Prompt architecture, domain rules and validation I designed so the AI reads dimensions, shapes, weights and handwriting like a steel estimator.

  1. Drawing
  2. Document-type detector
  3. Dimension and shape rules
  4. Uncertainty flags
  5. JSON line items
  6. Barem weight + SKU match
  7. Quote

Layer 1 of 7

Recognise the document type first

  • Document-type classification

I made Claude classify every upload before reading a number: an old Tan Quoc quote, a customer purchase order, a Tekla shop drawing, or a chat or handwritten list.

Each type has its own rules: old quotes are copied verbatim and never recalculated, and the customer is the letterhead company, never Tan Quoc itself.

Layer 2 of 7

Dimensions and thickness

  • Structured JSON output schema
  • Domain rule engine

Any number with "ly" or "li" is the thickness, wherever it sits; the other two are width x length, and metres become millimetres.

Claude reads every page into a fixed JSON schema: a missing BM base plate on page 2 counts as a critical error.

Layer 3 of 7

Shapes become steel items

  • Domain rule engine

I wrote the estimator rules: a circle is a plate on its diameter, a triangle or gusset is half a plate, a trapezoid uses the average width, a pressed Z, L or U sums its flanges.

Four numbers mean an I/H beam, V means a x a x t angle; C/Z purlins sell per metre, and 12 m bars with half quantities split automatically.

Layer 4 of 7

Handwriting and blurry scans

  • Per-field confidence flags

Claude always returns the structured list, never prose: a best guess plus per-field "uncertain" flags and a warning such as "quantity smudged, guessed 36" that highlights the cell for the salesperson.

Each table row is read on its own, never borrowing a quantity from its neighbour; merged cells inherit the label above.

Layer 5 of 7

Weight and naming: the AI never does the maths

  • Deterministic weight from barem tables
  • SKU entity matching with learned aliases

The app, not the model, computes weight from multi-mill barem tables (kg per metre and kg per bar) and every total.

Items follow one naming standard, "[plate type] [thickness]li" with dimensions as fields, and match the SKU catalogue through aliases: one SKU, many trade names, learned over time.

Layer 6 of 7

Scrap awareness

  • Domain rule engine
  • Material yield

For structural drawings, Claude also outputs the unused edge strip of a 1500 mm wide sheet as a scrap line, so cost and yield stay right.

Layer 7 of 7

Model routing, cost and failure controls

  • Model routing (Sonnet 5.5 / Opus 5.5)
  • Effort control
  • Cost and failure controls

Claude Sonnet 5.5 reads by default; a "hard / long drawing" toggle routes to Claude Opus 5.5 with higher effort. I removed the OCR step, so the drawing goes straight to Claude.

Errors show in Vietnamese, and the app never switches models silently, which keeps cost under control.

Try it on a sample drawing

Sample structural drawing made for this portfolio (not a real project): three base plates BM1 to BM3 with dimensions and quantities, an H200x100 column, and a materials table listing plates of 10, 12 and 8 ly, an H section, a V angle and a box section.
Sample drawing made for this portfolio, not a real project.

10 lyThickness rule

"ly" marks the thickness wherever it appears, so this row is a 10 mm plate; 300x200 becomes width x length.

Layer 2: Dimensions and thickness

SL: 8Quantity

"SL" is the quantity: BM1 is 8 base plates. Every BM label must become its own line item.

Layer 2: Dimensions and thickness

Table row 3Independent row reading

Each row is read on its own: 8 ly, 250x150, quantity 12. No quantity is borrowed from the rows above or below.

Layer 4: Handwriting and blurry scans

H200x100I/H vs V rule

H200x100 is an H beam sold by length (L = 6000); a V label such as V50x5 is an a x a x t angle instead.

Layer 3: Shapes become steel items

The ERP architecture I designed: quote to cash

Process design by JohnnyI designed the logic and built the demo; the ERP consultants refined it for the final implementation.

  1. QuoteSales

    I put AI extraction in front of pricing, with price floors: a quote below the floor needs approval before it goes out.

  2. Order closedSales, Director dashboard

    I made "Close order" push revenue, customer and product group to the director dashboard and a Google Sheet in one step.

  3. Inventory checkWarehouse

    I linked every quote line to available-to-promise stock (on hand minus reserved), so a stock shortfall is flagged "order more" before the order is confirmed.

  4. ProcurementPurchasing

    I routed shortfalls to purchases from the mills, and goods receipts for incoming stock feed the same ATP figure.

  5. ProductionProduction

    I specified HRC coil to plates: nesting, cutting diagrams, scrap and yield, so cost per kg reflects real material use.

  6. OutboundOutbound

    I designed delivery slips, weighing and a signed handover record emailed to the customer as proof of delivery.

  7. AccountingAccounting

    I closed the loop in receivables: amounts collected and overdue debt per customer.

Open a step to see the design decision behind it.

SCM concepts applied

  • Order-to-cash
  • Available-to-promise (ATP)
  • Reorder and shortfall
  • Material yield and scrap
  • Proof of delivery

Module 1: automated quoting

  1. 01Step 1 of 5

    Drawing in

    A customer photo, blueprint or drawing is uploaded.

  2. 02Step 2 of 5, Anthropic Claude API

    AI extraction

    Claude API, called from a serverless function, extracts plates and sections.

  3. 03Step 3 of 5

    Barem weights

    Multi-mill barem (steel weight) tables compute the weight of each item.

  4. 04Step 4 of 5, Microsoft Excel

    Price and export

    Pricing applies automatically; the quote exports as PDF, image or Excel.

  5. 05Step 5 of 5, Google Apps Script

    Close order

    Revenue, customer and product group flow to a live dashboard and Google Sheet.

Module 2: HRC plate cutting

  1. 01Step 1 of 4, Anthropic Claude API

    Parts list

    Enter a parts list, or let AI extract it from a drawing.

  2. 02Step 2 of 4

    Nesting

    Parts are nested onto the hot-rolled coil (HRC) sheet size.

  3. 03Step 3 of 4

    Cutting diagram

    The platform draws an SVG cutting diagram.

  4. 04Step 4 of 4

    Yield and cost

    Sheets required, uncoiling and CNC scrap, yield, weight and cost per kg.

Tech stack in this project

  • Anthropic Claude APIReads drawings, orders and handwritten lists into a JSON line-item schema under my domain rules
  • Vercel serverlessServerless function that keeps the API key server-side and routes each drawing to Sonnet 5.5 or Opus 5.5
  • ReactQuoting, stock (ATP), purchasing, cutting and delivery screens of the prototype
  • TypeScriptDeterministic weight, pricing and ATP logic, so totals never come from the AI
  • ViteBuild tooling for the web app
  • Tailwind CSSStyling of the interface
  • RechartsRevenue, product-group and order charts on the director dashboard
  • Google Apps ScriptPushes every closed order to the central Google Sheet
  • Google SheetsShared record of revenue, customer and product group
  • Prompt architecture
  • Domain rule engine
  • Per-field confidence flags
  • Model routing
  • Available-to-promise

Why it matters for supply chain

  • Quote automation = faster order-to-cash; reduces manual retyping (error-rate impact not measured)
  • ATP check = flags stock shortfalls before the order is confirmed
  • Nesting and yield = material planning and scrap reduction
Read the full case study

Problem

Sales staff read customer blueprints by hand, translated them into steel items (plates, sections), looked up weights and prices and typed each quote. From watching them, I estimate this took around 200 minutes per quote including double-checking, with missed items and wrong numbers copied across. Sales, inventory and purchasing ran on fragmented processes, which contributed to stockouts and overpromising.

Approach

  1. I bridged operations staff and the ERP implementation consultants: I mapped the fragmented sales and inventory workflows and gathered the requirements.
  2. I engineered Claude through prompt architecture and domain rules (not model fine-tuning): document-type classification, a structured JSON output schema, dimension and shape rules, and per-field confidence flags for handwriting and blurry scans.
  3. I kept every calculation deterministic: the app computes weights from multi-mill barem tables, matches each line to the SKU catalogue and its learned aliases, prices it, and exports PDF, image or Excel.
  4. I designed the quote-to-cash flow of the working prototype: quote, closed order (revenue to the dashboard and a Google Sheet via Apps Script), available-to-promise check, purchasing, HRC production with nesting and yield, outbound delivery and receivables.
  5. I designed the logic and built the working demo; the ERP consultants refined it before the final production implementation.
  6. Result: in the recorded demo, a sample drawing became a draft quote in about 31 seconds (on-screen timer), against a manual process I estimate from observing sales staff.

Figures are the confirmed dashboard figures or my own estimates, labelled as such.