Use caseDocument AIWorkflow automation

Supplier invoices turned into live recipe costs for a multi-site restaurant group

Reads supplier invoices line by line, checks them against agreed prices, updates recipe and menu costs, flags substitutions, and posts to DATEV or Xero.

A blueprint, not a client story. The business described is illustrative; the architecture, integrations and trade-offs are real, and this is how I would build it. By Ergini, .

The short version

A workflow that reads every supplier invoice and delivery note a restaurant group receives, by email, WhatsApp photo or e-invoice, and turns each line into a current ingredient price. It converts pack sizes to kilos, liters and pieces, checks prices against the agreed supplier lists, recalculates recipe and menu costs, and alerts the chef when a substitute product may carry different allergens. Bookings go to DATEV or Xero. People confirm new item matches, approve price disputes and sign off allergen changes.

Best for
Restaurant groups with several sites, a dozen or more suppliers, and a recipe costing sheet that is months behind the invoices.
Connects to
WhatsApp Business Platform, Invoice inbox and e-invoices, DATEV, Xero, POS (Lightspeed, orderbird, Toast), Recipe costing sheet or tool
The AI does
Reads invoice photos, PDFs and handwritten delivery notes, and proposes which ingredient an unfamiliar supplier item is.
People do
Confirm new item matches, approve price disputes with suppliers, and sign off any substitution that could change a dish's allergens.
Built as
AI Workflow Automation, usually $15K - $30K

Six kitchens and a recipe sheet from March

Say you run six restaurants in and around Hamburg: four established Italian places and two sites that came with a small acquisition. The kitchens share core suppliers (a cash-and-carry wholesaler, produce, a butcher, a fish trader, beverages) plus local specialists. Four sites run Lightspeed; the two acquired ones still run orderbird. An external tax advisor keeps the books in DATEV.

Every supplier sends a different format. The wholesaler emails PDFs, the butcher hands over paper with the delivery, the fish trader prices by the day's market, and a few suppliers now send e-invoices. Managers photograph the paper ones into a WhatsApp group for the office to pass on to the tax advisor at month end. That is the only place the prices ever go.

The recipe costing sheet was last updated in March. Since then cream has gone up twice, the agreed price for buffalo mozzarella was not applied on two invoices, and one site has been receiving a different pesto because the usual one was out of stock. Nobody connected that last change to the allergen chart. Food cost only shows up in the monthly accounts, weeks late and as a single percentage, so nobody can say which invoice line moved it.

Where the price information goes today

Everything needed to cost each dish passes through the business every week. It just never reaches the recipe sheet.

  1. A delivery arrives during prep. The chef counts what is obvious, writes 'minus 2 crates, damaged' on the paper delivery note, and signs it.
  2. The invoice follows by email, on paper with the next delivery, or only as a supplier statement at month end.
  3. A manager photographs the paper and posts it in the office WhatsApp group, where it sits between shift swaps and stock questions.
  4. Once a month the office collects everything, uploads it to DATEV Unternehmen online for the tax advisor, and checks the totals, not the lines.
  5. Returned goods should come back as credit notes. Whether they did is anyone's guess, because nobody keeps a list of what was sent back.
  6. A few times a year someone updates the recipe sheet by hand from a sample of recent invoices, and the menu is repriced on those numbers.

Each step is reasonable on its own. Together they mean nobody compares line prices or chases credits, and the only complete record is a folder of images at the tax advisor's office. Approvals and payment runs are a separate build: invoice processing automation.

From a crumpled invoice to a plate cost

