How Biodéal Turned Email Orders Into SAP Entries in Under a Minute
Biodéal's customers order by email in every format imaginable — PDFs, scanned forms, spreadsheets, free text. Mirage built a pipeline that reads each one, applies Biodéal's own business rules, and creates the order directly in SAP Business One.
About Biodéal
Biodéal is a distributor of organic dairy products — cheese, milk, butter — supplying retail chains, bakeries and wholesalers. Its customers place orders by email, and each one has its own format: PDFs generated by their own ERP, Word or ODT tables, scanned order forms, or plain text in the body of the email, each with its own quantity conventions ("12 / 5 Kg", "PACK (X6P)", columns with no unit at all).
Before Mirage, every one of those orders was keyed into SAP Business One by hand by the ADV team: reading the document, matching the customer and products against the catalog, converting quantities between kilos, cases and units, picking the right shipping warehouse, applying discounts. Repetitive, slow, and exposed to data-entry errors.
Where it started
Mirage built a fully automated email-to-SAP-order pipeline, live in production since July 22, 2025 — the date of the first order it processed for real.
What Mirage built
- Intake — Biodéal's Outlook inbox is wired to a webhook (Microsoft Graph): every incoming email starts processing within seconds, with a queue absorbing volume spikes.
- Reading the document — dual extraction, high-resolution OCR plus layout extraction, merged and interpreted by an agent that knows Biodéal's product catalog and customer file, kept in sync with SAP automatically.
- Business logic — the agent rejects anything that isn't an order (delivery confirmations, stock-out notices, Biodéal's own orders to its suppliers), tracks stock-outs raised mid-thread, and follows an order across several emails as it's created, merged or replaced.
- Creating the SAP order — customer matching (exact, then fuzzy, then by address), quantity conversion into the right units, cascading discounts, warehouse and document series selection, order creation through SAP's Service Layer.
- Control loop — every processed email is tagged in Outlook, and any uncertain line raises an alert to the team: nothing goes missing silently.
Business intelligence, not generic OCR
Volume-based routing. A full pallet of milk leaving one site triggers the matching supplier order automatically; below that threshold, the order ships as cases from a different warehouse. Same logic for butter above a value threshold. The system also handles the shipping calendar — fixed departure days, EDI cut-offs, automatic roll-forward to the next business day. A rule Biodéal specified in a spreadsheet, now applied to every order with no human step, and locked in by automated tests.
Inferring the unit from the price. When an order form gives a quantity with no unit ("66" — cases? units? kilos?), the system compares the document's unit price against SAP's rate for each possible unit: a liter of milk at €1.17 can only be a carton, not a case of six (~€7). That safety net turned a 12-line order that used to be rejected outright into an order entered automatically, with the inferred lines flagged for the team to confirm.
Zero silent loss. A line whose quantity can't be extracted never fails the whole order (the rest still get entered) and never disappears either — it goes out as an alert with a diagnosis and a suggested fix. The team can complete it in SAP or correct the customer's rule, then reprocess the original email through a dedicated tool that runs the same guardrails as production.
What changed
An order now lands in SAP in under a minute after the email arrives, and the team only touches the ambiguous cases — everything else goes through without a person in the loop.
Where it goes next
- Extending coverage as new customer document formats appear
- Tightening exception rules as new edge cases get codified
- More of Biodéal's shipping and pricing logic moved into the agent
“The involvement of the forward-deployed engineers helped us get our agent up and running smoothly, which let us start benefiting from it as fast as possible.”
