E-Invoicing in Germany – Quickstart
DE E-Rechnung
FR e-facture
Since 2025, businesses in Germany must be able to receive e-invoices. As of 2027, businesses with a total turnover of more than EUR 800,000 in the previous year must also send their domestic B2B invoices as e-invoices. As of 2028, this applies to all businesses. This quickstart sets up JustOn Billing & Invoice Management to produce e-invoices in one of the two German formats – XRechnung or ZUGFeRD – and to send them to your customers by email.
Your invoicing process stays the same: the invoice run creates draft invoices, you finalize them, and you send them by email. On finalization, JustOn Billing & Invoice Management now additionally produces the e-invoice, and the invoice email carries it as an attachment.
Info
This quickstart deliberately covers one path only: XRechnung or ZUGFeRD, sent by email, with the customer's VAT ID as e-invoice address. For other formats, distribution via Peppol or Avalara, invoices to public authorities or other e-invoice addresses, see Beyond This Quickstart.
Prerequisites
- Invoice email
- Your org sends invoices by email, see Controlling Email Options.
- Country codes
- The Salesforce State and Country/Territory Picklists are enabled. Otherwise, the invoice field
Billing Country Codestays empty, and no e-invoice is produced. - Admin access
- You are a system administrator and can access the Global Configuration dialog, see Defining Platform Integration User.
Setting up e-invoicing involves the following steps:
(1) Choosing the e-invoice format
(2) Enabling the platform access
(3) Preparing the source data
(4) Testing the e-invoice workflow
(1) Choosing Format
Both XRechnung and ZUGFeRD meet the legal requirements. They differ in what they require from your setup and what your customers receive:
| Criterion | XRechnung | ZUGFeRD | Notes |
|---|---|---|---|
| Valid e-invoice for domestic B2B invoices | |||
| Can be sent by email | |||
| Existing invoice templates can be used as is | ZUGFeRD requires a v3 (Liquid) template. | ||
| One file per invoice (PDF with machine-readable e-invoice data) | XRechnung adds a separate e-invoice file (XML) to the invoice PDF. | ||
| Works without VAT ID and buyer reference of the customer | Customers without VAT ID keep receiving the invoice PDF only. |
Recommendation
- You already invoice with JustOn
- Choose XRechnung. Your invoice templates and your invoice PDFs remain unchanged, the XML file is just added to the invoice email.
- You are setting up JustOn and start with v3 templates
- Choose ZUGFeRD if your customers prefer a single file or explicitly demand this format. Otherwise, choose XRechnung.
(2) Enabling Platform Access
Part of the e-invoice logic runs on the JustOn platform. This requires a platform integration user, access to the connected app JustOn Platform and Salesforce API access. You may have already set this up during the software installation – check each item and set it up only if required.
Defining the platform integration user
- Click to access the App Launcher, and select JustOn Billing Configuration.
- Open the Global Configuration tab and click Edit.
- In the Platform Integration section, select a user who has a standard Salesforce user license and the permission set JustOn Read/Write.
- Click Save, then Finish.
For details, see Defining Platform Integration User.
Enabling access for JustOn Platform
- Click to enter Setup, then navigate to Apps > Connected Apps > Manage Connected Apps.
- Click Edit in the row of JustOn Platform.
- In the
Permitted Usersfield, selectAdmin approved users are pre-authorized, and click Save. - Click JustOn Platform, then Manage Profiles in the Profiles section.
- Select
System Administratorand the profiles of all users who finalize invoices, and click Save.
With the default All users may self-authorize, finalizing fails with the message "Platform not available, please contact customer support if the problem persists!".
For details, see Enabling App Access for JustOn Platform.
Enabling Salesforce API access
- Click to enter Setup, then navigate to Users > Profiles or Permission Sets.
- For the platform integration user and all users who finalize invoices, open the profile or a permission set they are assigned, and click System Permissions.
- Click Edit, select
API Enabled, and click Save.
For details, see Enabling Salesforce API Access.
(3) Preparing Source Data
Generally, the e-invoice document formats and syntaxes determine which information is required.
As a rule of thumb, e-invoices must include the same information as invoices always do: a unique identifier, date, seller details, buyer details, the goods or services provided, their prices, applicable taxes. In addition, e-invoices must include data to allow for proper electronic processing, like the sender's and recipient's electronic addresses, invoice line item units with unit codes, tax rates with tax codes, or – for XRechnung – the buyer reference (a unique identification of the invoice recipient).
This involves preparing the business entity, quantity units, tax rules and accounts.
Preparing business entity
The business entity carries your company data as e-invoice sender. Your VAT ID serves as your e-invoice address.
- Open the relevant business entity.
-
Specify the e-invoice sender address.
Business Entity Field Value E-Invoice Sender Address your VAT ID, like DE123456789E-Invoice Sender Scheme Id 9930(scheme for German VAT IDs) -
Make sure that the following fields are set:
Company,Tax ID,Street,City,Postal Code,Country Code(DE),Phone,Email Sender,IBAN.
Leave the business entity fields E-Invoice Format and Email File Types empty. This quickstart sets these values per account.
For details, see Preparing Business Entity.
Preparing quantity units
Each invoice line item of an e-invoice needs a unit code. JustOn Billing & Invoice Management derives it from the unit code of the quantity unit.
You create a quantity unit for each unit name that your invoice line items use.
- Click to enter Setup, then navigate to Custom Code > Custom Settings.
- Click Manage in the row of Quantity Units, then New.
-
In
Name, enter the unit exactly as it appears on your invoice line items, and inCode, the matching UN/ECE code.For example:
Name Code Piece H87Hour HURWorking Day E49Unit C62 -
Click Save.
Every invoice line item must carry a unit. If your invoice line item source data has none, create the formula field ON_Unit (return type Text) on the invoice line item source object, returning one of your unit names, like Piece (or Stück). For details, see Preparing Quantity Units.
Preparing tax rules
Each invoice line item of an e-invoice needs a VAT category code. JustOn Billing & Invoice Management derives it from the VAT category code of the tax rule.
You add the VAT category code to your existing tax rules.
- Click to enter Setup, then navigate to Custom Code > Custom Settings.
- Click Manage in the row of Tax Rules.
-
For each tax rule, click Edit, specify the
VAT Category Code, and click Save.Tax Case VAT Category Code Standard or reduced rate (19 %, 7 %) SReverse charge AEExport outside the EU GFor the codes
AEandG, JustOn Billing & Invoice Management sets the required VAT exemption reason automatically. For other tax cases, see Preparing Tax Rules.
Assigning VAT category codes is a tax decision. Have it confirmed by your tax consultant.
Preparing accounts
The e-invoice settings are copied from the account to the invoice on invoice creation, using the ON field mechanism. This way, you control per account which customers receive e-invoices, without touching your invoice source data.
You create the account fields for the format you have chosen:
- Click to enter Setup, then navigate to the object management settings of the Account object.
- Click Fields & Relationships.
-
Create the following formula fields with the return type
Text.Replace
VAT_IDwith the API name of the account field that holds the customer's VAT ID, andCUSTOMER_NOwith the field that holds your customer number. Accounts without VAT ID keep receiving invoices as before.API Name Formula ON_EInvoiceFormat IF(ISBLANK(VAT_ID), "", "XRechnung UBL")ON_EInvoiceDistributionChannel IF(ISBLANK(VAT_ID), "", "Email")ON_EInvoiceRecipientAddress VAT_IDON_EInvoiceRecipientSchemeId IF(ISBLANK(VAT_ID), "", "9930")ON_BuyerReference CUSTOMER_NOON_EmailFileTypes IF(ISBLANK(VAT_ID), "", "Invoice PDF,E-Invoice")XRechnung requires a buyer reference. In B2B, this is a value you agree on with your customer – usually your customer number is accepted.
API Name Formula ON_EInvoiceFormat "ZUGFeRD"ON_EInvoiceDistributionChannel "Email"ON_EmailFileTypes "E-Invoice" -
Grant read access to the new fields for the users who run invoice runs, and add the fields to the account page layout if users should see the values.
If your invoice source objects (like orders or subscriptions) already define e-invoice ON fields, their values take precedence over the account values.
Preparing template for ZUGFeRD
If you need to generate ZUGFeRD e-invoices, your invoices must use a v3 template, because the ZUGFeRD file is built from a PDF/A-3 document that only the JustOn PDF service v3 produces.
-
Create a v3 template using the New Template dialog.
For details, see Preparing Template.
-
Assign the template to your invoices.
Use, for example, in the business entity field
Template, see Specifying Which Template to Use.
The ZUGFeRD file replaces the invoice PDF – the invoice email carries one file only.
(4) Testing E-Invoice
Test the setup with a test account before you finalize real invoices.
- Create a test account with a VAT ID, a customer number and a complete billing address, including the billing country
Germany. - Create invoice source data for the account, and run an invoice run.
-
Check the draft invoice.
The invoice must specify
Business Entity,E-Invoice Format,E-Invoice Distribution Channel(Email) andEmail File Types, for XRechnung alsoBuyer Reference,E-Invoice Recipient AddressandE-Invoice Recipient Scheme Id. The invoice line items must specifyUnit,Unit Code,Tax RateandVAT Category Code. -
Finalize the invoice.
This produces the e-invoice along with the invoice PDF.
-
Check the field
E-Invoice Statuson the invoice.Created: The e-invoice is attached to the invoice.Created With Warnings: The e-invoice and a validation report are attached. Read the warnings anyway.Validation Error: Only the validation report is attached. Correct the data as indicated in the report.
For details, see Reviewing Status Fields and Reviewing Validation Report.
-
Send the invoice email to an internal address, and check the attachments.
Info
To produce the e-invoice again after correcting data, add the Create E-Invoice action to the invoice record page, see Adding E-Invoice Action for Individual Invoices. Otherwise, you must create a new test invoice for each attempt.
Once the test invoice is fine, your setup is complete. From now on, every invoice for an account with e-invoice settings produces an e-invoice on finalization, and the invoice email – sent manually or automatically – carries it as attachment.
Beyond This Quickstart
The full e-invoice configuration covers more options than this quickstart:
- other e-invoice addresses than the VAT ID, like email addresses or Leitweg-IDs, see Preparing Account
- invoices to German public authorities, see Sending E-Invoices to German Authorities
- distribution via Peppol or Avalara ELR, other formats and countries, see Electronic Invoices
- all required fields and the field mapping, see E-Invoice Preconditions and E-Invoice Data Mapping
For background on e-invoicing obligations in Germany, see E-Invoicing in Germany – A Guide.