With Document V2, you can create and manage invoices, credit notes, cancellation invoices and delivery notes for your orders. In this tutorial, you will activate the feature, configure your documents and create your first invoice. You will then learn how to download and send documents and use additional features.
Experimental feature: Document V2 is currently experimental. To use it, you must first enable the DOCUMENT_GENERATION_REWORK feature flag. For more information, see the Document V2 developer documentation.
You need an order to create an invoice. To create a credit note or cancellation invoice, an invoice must already exist. Credit notes also require credit line items.
The feature is activated through the technical configuration of your Shopware installation. If you do not have access to it, ask the technical team responsible for your shop to enable the flag.
Shopware describes how to activate feature flags using the .env file. For the flag specified in the Document V2 documentation, this results in the following entry:
DOCUMENT_GENERATION_REWORK=1Open the .env file of your Shopware installation, add the entry or change the existing value to 1, and save the file. The general procedure is documented under Activating feature flags.
First, check your company information under Settings > Master data > Company information. This is where you maintain the company information itself.
Next, open Settings > Shop > Documents. Here, you define the layout of your documents and the content they display.
You can configure the following settings:
Customer account: Display of documents in the customer account.
Addresses: Company and return addresses.
File names: Prefix, suffix and format-specific additions.
Adjust the settings to suit your requirements. Then check the result using a document preview.
If no document number is explicitly provided, Document V2 uses the number range for the respective document type. See Document generation in the developer documentation.
The file formats you can select depend on the document type:
| Document type | Available formats |
|---|---|
| Invoice | PDF, HTML, ZUGFeRD XML, PDF with embedded ZUGFeRD |
| Credit note | PDF, HTML, ZUGFeRD XML, PDF with embedded ZUGFeRD |
| Cancellation invoice | PDF, HTML, ZUGFeRD XML, PDF with embedded ZUGFeRD |
| Delivery note | PDF, HTML |
The available formats for each document type are described in the Overview of document types and formats.
You can then download the document or send it by email.
Open the Documents section of the order and select the invoice you created.
Mark as sent: Use this function to mark the document as “sent”.
Sending by email and marking a document as “sent” are available as separate functions.
In addition to invoices, you can also create credit notes, cancellation invoices and delivery notes under Order > Documents. Select the relevant document type, choose from the available file formats and enter the document details. Check the document in the preview before generating it.
Please note the following additional prerequisites:
| Document type | Additional prerequisites |
|---|---|
| Credit note | An existing invoice and credit line items |
| Cancellation invoice | An existing invoice |
| Delivery note | A delivery date for document creation |
The delivery date required for delivery notes is also described in the Overview of document types.
In the document section of an order, you can open or download existing documents in various formats, send them by email, mark them as “sent” and delete them.
If you want to download several documents together, you can download them as a ZIP archive.
You can also upload existing document files. The maximum file size is 50 MB per file.
If you need documents regularly or for multiple orders, additional options are available.
Document V2 supports document creation using the Flow Builder. Documents can also be used automatically as email attachments in various formats.
When bulk editing orders, you can create, download and delete documents for multiple orders.
When creating documents, Document V2 supports both skipping existing documents and forcing them to be regenerated. Choose the behaviour that suits your use case.