Two steps use a model: reading documents that are not already data, and suggesting what an unfamiliar product is. Every number after that is computed by ordinary code, and every match the model suggests is confirmed once by a person, then reused.

  1. 01 Trigger · Email, WhatsApp Cloud API

    An invoice or delivery note arrives

    A PDF in the invoice inbox, a photo sent to the group's WhatsApp number, or an XRechnung or ZUGFeRD e-invoice. Each document is fingerprinted first, so an invoice sent as both a photo and a PDF is processed once.

  2. 02 Plain code · XRechnung, ZUGFeRD

    Read structured data where it exists

    E-invoices carry their line items as XML, so they are parsed directly and never go near a model. German businesses have had to be able to receive e-invoices since January 2025, so this path gets busier as suppliers switch.

  3. 03 AI model · Structured output

    Extract the lines from photos and PDFs

    A vision model returns each line's item code, description, pack size, quantity, unit price, discount and VAT rate under a strict schema. Handwritten corrections come back as separate annotations with their own confidence, never merged into quantities. More in the document extraction deep dive.

  4. 04 Plain code

    Check the arithmetic and normalize the units

    Quantity times unit price must equal the line total, lines must add up to the invoice total, and the VAT split must reconcile (a wholesaler invoice mixes 7 and 19 percent lines). Pack sizes become base units, so a case of 6 x 2.5 kg is 15 kg and its price a price per kilo.

  5. 05 Decision

    Is this a known item at the agreed price?

    Rules decide, using each supplier's item master and the price lists with their valid-from dates.

    • Known item, price within tolerance of the agreed list then ingredient cost updated, nothing to review
    • Price above the agreed list, or above the last price paid by more than the threshold then price alert, plus a dispute draft for the area manager
    • Unknown item code, or a different product than the one ordered then the model proposes a match, and the chef or purchaser confirms it
    • A line that fails the arithmetic, or a photo too poor to read then review queue, with the image crop beside the extracted fields
  6. 06 Person · WhatsApp, review page

    Chefs and the area manager decide the exceptions

    The head chef confirms new matches and any substitution that touches a recipe, with the affected dishes and their allergens listed. The area manager approves or drops each price dispute. Both answer by WhatsApp or on a small review page, and a confirmed match is never asked about again.

  7. 07 Plain code

    Recalculate recipes and menu margins

    Each ingredient's cost per base unit flows into every recipe that uses it, through the portions and yield factors in the recipe sheet. Dishes whose food cost share crosses the group's threshold are flagged together with the invoice line that moved them.

  8. 08 System · DATEV, Xero API

    Post to the ledger

    The invoice image and a booking proposal go to DATEV for the tax advisor, through DATEV's partner interfaces or as a DATEV-format booking batch they import. Entities on Xero get a bill with its lines through the Xero API. Credit notes are linked to the invoice they correct.

  9. 09 Result

    A Monday margin note per site

    Price changes, open credits, disputed lines and the dishes that moved, sent to each area manager at the start of the week, with the theoretical food cost per site from the POS sales mix.

One wholesaler invoice, read and checked

A sous chef sends a photo before lunch service. Behind the reply are six lookups, including a substitution that nobody ordered.

WhatsApp, Thursday 10:42, site 3

  1. Sous chef · WhatsApp

    [2 photos] today's delivery from the wholesaler. the pesto was a different one, it's written on the delivery note

  2. extract_document(source: "whatsapp", pages: 2)invoice 2026-118834 + delivery note / 24 lines / net EUR 1,286.40 / VAT 7% and 19% / 1 handwritten note on line 17: 'replaced, cashew'
  3. check_totals(invoice: "2026-118834")24 lines add up to the net total / VAT split reconciles
  4. normalize(line: 9, text: "Sahne 30% 10x1L")cream 30%, 10 x 1 l = 10 l / EUR 3.19 per l / agreed EUR 2.98 per l until 30 Sep / +7.0%
  5. check_price(item: "buffalo mozzarella 125 g")EUR 1.62 per piece / agreed EUR 1.45 / +11.7% / second invoice in a row
  6. match_item(line: 17, text: "Pesto Genovese Cashew 6x950g")not the ordered item (pine-nut pesto) / proposed ingredient: basil pesto, 0.93 / supplier spec: contains cashew (tree nuts), milk
  7. affected_dishes(ingredient: "basil pesto", site: 3)3 dishes: trofie al pesto, burrata starter, focaccia sandwich / current allergen chart lists no tree nuts for any of them
  8. Cost tracker · WhatsApp

    Invoice 2026-118834 checked, 24 lines. Two things need you. 1) Line 17 is a cashew pesto instead of the usual pine-nut one. Cashew is a tree nut, so trofie al pesto, the burrata starter and the focaccia sandwich would need their allergen information changed while it is in use. Reply KEEP to use it, or RETURN to log it for a credit note. 2) Cream and buffalo mozzarella are above the agreed prices. Both have gone to Jana for a decision.

  9. The head chef replied RETURN. An expected credit note was opened for line 17, and the allergen chart was not touched.
