Case Study: How We Built a Custom ERP from Scratch with AI
When a client tells you “I need an ERP, but no ERP on the market fits my business,” you have two options. The first: force the company to adapt to generic software. The second: build exactly what they need. At PIWA, we chose the second option. And we built it with AI.
Here is the full story of this project — the context, the problems, the technical solution, and the measurable results.
The Context: A Specialized SMB Drowning in Tools
Our client is an industrial SMB with 35 employees, specializing in technical materials distribution. Their daily reality: receiving client requests, producing quotes, managing inventory, placing supplier orders, invoicing, and tracking a sales pipeline of over 200 active prospects.
Before our intervention, the company was using a patchwork of 7 different tools:
- An Excel spreadsheet for quotes (with formulas that broke regularly)
- An underused basic CRM
- Accounting software disconnected from everything else
- Shared files for inventory tracking
- Emails for supplier coordination
- A Trello board for the sales pipeline
- Word documents for purchase orders
The result: 12 hours per week lost to re-entering data between tools. Recurring stock errors (an average of 3 per month). Quotes that took 48 hours to send instead of 2. And near-zero commercial visibility — the CEO could not tell how many quotes were pending approval at any given moment.
The Diagnosis: Identifying Real Pain Points
We started with a 2-day AI audit. The goal was not to “put AI everywhere” but to identify the processes where automation would have the greatest impact.
The 5 critical processes identified:
- Quoting cycle — from client request to signed quote
- Inventory management — levels, replenishment, alerts
- Sales cycle — prospect tracking, follow-ups, conversion
- Invoicing — from validated order to sent invoice
- Lead sourcing — identification and qualification of new prospects
Each of these processes involved at least 3 different tools and 2 manual data entries. The error source was systemic, not human.
The Solution: A Custom Quasi-ERP Built to Fit
Rather than imposing a generic ERP (Odoo, SAP Business One, Dolibarr), we built a bespoke solution that maps exactly to the client’s business. The reasoning is straightforward: off-the-shelf ERPs would have covered 60% of the need, and the remaining 40% would have required permanent workarounds.
Technical Architecture
The solution rests on three layers:
- User interface: a responsive web application built with Lovable (AI-generated frontend), optimized for mobile use by field sales teams
- Business logic and automations: n8n for workflow orchestration, with AI nodes for intelligent data processing
- Database: Supabase (managed PostgreSQL) for persistence, with pre-calculated business views
The 5 Deployed Modules
Module 1 — Automated Quoting
The sales rep enters quote lines in the interface. AI pre-fills unit prices from historical data, applies margins by client category, and generates a branded PDF. The quote goes out in under 15 minutes instead of 48 hours.
Result: quote generation time reduced by 95% (from 2 days to 15 minutes).
Module 2 — Complete Sales Cycle
Every prospect is tracked in a visual pipeline with 6 stages. AI analyzes interactions (emails, logged calls) and suggests follow-up actions. The CEO has a real-time dashboard: number of open quotes, conversion rate, projected revenue.
Result: conversion rate improved by 18% within 3 months thanks to automated follow-ups.
Module 3 — Intelligent Inventory Management
Stock levels update automatically with each sale and each supplier delivery. AI calculates replenishment thresholds based on consumption history and triggers alerts. Supplier purchase orders are pre-generated.
Result: zero stockouts in 4 months (versus 3 per month before).
Module 4 — Connected Invoicing
When a quote is accepted and delivery is confirmed, the invoice is generated automatically with all previously entered information. One-click accounting export to the existing software. Zero re-entry.
Result: 6 hours per week saved on invoicing and accounting data entry.
Module 5 — AI Lead Sourcing
An n8n workflow monitors public tenders, industry announcements, and buying signals (relocations, hiring, funding rounds) to identify qualified new prospects. AI scores them by relevance and injects them into the sales pipeline with a pre-filled prospect card.
Result: 40 qualified leads per month generated automatically, with a 12% conversion rate to clients.
Timeline and Investment
The complete project was delivered in 5 weeks:
- Week 1: audit + detailed specifications
- Weeks 2-3: development of modules 1 through 3
- Week 4: development of modules 4 and 5
- Week 5: testing, fixes, team training
The total investment falls within our AI implementation range (EUR 8,000 to EUR 30,000), an amount that was recouped in under 3 months through measured productivity gains.
Results at 6 Months
| Metric | Before | After | Improvement |
|---|---|---|---|
| Quote generation time | 48h | 15 min | -95% |
| Stock errors per month | 3 | 0 | -100% |
| Hours of re-entry per week | 12h | 0h | -100% |
| Sales conversion rate | 14% | 16.5% | +18% |
| Qualified leads per month | 8 (manual) | 40 (auto) | +400% |
| Weekly invoicing time | 8h | 2h | -75% |
In total, the company recovered the equivalent of 26 hours per week of productive time. That is like hiring a part-time employee — without the overhead.
What This Project Taught Us
Three key lessons from this implementation:
1. AI is not the star of the project. It is an accelerator. The real work is understanding the business, modeling processes, and architecting the solution. AI makes development 3 to 5 times faster, but it does not replace thinking.
2. Custom beats generic when the business is specific. A standard ERP would have cost the same (license + customization + training) without covering the actual needs. Custom costs the same price and fits perfectly.
3. Client autonomy is non-negotiable. The client modifies their own quote templates, adds product categories, adjusts stock thresholds. They depend on nobody for day-to-day operations.
Conclusion: Your Business Deserves a Tool That Fits
If you are still running on a patchwork of poorly connected tools, you are losing time and money every day. A custom ERP, built with AI, can be operational within weeks and pay for itself within months.
At PIWA, we have the experience for this type of project. And every case is unique.
Let us discuss your project — 30 minutes to understand whether a custom solution is the right approach for your business.
Free checklist: 10 processes to automate with AI
Identify your company's automation potential in 2 minutes.
The AI Brief — 3x per week
Essential AI news for business leaders. Free, no jargon.