building an ai-powered order system
date: December 16, 2025
Problem:** A pet food manufacturer is processing orders manually into a ten year old, on-prem ERP system. Their customers sent orders via email as PDFs or spreadsheets, and staff read each document and typed data into two separate ERP systems for every order. The average processing time for a single order was 30 minutes, and they processed thousands of orders per month.**

Solution:** An order management system on Medusa that automates the entire flow. An email arrives with a PDF or spreadsheet, and the AI parses the unstructured data into structured data in just a few minutes. The system creates a draft order, and the staff reviews and confirms. Finally, the order syncs to the correct ERP.**
Result:** 9x faster order processing. 80% cost reduction. Most orders now flow through automatically.**
Why It Worked
Medusa’s modular architecture let us build exactly what was needed. We extended it with custom modules for each ERP (IFS and Tropos), added AI parsing workflows, and built a tailored Admin UI. With this approach, we could leverage OOTB capabilities of Medusa and extend with the specifics needed to solve the problem, and we could focus on the part that would bring most value to the business.
The tech stack: Medusa 2.5 for the OMS backbone, Medusa Admin with a custom-developed Microsoft SSO for the UI, AWS (Fargate, CloudFront) via SST v3, PostgreSQL on Neon, SOPS for secrets management.
What I Learned
Start with workflows, not screens. And with this I mean, understand the business and the processes. This provided a lot of input to map the entire order flow before writing code. This made technical decisions obvious. Understanding the process came before choosing technology. The process mapping also helped a lot to understand the technical limitations of both ERP systems that needed to be integrated. Pain experienced by the end user clearly showed the technical challenges with both ERP systems. And so many lessons learned for integrating 10-year-old, on-prem ERP systems with a modern cloud-hosted solution.
Modular wins. Each ERP got its own module. When one ERP changes (like Tropos switching from VPN to direct API), we update one module.
AI is a tool, not magic. It parses emails well, but humans still review orders. The system suggests, provides insights on accuracy and finally the staff confirms. This balance enables production reliability. Trust but verify.
The Details
INSPIRED Pet Nutrition is now scaling the system to a third ERP after another acquisition. The architecture evolved into a reusable B2B automation product we’re offering to other manufacturers. Read the full case study on Medusa’s blog.
I led this project as Solution Delivery Director at rb2, with some solution architecture and hands-on coding mixed in. We help companies build custom commerce systems that actually work.