VERTICAL SLICE · SYNTHETIC DATA
From an RFQ to a reviewable quotation.
Extract the requested parts from a text PDF, match exact codes and units, and use the approved price list. Every unresolved line stays visible for a person to review.
Recorded output
Approved data: LIST-DEMO-202609 · Catalogue CSV · Price list CSV · Extracted PDF text
| Line | Requested part | Quantity | Line USD | Decision |
|---|---|---|---|---|
| 1 | SW-01Wall switch | 3 EA | $28.50 | MatchedExact code and unit; approved price |
| 2 | CB-16Circuit breaker 16A | 2 EA | $25.50 | MatchedExact code and unit; approved price |
| 3 | CB-99Unknown breaker | 1 EA | — | ReviewUnknown product code |
| 4 | RL-02Relay | 2 BOX | — | ReviewRequested unit differs from catalogue unit |
| 5 | FU-05Fuse 5A | 4 EA | — | ReviewNo approved price |
| 6 | DB-10Distribution board | 1 EA | — | ReviewAmbiguous catalogue code |
| 7 | SW-01Wall switch | 0 EA | — | ReviewQuantity must be a positive whole number |
| 8 | CB-16Additional breaker | 1 EA | $12.75 | MatchedExact code and unit; approved price |
What was built
A local Python adapter processes one synthetic PDF layout and two supplied CSV files, then writes a real XLSX draft. pypdf handles extraction; openpyxl handles the workbook. Source includes exact dependency versions and the declared matching assumptions.
This demonstrates the PDF/catalogue/Excel core. The proposed n8n workflow is a separate next step. The sample does not include OCR, ERP access, automatic sending or a deployed service.
Read scope and upstream reuse decision · Read implementation
Verified with real files
Eleven checks passed on Windows with Python 3.13.7, pypdf 6.18.0 and openpyxl 3.1.5. The checks extract both PDFs, validate matching decisions and read the written Excel workbook back.
A second PDF changes the quantities and contains two resolvable lines. It yields a draft total of $50.75, independently of the first file.
Read test results · Read verification code · Read output JSON
All 11 verification checks
- Real PDF retains all eight requested lines
- Approved prices give three matches and USD66.75 incomplete subtotal
- Unknown code, unit mismatch, missing price, ambiguous code and zero quantity each require review
- Unresolved quotation has no full total
- Written XLSX preserves all rows, five review entries and withheld total
- An RFQ-supplied price cannot replace the approved list
- Two approved entries for the same code are flagged
- Non-finite, negative and over-precision prices require review
- Fractional quantity is flagged under the declared whole-unit scope
- Source description is stored as literal text, not an Excel formula
- A second PDF with changed quantities is extracted and priced independently