Electronic Invoices
Understanding Electronic Invoices
When operating certain markets, your business may require to distribute electronic invoices – structured invoice data that is exchanged electronically between trading partners in order to automate accounts payable processing.
In particular, public institutions in the EU and, to an increasing extent, enterprises are required to accept and process electronic invoices. A set of common specifications and standards (Peppol) provides for interoperability between issuers and recipients across Europe.
E-Invoice Support in JustOn
Note
Be aware of the following preconditions:
-
To prevent data incompatibility issues, creating and distributing e-invoices requires JustOn Billing & Invoice Management v2.101 or newer.
-
Creating and distributing e-invoices involves Salesforce API access and therefore requires at least the Salesforce Enterprise Edition.
To support enterprise and public e-invoicing, JustOn Billing & Invoice Management can prepare electronic invoices and credits. Currently, it supports the following formats:
- Peppol BIS Billing (with UBL syntax) for electronic invoicing across Europe
-
XRechnung (with UBL syntax) for electronic invoicing within Germany
JustOn Billing & Invoice Management always supports the current XRechnung version.
Businesses can
- send e-invoice XML files to the Peppol Network, from where the e-invoices will be distributed to their recipients, or
- just create e-invoice XML files and send these documents to their recipients via an invoice submission portal or email.
Info
Prior to creating and distributing e-invoices, make sure to contact JustOn Support for your e-invoice onboarding. To this end, file a corresponding ticket in the JustOn Support Portal.
Be aware that if you want to send e-invoices via Peppol, your organization must contract with JustOn for this service and request the technical activation via JustOn Support.
Enabling E-Invoice Creation
Sending E-Invoices With Peppol
Creating E-Invoices
Reviewing E-Invoice Status
E-Invoice FAQ
E-Invoice Distribution via Peppol
JustOn Billing & Invoice Management allows distributing electronic invoices via the Peppol Network. This is an infrastructure for exchanging electronic documents, where a set of common specifications and standards provides for interoperability between issuers and recipients across Europe.
Once set up, JustOn Billing & Invoice Management creates legally valid XRechnung files and sends them to the Peppol Network. Peppol will transfer the e-invoices to the recipients and send notifications about the distribution status.
Distributing invoices through Peppol
E-Invoice Workflows
JustOn Billing & Invoice Management supports the following e-invoice scenarios:
(1) The user finalizes an invoice that meets the e-invoice preconditions and clicks Send E-Invoice.
(2) JustOn Billing & Invoice Management prepares the e-invoice XML file (einvoice_<invoice-date>_<invoice-number>_<format-specifier>
) and validates it.
(3) On successful validation, JustOn Billing & Invoice Management saves the e-invoice XML file as an attachment to the invoice record and shows the Send dialog.
In case of validation failures, JustOn Billing & Invoice Management writes an error summary to the E-Invoice Error
field and attaches a complete HTML error report (einvoice_<invoice-date>_<invoice-number>_<einvoice-format>_validation_report
) to the invoice record.
(4) The user clicks Send. If necessary, the user can modify the recipient address (and scheme). JustOn Billing & Invoice Management transfers the e-invoice file to the Peppol Network for distribution (E-Invoice Provider Status is Queued
).
(5) Peppol will transfer the e-invoices to the recipients and send notifications about the distribution status, which is stored in the E-Invoice Provider Status field on the invoice and related Peppol Notification records. Once the e-invoice is successfully sent to the recipient, the E-Invoice Provider Status
will be Sent
.
(1) The use selects the intended e-invoice format via the E-Invoice Format field on the invoice.
(2) The user invokes the e-invoice generation for an invoice, clicking Create E-Invoice.
(3) JustOn Billing & Invoice Management prepares the e-invoice XML file (einvoice_<invoice-date>_<invoice-number>_<format-specifier>
) and validates it.
(4) On successful validation, JustOn Billing & Invoice Management saves the e-invoice XML file as an attachment to the invoice record.
In case of validation failures, JustOn Billing & Invoice Management writes an error summary to the E-Invoice Error
field and attaches a complete HTML error report (einvoice_<invoice-date>_<invoice-number>_<einvoice-format>_validation_report
) to the invoice record.
During creation, all previously attached e-invoice specific files with the prefix einvoice_<invoice-date>_<invoice-number>_
will be deleted.
(5) The user sends the produced e-invoice XML file to the recipient.
- When doing business with German authorities (B2G scenarios), you can either upload the e-invoice file to an invoice submission portal or send it via email. For details, see The transmission method: Manual upload and The transmission method: Email.
- In B2B scenarios, you need to agree on a transmission method with your business partner.
E-Invoice Implementation Details
JustOn Billing & Invoice Management acts as the "user interface" for managing e-invoices and controls the data management. However, significant parts of the business logic to produce e-invoices, including the validation, run on the Heroku-based platform.
To support the Peppol BIS Billing and the XRechnung formats and the distribution via the Peppol Network, JustOn Billing & Invoice Management adds a number of fields to the relevant objects Invoice and Invoice Line Item as well as to the custom settings Business Entity, Quantity Units and Tax Rules.
- New fields on Invoice
-
Field Description Buyer Reference A unique identification of the invoice recipient.
When doing business with German public authorities (B2G scenarios), the buyer reference usually holds the Leitweg-ID (see ZFB | eRechnung).E-Invoice Distribution Channel The distribution channel for the e-invoice.
Can beE-Mail
orPeppol
.E-Invoice Error Holds details regarding errors during e-invoice generation. E-Invoice Provider Status Tracks the lifecycle of the e-invoice with the distribution provider, see E-Invoice Provider Status. E-Invoice Provider Messages Holds details regarding the status in the provider queue, a JSON string including timestamp
andmessage
set by the provider.E-Invoice Recipient Address The recipient address for an issued electronic invoice.
Addresses are subject to the Electronic Address Scheme.
When using Peppol, only a limited set of address schemes is allowed.E-Invoice Recipient Scheme Id The identifier that indicates the type of the used e-invoice recipient address. E-Invoice Status Indicates the result of the e-invoice creation, see E-Invoice Status. Purchase Order No. Reference to the purchase order on which the invoice is based (see Purchase-Related Information).
Is usually given by the buyer to track the purchase in their system; retrieved from a source record ( contract) and set on the invoice on invoice creation.Seller ID An identifier of the seller (see Purchase-Related Information).
Is usually given by the buyer to track the vendor in their system; retrieved from a source record ( contract) and set on the invoice on invoice creation.VAT Breakdown The serialized contents (JSON) of the tax breakdown table.
Is updated when invoice line items are modified. - New fields on Invoice Line Item
-
Field Description Unit Code A code for the measurement unit applicable to the invoiced quantity, is copied from Code
on the Quantity Units custom setting.
The code is expected to be one of the codes listed in UNECE Recommendation No. 20 "Codes for Units of Measure Used in International Trade" or UNECE Recommendation No 21 "Codes for Passengers, Types of Cargo, Packages and Packaging Materials", see UNECE Code List Recommendations.VAT Category Code A code for categorizing VAT regulations, is copied from VAT Category Code
on the Tax Rules custom setting.
The code is expected to be one of the codes listed in the code list 5305 of the United Trade Data Interchange Directory (UNTDID), see UNTDID 5305 Duty or tax or fee category code. - New Fields on Business Entity
-
Field Description E-Invoice Format The target format for electronic invoices.
Currently,Peppol BIS Billing UBL
andXRechnung UBL
are supported.E-Invoice Sender Address The return address for replies to an issued electronic invoice.
Addresses are subject to the Electronic Address Scheme.
When using Peppol, only a limited set of address schemes is allowed.E-Invoice Sender Scheme Id The identifier that indicates the type of the used e-invoice sender address. - New field on Quantity Units
-
Field Description Code A code for the measurement unit applicable to the invoiced quantity, is copied to Unit Code
on the invoice line item.
The code is expected to be one of the codes listed in UNECE Recommendation No. 20 "Codes for Units of Measure Used in International Trade" or UNECE Recommendation No 21 "Codes for Passengers, Types of Cargo, Packages and Packaging Materials", see UNECE Code List Recommendations. - New field on Tax Rules
-
Field Description VAT Category Code A code for categorizing VAT regulations, is copied to VAT Category Code
on the invoice line item.
The code is expected to be one of the codes listed in the code list 5305 of the United Trade Data Interchange Directory (UNTDID), see UNTDID 5305 Duty or tax or fee category code.
E-Invoice Formats
JustOn Billing & Invoice Management supports the following e-invoice formats:
- Peppol BIS Billing (with UBL syntax) for electronic invoicing across Europe
- XRechnung (with UBL syntax) for electronic invoicing within Germany
JustOn Billing & Invoice Management determines the e-invoice format as follows:
- If the field
E-Invoice Format
on the related business entity is set, the software uses the specified value. - Without an e-invoice format setting on the business entity, the software evaluates the fields
Billing Country Code
on the invoice andCountry Code
on the business entity. If the two fields specifyDE
, JustOn Billing & Invoice Management assumes that the business takes place in Germany, so it appliesXRechnung UBL
. - Otherwise, JustOn Billing & Invoice Management assumes that the business involves other countries, so it uses the value
Peppol BIS Billing UBL
.
Info
Users can, however, change the target e-invoice format when creating the e-invoice XML file.
E-Invoice Statuses
E-Invoice Status
The field E-Invoice Status
on the invoice indicates the result of the e-invoice creation:
Status | Description |
---|---|
Not created | Indicates invoices that have not been processed to create an e-invoice file. |
Validation Error | The e-invoice validation has failed. The validation report is attached to the invoice record. |
Created | The e-invoice has been successfully created and validated. The e-invoice XML file is attached to the invoice record. |
Created With Warnings | The e-invoice has been successfully created, but the validation has produced warnings. The e-invoice XML file and the validation report are attached to the invoice record. |
Distribution Error | Transferring the e-invoice to the distribution provider has failed. |
In Peppol Queue | The e-invoice has been successfully transferred to the distribution provider. |
Info
Using the global settings option Ignore EInvoice Validation Warnings
, JustOn Billing & Invoice Management will ignore validation warnings and set E-Invoice Status
to Created
, even if the validation has produced warnings. Consequently, no validation report will be attached to the invoice record.
E-Invoice Provider Status
The field E-Invoice Provider Status
on the invoice tracks the lifecycle of the e-invoice with the distribution provider:
Status | Description |
---|---|
Queued | The e-invoice is ready to be sent to the recipient. |
Validation Error | The e-invoice validation has failed. |
Conversion Error | The e-invoice conversion (to a specific recipient format) has failed. |
Send Error | Sending the e-invoice to the recipient has failed. |
Sent | The e-invoice has been sent to the recipient. |
Receiver Error | Receiving the e-invoice by the recipient has failed. |
Received | The e-invoice has been received by the recipient. |
Peppol Notifications
As Peppol transfers the e-invoices to the recipients, the sender will receive notifications about the distribution status. JustOn Billing & Invoice Management stores this information in dedicated Peppol Notification records, which are related to the original invoice.
These provider messages include the following information:
Field | Description |
---|---|
Invoice | Links to the related invoice |
Timestamp | Shows the notification time |
Type | Shows the type of the notification as provided by Peppol. Possible values includeStage-Update : new processing step has startedStage-Success : processing step has successfully completedError : error on processing |
Stage | Indicates the processing step of the invoice in the Peppol processing pipeline as provided by Peppol. Possible values include Validation , Conversion , Transmission , Reception |
Is final | Indicates whether the Peppol processing pipeline is completed and no more notifications are expected |
Message | Shows the key message of the notification as provided by Peppol, for example Transmission of your document was successful |
Raw Notification | Contains the raw response (JSON string map) from Peppol |
E-Invoice Preconditions
Part of the business logic to produce e-invoices runs on the Heroku-based platform. So from a technical perspective, creating e-invoices requires the user to have access to the connected app JustOn Platform.
With respect to data, the following conditions must be met for JustOn Billing & Invoice Management to successfully create an e-invoice XML file. For details, see Preparing E-Invoice Source Data.
Invoice Status
The invoice must be finalized before creating or sending an e-invoice. That is, its status must not be Draft
, Pre-Draft
, Pre-Open
.
Business Entity
The invoice must specify a business entity. To avoid typos, use the button Set Business Entity, see Setting Business Entity.
Buyer Reference
In addition, the invoice must specify a buyer reference – a unique identification of the invoice recipient.
- When doing business with German public authorities (B2G scenarios), the buyer reference usually holds the Leitweg-ID (a unique identification of the invoice recipient, see ZFB | eRechnung).
- In B2B scenarios, you need to agree on a buyer reference with your business partner.
Unit and Unit Code
The invoice line item must specify a unit defined using the custom setting Quantity Units.
The quantity unit must define a code for the measurement unit applicable to the quantity. The code is expected to be one of the codes listed in UNECE Recommendation No. 20 "Codes for Units of Measure Used in International Trade" or UNECE Recommendation No 21 "Codes for Passengers, Types of Cargo, Packages and Packaging Materials", see UNECE Code List Recommendations.
Typical unit codes include, for example:
Measurement Unit | Unit Code |
---|---|
Piece | H87 |
Hour | HUR |
Kilowatt Hour | KWH |
(Page) Impression | IM |
Persons | IE |
Kilometre | KMT |
Tax Rate
The invoice line item must specify a tax rate defined using the custom setting Tax Rules.
The tax rule must define the tax rate, the business entity and the VAT Category Code. This is a code for categorizing VAT regulations, which is necessary for e-invoices. The code is expected to be one of the codes listed in the code list 5305 of the United Trade Data Interchange Directory (UNTDID), see UNTDID 5305 Duty or tax or fee category code.
Typical VAT category codes for businesses in Europe include:
Name | VAT Category Code |
---|---|
Standard rate | S |
Lower rate | AA |
Higher rate | H |
VAT reverse charge | AE |
Free export, no tax | G |
Zero rated goods | Z |
Exempt from tax | E |
Services outside scope of tax | O Not supported with XRechnung |
Margin scheme (second-hand goods) | F |
Margin scheme (travel agents) | D |
E-Invoice Address and Scheme
Organizations that send or receive electronic invoices must have a unique e-invoice address, which is codified using a specific address scheme identifier. Generally, e-invoice addresses are subject to the Electronic Address Scheme ("EAS") defined by the European Union.
When participating in the Peppol Network (as both sender and recipient), however, only a limited set of address schemes is allowed (see Electronic Address Scheme (EAS) in the Peppol documentation).
The e-invoice sender information must be specified in the relevant business entity's fields E-Invoice Sender Address
and E-Invoice Sender Scheme Id
. The e-invoice recipient information must be specified in the relevant invoice's fields E-Invoice Recipient Address
and E-Invoice Recipient Scheme Id
.
Example e-invoice address types include:
Electronic Address Scheme | Example Value | Corresponding Scheme ID |
---|---|---|
German VAT number | DE123456789 |
9930 |
German Leitweg ID | 04011000-1234512345-06 |
0204 |
French VAT number | FR12345678901 |
9957 |
French SIREN code | 732829320 |
0002 |
French SIRET code | 732829320 00074 |
0009 |
Required Fields
Make sure, in addition, that the following fields are set:
Object | Required Fields |
---|---|
Invoice | Invoice No. Date Business Entity Buyer Reference Account Name Billing City Billing Postal Code Billing Street Billing Country Code E-Invoice Recipient Address E-Invoice Recipient Scheme Id |
Invoice Line Item | Sequence Quantity Unit Unit Code Unit Price Tax Rate |
Business Entity | Company Tax ID City Postal Code Country Code Phone Email Sender IBAN E-Invoice Sender Address E-Invoice Sender Scheme Id |
The country code must be provided using the ALPHA-2 notation as specified in ISO-3166-1, see ISO 3166-1:Alpha2 Country codes in the Peppol documentation.