Skip to main content

Create E-Document

Creates the German e-invoice for a posted sales invoice or sales credit memo and registers it as an e-document in Business Central. With a service that has a service integration, it also hands the document over for sending. See E-Document Services for the difference.

Configure the step​

Record – a reference to the posted sales invoice or posted sales credit memo, for example the trigger record. Required.

E-Document Service – pick the E-Document Service to use. It decides the format and whether the document is also sent. Required.

File Name – optional pattern for the name of the created file, as in the PDF Print step. Two built-in placeholders are available: {Format} (XRechnung, PEPPOLBIS30DE or ZUGFeRD) and {RecordNo} (the document no.). SmartField placeholders such as {{trigger_record.Sell-to Customer Name}} work as well. The extension is added automatically when it is missing: .xml for XRechnung and PEPPOL, .pdf for ZUGFeRD. Leave the field empty for {Format}_{RecordNo}, for example XRechnung_103001.xml.

For a ZUGFeRD service, three more fields appear, as in the PDF Print step:

Report – the invoice or credit memo report that produces the PDF. Pick one of the supported reports.

Report Parameters – the options of the report, if it has any.

Layout – the report layout to use.

The step label​

The label of the step follows the service by itself: Create service description, or Create and send service description when the service has a service integration. So in the flow you can see at a glance whether a step sends.

What the step does​

  1. It runs Business Central's checks: company information, bank account and IBAN, seller contact, buyer reference and the bill-to address including the Country/Region Code (it must be filled, DE for German customers). If something is missing, the step fails with Business Central's message.
  2. It creates the e-invoice file and registers the document as an E-Document in Business Central – in both modes, so you find it on the E-Documents page.
  3. With a service integration, the document is then sent through Business Central's e-document workflow in the background. The step finishes as soon as the document has been handed over; it does not wait for the delivery. The sending status is shown on the E-Document in Business Central.

Outputs​

OutputWhat it holds
DocumentThe e-invoice file as an AutoFlow document: XML for XRechnung and PEPPOL, PDF for ZUGFeRD.
EDocumentA reference to the E-Document in Business Central.

Example​

A flow that creates an XRechnung when an invoice is posted and mails it:

  1. Trigger on the posted sales invoice.
  2. Create E-Document with the trigger record and an XRechnung service without a service integration.
  3. Send Email with the Document output attached.

The full walk-through is in Send an e-invoice by email.