ERP and EDI that keep orders and invoices together
Peter Nilsson 
An order lands with you after midnight. The partner has sent an EDI message, and the warehouse cannot reserve the goods until it has become an order record in the business system. Someone needs to get there before the morning pick.
A green receipt saying the file was received tells you little about its content. The wrong item number, unit or customer price leads to the wrong reservation, the wrong pick and the wrong invoice. Automation can look high and still hide weak data quality.
That is why an EDI integration with the business system is a control flow for money and deliveries. The business system owns items, customers, prices, stock and receivables. The message has to be possible to link to exactly those records.
How orders, messages and business system events fit together
The integration layer receives the file, checks that it can be read and translates the fields into the business system's terms. It works as an interpreter between two parties who speak different languages, and a good interpreter says no when the message is unclear. If the unit is missing or the customer is not in the register, the message should be stopped.
According to Statistics Sweden's survey of ICT usage in enterprises, 11 percent of Swedish companies with at least 10 employees received orders via EDI in 2024. The figure shows an established but selective way of working. It is most common where orders recur and look the same from week to week.
Statistics Sweden's report for 2024 shows that e-commerce sales accounted for 32.2 percent of turnover in large Swedish companies in 2023, counting both web sales and EDI-based sales. A limited EDI share can therefore carry large order values, which is a reason to follow every message all the way to the booked order.
A full flow has a fixed order. A catalogue or punch-out sets the price and the item selection. The order creates order lines. The order confirmation updates status and delivery date. The despatch advice draws down stock. The invoice creates a receivable.
The Swedish Agency for Digital Government's regulations state that government agencies with more than 50 employees must be able to use several standardised steps. They name Peppol BIS Catalogue Without Response 3, Punch Out 3, Ordering 3, Order Agreement 3 and Despatch Advice 3, and the invoicing process must be able to use Peppol BIS Billing 3. The same chain is useful in your trade with other companies, even though the rules apply to agencies.
Every message must be possible to link to a customer, item, order line, delivery and invoice. Otherwise the information has been sent but cannot be matched by the recipient. A common failure is a despatch advice pointing to an order line that does not exist yet. The warehouse cannot draw down stock, and finance cannot invoice against the right line.

The catalogue needs to match item number and customer price. The order needs to match customer, item, quantity and unit. The order confirmation needs the order number and delivery date, the despatch advice the order line and delivered quantity, and the invoice the order number, amount, VAT and payment terms.
A message can pass every formal check and still be wrong. An order line that states the unit as a package when the catalogue prices per piece creates the right number of lines but the wrong number of units in the warehouse. The error only shows when the invoice does not match the order. Traceability through the chain is then what shows where it broke.
Peppol, EDIFACT and partner-specific flows in the same integration
Peppol and classic EDI share a foundation. Structured messages move between systems, so nobody retypes a PDF or an email. They still cover different sets of documents. EDIFACT often carries older order, logistics and customs messages with partner-specific segments. Peppol carries named profiles, with the invoice as the most widely used.
Since 1 April 2019, suppliers have had to invoice the public sector electronically when the purchase falls under Swedish public procurement law (LOU, LUF, LUFS or LUK). The Swedish Agency for Digital Government describes the e-invoicing requirements and the European standard Peppol BIS Billing 3. A PDF does not count as an approved e-invoice, because the recipient's system cannot read it automatically. The requirement covers invoices from public procurement. It does not automatically cover all invoices between companies. The law sets a floor. The partner agreement can demand more.

Peppol is a shared language for invoices. Orders and logistics often need the partner's own profile, mapping and business rules. A plain connection to the network is enough when you only send standard invoices to public buyers. It is rarely enough when the same partner also sends orders, wants confirmations and requires a despatch advice in an older format.
The decision becomes concrete. List which message types need to be converted. Note which partner agreements still name EDIFACT or a custom XML format. Test the invoice fields on their own. Company registration number, invoice reference, order number, amount, VAT and payment terms must land in the fields the standard requires. A passed invoice test says nothing about whether the order flow holds.
Mapping and validation before a message reaches the business system
The most common error is a message that is formally correct but has the wrong content. The item number is in the file, but it is the partner's number. The unit is a piece where the agreement says a package. The delivery date is before the order date. The customer price is the list price, while the agreement has a different price.
In public-sector flows, the purchase order number is the key. The Swedish Agency for Digital Government, for example, states that invoices to the agency must include the period, which service is charged, the split between fixed and variable fees and the agency's purchase order number. If the number is missing, or in the wrong field, the invoice ends up in manual handling even though it is electronic. The same mechanics apply to your other references.
The check belongs before sending. A stop in the integration layer costs a queue. A stop at the recipient costs a rejection, a delayed delivery and often a credit note. The purchase order number is matched against an open order. The item number has to exist in the master data. The unit has to be the one the agreement uses. The price has to come from the agreed price list. Currency and decimals have to follow the partner profile. The delivery date must not be before the order date.
Three safeguards make the flow resilient. Idempotency prevents a duplicate order when the same message is resent after a timeout. A correlation ID ties together the order, confirmation, despatch advice and invoice. Replay reruns a temporary error, so nobody has to re-enter the order.
Items, copy and prices need a shared source. Product information in PIM is the natural place for what should be the same in every channel. How the order then moves is described in more detail in the connection between e-commerce and the business system. Without that source, you are validating against a guess.
Metrics that show whether the flow actually works
A message can go out without a technical error and still produce the wrong price or stock level. Reliability only shows when you compare the outcome with the business system. Statistics Sweden's regulation on the statistics defines EDI sales as orders created through EDI-type messages from the customer's business system. That is different from ordinary web sales, where the customer places the order in an interface.