The model read the photos and proposed the pesto match. The unit conversion, the price comparisons and the list of affected dishes are lookups and arithmetic, which is why nobody has to check them twice.

Pack sizes, catch weights and other unit traps

Most costing errors are unit errors. The build keeps an item master per supplier that turns whatever is printed on the invoice into a price per base unit, and the recipe sheet only ever sees the base unit.

Tomaten Rispe 6x2,5kg1 case = 6 x 2.5 kg = 15 kgPer kiloA decimal comma, and a case price easily misread as a kilo price
Sahne 30% 10x1L1 carton = 10 x 1 l = 10 lPer literIf the pack quietly becomes 10 x 0.9 l at the same price, that is an 11 percent rise the invoice total never shows
Lachsseite ca. 1,4 kg, StkCatch weight, billed on the actual weightPer kilo of usable filletA variable weight per piece, and the trim loss belongs in the recipe's yield, not the price
Eier M, 180 Stk1 case = 180 piecesPer pieceSold by the case, used by the piece, weighed in pastry
Petersilie glatt, Bund1 bunch = a stored average weightPer kilo, through the bunch weightThe kitchen weighs a bunch once; a model never guesses it
Patterns like '6x2,5kg' are parsed with rules. The model is only asked when a description matches no known pattern, and its reading is shown to a person once, then stored.

The cases that make or break the numbers

Reading invoices is the easy part. These situations decide whether the chefs still believe the food cost figures after three months.

A substitution that changes a dish's allergens

Wholesalers substitute out-of-stock items, and the replacement can carry a different profile under the 14 allergens of EU Regulation 1169/2011. Any line that is not the ordered item goes to the head chef with the affected dishes listed. The model can point at the risk; only the chef decides whether the allergen information changes or the product goes back.

Credit notes that never arrive

When a chef writes 'returned, damaged' on a delivery note, the build opens an expected credit for that line. Incoming credit notes are matched to it by invoice reference and amount, and anything still open after the supplier's usual turnaround shows up in the Monday note instead of vanishing until the annual accounts.

Handwriting on delivery notes

Handwritten corrections are the least reliable input, so they never change a quantity on their own. They are extracted as annotations with a confidence score, shown beside the image crop, and a person confirms the ones that matter for a credit or a dispute.

Items with no agreed price

Fish and some produce are bought at the day's price. For those the build compares against the rolling average and against what the other sites paid the same week, and only flags a jump larger than the volatility the group has said is normal.

The same invoice, twice

It arrives as a photo from the site and as a PDF from the supplier's accounts team. A fingerprint of supplier, invoice number, date and total catches it before anything reaches the ledger, and each invoice is exported to DATEV exactly once, however many retries happen behind the scenes.

Who owns which number

Most of this system is bookkeeping logic. The model is used where the input is messy, and nowhere where money is decided.

The AI model

  • Read invoice photos, PDFs and handwritten notes

    Every supplier has its own layout, and photos are taken on a steel counter under kitchen lights.

  • Propose which ingredient a new supplier item is

    A description like 'Burrata Pugliese 125g ca.' needs language understanding. A person then confirms it once.

Plain code

  • Unit conversion, totals and VAT checks

    Arithmetic has one right answer, and code gets it every time.

  • Compare prices with the agreed lists

    Tolerances and valid-from dates are rules the group sets, not judgement calls.

  • Export bookings to DATEV or Xero

    Exactly once per invoice, with the image attached, so the tax advisor sees what the system saw.

A person

  • Confirm matches and allergen-relevant substitutions

    The head chef is accountable for what the allergen information says.

  • Approve price disputes and supplier conversations

    Supplier relationships are negotiated, and a disputed crate of lemons is not always worth the argument.

Is a restaurant back-office product enough for your group?

Often, yes. MarginEdge and Restaurant365 are mature products in the US; Nory, which raised a $37M Series B in September 2025 for restaurant back-office AI, is strong in the US and UK; and Apicbase is the established European option for recipe management, allergens and procurement. If your group runs a POS they support, in one country, with an accounting setup they connect to, buy one of them and spend the rest of the budget on the menu.

