to select ↑↓ to navigate
eInvoicing

eInvoicing

Open in ChatGPT
Ask ChatGPT about this page
Open in Claude
Ask Claude about this page

Receiving Invoices

Receiving Invoices

Import a PEPPOL invoice from a supplier and convert it into a Purchase Invoice in ERPNext.

Two ways an invoice arrives

Channel When it happens
Service provider webhook / poll Automatic — your service provider hands the XML to ERPNext. See Sending & Receiving.
Manual upload Drop an XML file onto an EDocument record yourself — useful for one-offs and testing

Either way, the rest of the flow is the same.

Step 1 — EDocument record

Whether auto-created or manual:

  1. EDocument → New (or auto-created)
  2. Upload the XML file
  3. The app auto-detects profile, company, target document type (Invoice / CreditNote → Purchase Invoice)

Step 2 — Validation

The XML is validated against:

  1. XSD schema — well-formedness and structural correctness
  2. Schematron — PEPPOL business rules

Validation status appears on the EDocument record. Errors block the next steps; warnings are non-blocking.

Step 3 — Entity matching

PEPPOL XML uses identifiers that aren't directly ERPNext records. The matcher attempts to link:

Entity Matched by
Supplier PEPPOL endpoint ID, tax ID, or name (in that order)
Items Buyer item ID first, then seller's product ID via the Item → Supplier table
Purchase Order OrderReference or BuyerReference

Click Match Document. If everything matches automatically, you see "Matching Successful". Otherwise a dialog asks you to pick the right ERPNext record per ambiguous entity. The choices are saved to matching_data on the EDocument so re-running uses your selections.

Step 4 — Create Purchase Invoice

Two buttons after matching:

  • Create Document — parses the XML and creates a Purchase Invoice in one step. Useful when matching was clean.
  • Create & Review Document — opens a Purchase Invoice form prefilled with parsed data; you save manually after reviewing. Useful when supplier names or amounts need a final eye.

Fields populated from the XML

Section Fields
Header Invoice ID, issue date, currency
Parties Seller (Supplier) and Buyer (Company) details
Lines Product name, description, quantity, rate, tax rate
Taxes Basis amount, rate, calculated amount
Payment Terms, IBAN + BIC
Totals All monetary totals from LegalMonetaryTotal

Common situations

Unknown supplier — the auto-match couldn't find an ERPNext Supplier. The matching dialog lets you pick an existing one or open Supplier → New, then re-run.

Items not in catalog — for one-off invoices, leave the matched Item blank; the parser falls back to using the line description as-is. For recurring suppliers, add their products to the Item → Supplier table so future invoices auto-match.

PO mismatch — if the supplier referenced a PO number that doesn't match, the EDocument is still imported; the Purchase Invoice is just created without the PO link. You can link manually later.

Where to look when things break

  • Status: Validation Failed — see the Error field for the exact Schematron rule that fired
  • Status: Matching Failed — open the matching dialog and resolve the ambiguities
  • Error Log — full traceback for any parser exceptions
Last updated 3 days ago
Was this helpful?
Thanks!