background Layer 1

AI order analysis: automatic sales order line creation from custom

Customer
Officine Santafede s.r.l.
Project manager on the customer side
Fabio Benedetti
Factory Director
IT Provider
ELFO s.r.l. a socio unico
Year of project completion
2026
Project timeline
july, 2025 — july, 2026
Project scope
560 man-hours
Goals

Entering a new sales order meant reading the customer purchase order (a PDF with a different layout, language and terminology for every customer) and typing each line into the ERP by hand: quantities, prices, discounts, delivery dates, destinations, customer tags and item numbers. Above all, the operator had to identify the right internal article among thousands of flange codes. The work was slow, repetitive and error-prone, and errors spread to production, purchasing, quality documents and shipping. Objectives:

  • let order-entry staff upload the customer PO and have all order lines created automatically in the ERP;

  • automatically propose the internal article by interpreting the technical description;

  • keep the operator in control, with clear flags on lines that need a check;

  • reduce order-entry time and data-entry errors, freeing staff for higher-value work.

Project Results

Results: order lines are no longer typed one by one, and the operator moves from data entry to review. Errors on quantities, prices and dates drop, and the same procedure works for any customer layout without per-customer templates.

The uniqueness of the project

The hard part is not reading a PDF: it is turning free-text technical descriptions written by hundreds of different customers into the exact internal code of a forged flange. The solution combines a large language model with a domain rule engine. The model extracts each line and its technical attributes (standard, rating, nominal and reduction diameters, schedule, geometry, facing, finished or raw, special processing). The engine then maps them to the article master data, including material equivalences (e.g. UNS codes vs. ASTM grades) and customer specifications.

For each document they import, users can add one-off rules in natural language, which are combined with the rules already defined in the system for that import only, with no per-customer templates to maintain. Lines without a certain match are flagged and resolved in one click; a ground-truth set of real orders measures accuracy at every model or rule change.

Used software
  • Customer ERP (custom web application on ASP.NET / .NET and SQL Server), extended with the “Analyse order with AI” function

  • Azure OpenAI Service, GPT-4.1 model

  • AI extraction and article-matching service, callable via REST API

  • Rule engine for matching against the ERP article master data, with material and specification mapping tables

  • Asynchronous file queue with e-mail notification when the import is complete

  • Ground-truth test set of real customer orders for regression testing

  • Azure DevOps for backlog, testing and releases

Difficulty of implementation
  • Variety of inputs: PDFs from hundreds of customers with different layouts and languages, tables split across pages, columns without headings, extra charges mixed with product lines.

  • Domain knowledge: a flange code depends on many attributes (standard, rating, size and reduction, schedule, geometry such as WN vs. long WN, facing, finished vs. raw, special processing, material). Materials appear under different names (UNS, ASTM), and customer specifications can change the material to use.

  • Accuracy: an order line drives production and certification, so the system must say clearly when it is unsure rather than guess.

  • Integration into a live ERP: order revisions, totals, specifications, destinations and internal delivery dates had to keep working.

  • Continuous tuning: a ground-truth set of real orders tests every change, and the solution was moved to a newer model on the customer’s own tenant without disrupting users.

Project Description

The customer manufactures forged and machined steel flanges and special forgings for oil & gas, petrochemical and energy plants. Every year it receives hundreds of purchase orders from customers worldwide. Each order can contain dozens of lines and arrives as a PDF with its own layout, language and terminology.

Before the project, every order was entered by hand. An operator read the PDF, created each line in the ERP and searched for the matching internal article among thousands of codes, checking standard, rating, size, schedule, material and facing. Large orders took hours, and mistakes were costly because the order line drives production, purchasing, quality certificates and shipping.

The project started in July 2025 with a feasibility analysis and a proof of concept on real orders. It continued in early 2026 with a PoC on the full process and went live in July 2026, followed by an improvement phase driven by user feedback until October 2026.

How it works:

  1. The operator creates the order header as usual and clicks “Analyse order with AI” on the order page.

  2. A page asks for the PDF and, optionally, plain-language hints: where to find the customer tag and item number, how to read them (e.g. “take the text after the dot”, “ignore the -000000 suffix”), which fields to skip and which pages to analyse.

  3. The file is validated and processed asynchronously; the user receives an e-mail when the import is complete.

  4. The language model extracts every line: customer item, tag, description, quantity, unit price, discounts, delivery date and destination.

  5. The matching engine interprets the technical description and proposes the internal article. It tells finished from raw forgings and handles reduction diameters, special processing, facing, lengths and the material equivalences required by customer specifications.

  6. Lines are created in the ERP, order totals are updated and the order is marked as analysed by AI. Lines without a certain match are highlighted, and the operator picks the right article from a pre-filtered list.

  7. If the operator confirms a different article, both values are kept, so proposed and confirmed articles can be compared to measure accuracy and improve the rules.

Results: order lines are no longer typed one by one, and the operator moves from data entry to review. Errors on quantities, prices and dates drop, and the same procedure works for any customer layout without per-customer templates.

Project geography

Italy (production sites in Lombardy). The orders processed come from customers in Europe, North America and the Middle East.

Additional presentations:
Analyse order with AI panel - customer PO upload and plain-language hints for tag and customer item.png
Article selection from the master data, pre-filtered on the description read by AI.png
Contract prices view - quantities, unit and total prices imported from the PO.png
Figure 1. Sales order list with status and Analysed by AI flag..png
Import completed - lines created, total calculated, unrecognised articles reported.png
Imported order lines - the warning icon marks lines without a certain article match.png
New order in entry status - header filled in no lines yet totals at zero.png
Order header with totals updated automatically after the import.png
We use cookies for analytical purposes and to deliver you the best experience with our website. Continuing to the site, you agree to the Cookie Policy.