The Problem
An export-focused textile manufacturer with 800+ staff was running on SAP, but the system was being used as a glorified ledger. Orders came in via email from international buyers in 4 different formats. Production planning happened on a whiteboard. Vendor invoices were paper, scanned to a shared drive, and entered into SAP by an AP team of 6 people who were constantly behind.
The CEO had been quoted USD 280K for a "digital transformation" by a consulting firm. He was looking for a more pragmatic path.
What I Built
A targeted automation layer that integrates with SAP rather than replacing it:
1. Order intake automation. Inbound buyer emails are parsed by Claude (handling Excel attachments, inline tables, narrative requests, and PDFs). Extracted orders are validated against the buyer's master agreement and dropped into SAP via the existing API.
2. Production scheduling assistant. An optimisation engine reads the active order book + machine availability + raw material inventory and proposes the next 14 days of production. The factory manager approves or adjusts; the system schedules accordingly. The whiteboard is gone.
3. Vendor invoice OCR + 3-way match. Vendor invoices are dropped into a watched folder. OCR extracts line items; Claude matches against the corresponding PO and goods-receipt note (3-way match). Matched invoices are auto-approved into SAP. Mismatches are flagged with a specific reason for the AP team to investigate.
4. Export documentation automation. Bills of lading, commercial invoices, packing lists, and certificates of origin are auto-generated from the SAP order at shipment time.
- 01TriggerBuyer email arrives
International buyers send orders in 4 different formats: Excel attachments, inline tables, narrative requests, PDFs.
- 02StepClaude parses & validates
Order extracted, validated against the buyer's master agreement, then dropped into SAP via the existing API.
2.5h → 8 min - 03StepProduction schedule proposed
Optimiser reads active order book + machine availability + raw material inventory and proposes the next 14 days of production.
- 04DecisionFactory manager approves
Manager adjusts and confirms; the whiteboard is gone. Schedule revisions go from weekly to daily.
- 05StepVendor invoices 3-way matched
OCR + Claude match vendor invoice against PO and GRN. Matches auto-approve into SAP; mismatches flagged with the specific reason.
- 06OutputExport docs auto-generated
Bills of lading, commercial invoices, packing lists, certificates of origin produced from the SAP order at shipment time.
31d → 19d cycle
Outcome
In 14 months, the manufacturer absorbed a 22% volume increase without adding production staff. Late-shipment penalties. a recurring P&L drag. dropped 88%. The CEO described it later as "the cheapest mistake I almost made". meaning the consulting firm's USD 280K bid that he'd nearly accepted. Total cost of the targeted automation: under USD 50K to build and roughly USD 1,800/month to run.