A custom build earns its place when the group does not fit that shape: several POS systems after acquisitions, sites in more than one country, a tax advisor who works in DATEV and wants bookings in DATEV format, regional suppliers whose invoices arrive handwritten or photographed, or recipe data in a sheet the chefs will not give up. It also makes sense when the price tolerances and allergen checks have to follow your rules rather than a vendor's defaults.

The hybrid is common too: keep Apicbase or your current recipe tool as the chefs' workspace, and build only the intake, matching and accounting bridge that feeds it current prices. The chefs learn nothing new. Related builds are collected under hospitality.

How you would know it is working

A blueprint has no results to report, so here is what I would measure from the first week instead, on your own data.

Lines processed without a person
Share of invoice lines that went from document to recipe cost with no review, per supplier. The weakest suppliers show where a template or a request for e-invoices would help.
Recipe cost freshness
Age of the price behind each dish's cost. No top-selling dish should be costed on a price older than its ingredients' last delivery.
Price variances caught and recovered
Disputed lines, and how much came back as credit notes or corrected invoices, per supplier and month.
Open expected credits
Returns noted at delivery with no matching credit note yet, and how long each one has been open.
Theoretical versus actual food cost
Once stock counts are in, the gap per site, which is where portioning, waste and unrecorded staff meals show up.

What a build like this costs

This is built as AI Workflow Automation, which runs $3.5K - $60K overall. A build like this one usually lands in the multi-step workflow tier: $15K - $30K, 3-5 weeks. The first working version runs on your real data well before the end of that window.

What it costs to run

Model costs scale with scanned pages and usually come to a few cents per invoice, because e-invoices and known suppliers' PDFs skip the vision step entirely. WhatsApp replies to a manager's photo fall inside the 24-hour service window and cost nothing; alerts started by the system outside that window use a paid template. Hosting is a small server and a database.

What moves the price

  • How many suppliers and document types: e-invoices and clean PDFs are cheap, handwritten delivery notes and photographed paper cost more
  • How many POS systems and ledgers: one Lightspeed and DATEV setup, or a mix across countries after acquisitions
  • Where recipes live today, and how much cleanup the recipe sheet needs before it can be costed automatically
  • Whether stock counts are in scope, replacing the Sunday count on paper and turning theoretical food cost into actual versus theoretical per site

Who this is for

  • Restaurant groups with three to twenty sites whose recipe costs are updated by hand a few times a year
  • Groups running more than one POS after an acquisition, or with sites in more than one country
  • German operators whose tax advisor books in DATEV and currently receives invoices as photos
  • Head chefs who have been caught out by a supplier substitution and want every one flagged with its allergen impact

Questions people ask about this

Can AI read the blurry invoice photos managers send by WhatsApp?

Mostly, and it knows when it cannot. A vision model reads the photo into structured lines, then code checks every total and VAT split, so a misread number fails the arithmetic instead of slipping through. A photo too blurry to pass gets a request for a retake while the paper is still in the kitchen, and handwriting is always confirmed by a person.

How do I automate recipe costing from supplier invoices?

Map each supplier item to an ingredient once, then let every invoice update that ingredient's cost per kilo, liter or piece. The recipe sheet already holds portions and yields, so dish costs recalculate as soon as a price changes. The real work is the one-off mapping and the unit rules, and that is where a person confirms what the model proposes.

Does it work with DATEV and our tax advisor?

Yes. The build sends the invoice image and a booking proposal to DATEV, through DATEV's partner interfaces or as a DATEV-format booking batch the advisor imports, so their workflow stays the same. The advisor still books and checks; they simply receive clean documents with line detail and matched credit notes instead of a month of photos.

What happens when a supplier substitutes a product?

It goes to the head chef before anyone relies on it. Any line that differs from what was ordered is flagged with the dishes that use the ingredient and the allergens on the replacement's specification. The chef decides whether to keep it and update the allergen information or send it back, and the decision is logged with the invoice.

What does restaurant invoice automation cost to run?

Mostly model calls for scanned pages, usually a few cents per invoice, plus hosting. E-invoices and known supplier PDFs skip the vision model, so the cost falls as more suppliers send structured invoices. WhatsApp replies are free inside the 24-hour service window and billed per template outside it.

Sources