The share of lines without manual correction shows whether the data holds. Rejections per partner show whether a profile or format is wrong. Time to confirmation shows the speed, even when the content is right. Price and stock discrepancies show whether master data and syncing are lagging. Credit notes show whether the invoice failed to match the order. The share of turnover shows how much business is affected if the flow stops.
Review the metrics every week to begin with. Traceability from incoming message to booked order lets you explain a discrepancy with the file, the time and the field. A low rejection rate is not enough when data quality is weak. The metrics need an owner on the finance or sales side, because the errors show up in margin and delivery.
What this approach requires of you and when it does not fit
The requirements start in the agreements. Partner agreements must name formats, profiles and reference rules, or a message can be formally correct and still carry the wrong item number, unit or customer price. You need a test environment where the partner sends real messages and you introduce errors yourselves: a missing recipient identity, a broken price range, an invalid order reference. Responsibility between the business system, the integration layer and the trading partner should be written down, and the exception queue needs an owner every working day.
Every upgrade of the business system and every changed partner profile can require a new test, so that time has to remain after go-live. Glanser Care is a contracted responsibility at a fixed monthly cost that covers version tracking, compatibility through upgrades, maintenance of the integrations with the business system and bug fixing.
A simpler setup is enough when there are so few partners that each profile can be tested by name, the order flow can be reconciled day by day, there is one format and the business system already has the connections. A point-to-point link or a plain invoice connection often holds then. A platform pays off when partners, systems and rules grow. Few orders with weak master data do not get better on a bigger platform.
Where discrepancies arise when the same order comes via portal and file
The customer who orders in the portal and the customer who sends a file should hit the same item, the same price and the same stock. The channel differs, but the business event is the same. The problem is that the two routes are often mapped at different times, by different people, against different versions of the item register.
If the portal and the file use different item numbers, two truths appear. Sales sees one price, the warehouse reserves another, and the error shows late, often only on the credit note. The same applies to units and customer prices. A message can be formally correct and still carry the wrong value. That is why master data, validation and traceability belong together with the choice of channel.
When you compare quotes, compare what happens on a Tuesday when a partner changes profile. Who updates the mapping, who runs the test, who watches the queue while the messages pile up? A low implementation price with unclear ownership becomes expensive by the third partner.
The question that reveals the setup is simple: when the profile changes and the queue grows, who looks at it before your customer calls? The answer decides whether the integration runs itself or runs on your time.
Three questions to ask the integration supplier
How are messages validated before sending, and what happens to a message that is rejected? The answer shows whether someone owns the error queue, or whether the file just bounces back to your inbox.
How is an upgrade of the business system or a change of partner profile handled, and which tests run before production? The answer shows whether the supplier treats change as normal work, with named test cases for orders, despatch advice and invoices.
Which metrics are shown to you in operation, and can you see the traceability from incoming message to booked order? The answer shows whether the flow is treated as a control flow or as a connection. Ask every supplier the same three questions. Then the answers can be compared.
Next steps for your integration
A list of message types, partners and business events is only half the work. Mark which flows lack validation and which lack metrics. Then go through the fields for order number, item, unit, price, currency and delivery date, and mark what you do not check before sending. A message can be formally correct and still carry the wrong item number or customer price. Gaps like that show up at field level, long before they reach the credit note.
On the page about integrations with the business system, you can read how orders, prices, stock and product data are kept in sync with the business system. The Function Library has three levels. Standard has a fixed scope and a fixed price. Adapted starts from the same foundation with agreed changes, and Customer-unique is isolated so the rest can be upgraded without being affected.
Glanser takes long-term product ownership of websites, product websites, PIM, customer portals and integrations with the business system. In a 72-hour analysis, you set aside two hours, and within 72 hours you get an inventory of functions and integrations, a functional specification, a prototype and a complete cost picture with a timeline, free of charge.

About Peter Nilsson
Peter Nilsson writes about integrations and product information, focusing on how business systems, PIM and the web can share the same data without duplicated work.

ERP systems as the hub for your website and portal
Business systems consolidate finance, orders, inventory, and product data into a single source. This is then connected to the web, portals, and EDI.
Peter Nilsson
PIM for wholesalers and who owns the product data
PIM for wholesalers starts with deciding who can change what. How to split ownership between ERP and PIM, choose stable keys and set limits on where AI can enrich product data.
Peter Nilsson
A product catalogue that holds together in every channel
Which system owns each field, so the same product matches in every channel.
Peter Nilsson