Complete e-invoice
The "Complete e-invoice" service task executes the entire e-invoicing pipeline in a single process step. Instead of chaining four separate service tasks in the BPMN process, this service handles everything automatically — from amount calculation to a fully ZUGFeRD-compliant e-invoice.
How it works
The task internally performs four steps in sequence:
- Amount calculation — Net, gross, and VAT are computed per line item and as grand totals.
- PDF generation — The calculated data is inserted into a Handlebars template and rendered as a PDF.
- ZUGFeRD mapping — Invoice data is transformed into the structured ZUGFeRD EN16931 format.
- XML embedding — The ZUGFeRD XML is embedded as a Factur-X attachment into a PDF/A-3 document.
The result is a PDF document that is both visually readable and machine-processable — compliant with the European e-invoicing standard.
Input parameters
Invoice data is provided as input. The HTML template and filename are configured in the process designer.
{
"app_invoice_no": "INV-2026-001",
"app_invoice_date": "2026-04-08",
"app_due_date": "2026-05-08",
"app_seller_name": "My Company Ltd",
"app_seller_street": "Main Street 1",
"app_seller_zip": "12345",
"app_seller_city": "Sample City",
"app_seller_country": "DE",
"app_seller_vat_id": "DE123456789",
"app_seller_email": "info@company.com",
"app_recipient_name": "Customer Corp",
"app_recipient_street": "Client Road 5",
"app_recipient_zip": "54321",
"app_recipient_city": "Client City",
"app_iban": "DE89370400440532013000",
"app_bic": "COBADEFFXXX",
"app_invoice_items_custom": [
{
"app_item_description": "Consulting",
"app_amount": 10,
"app_item_price_net": 150.00,
"app_vat_percentage": 19,
"app_unit": "Hours"
},
{
"app_item_description": "Materials",
"app_amount": 5,
"app_item_price_net": 25.00,
"app_vat_percentage": 7,
"app_unit": "Pieces"
}
]
}
Explanation:
- Invoice issuer (
app_seller_*): Name, address, VAT ID, email. - Invoice recipient (
app_recipient_*): Name and address. - Payment data (
app_iban,app_bic): For the payment information in the ZUGFeRD XML. - Line items (
app_invoice_items_custom): Quantity, unit price, VAT rate, and unit. - The HTML template is maintained in the process designer using the integrated template editor.
- The filename is defined in the "PDF filename" field (e.g.
E-Invoice-$(app_invoice_no).pdf).
Output
The task returns a file reference to the finished e-invoice PDF:
{
"referenceId": "01JXXXXX",
"filename": "E-Invoice-INV-2026-001.pdf",
"contentType": "application/pdf"
}
The PDF is a PDF/A-3 document with an embedded Factur-X XML — it can be sent, archived, or forwarded via integrations directly.
JSONata example
{
"app_invoice_no": $.app_invoice_no,
"app_invoice_date": $.app_invoice_date,
"app_due_date": $.app_due_date,
"app_seller_name": $.app_seller_name,
"app_seller_street": $.app_seller_street,
"app_seller_zip": $.app_seller_zip,
"app_seller_city": $.app_seller_city,
"app_seller_country": $.app_seller_country,
"app_seller_vat_id": $.app_seller_vat_id,
"app_recipient_name": $.app_recipient_name,
"app_recipient_street": $.app_recipient_street,
"app_recipient_zip": $.app_recipient_zip,
"app_recipient_city": $.app_recipient_city,
"app_iban": $.app_iban,
"app_bic": $.app_bic,
"app_invoice_items_custom": $.app_invoice_items_custom
}
Comparison: Individual steps vs. all-in-one
| Approach | BPMN steps | Use case |
|---|---|---|
| Individual services | 4 service tasks (calculation → PDF → ZUGFeRD mapping → XML embedding) | Maximum flexibility, e.g. when additional logic is needed between steps |
| Complete e-invoice | 1 service task | Recommended for standard invoicing workflows — less effort, same quality |
Notes
- All Handlebars helpers can be used in the template — including QR codes for EPC payments.
- VAT rates of 0 %, 7 %, and 19 % are supported.
- Optional fields such as
app_buyer_reference(routing ID for XRechnung),app_service_date, orapp_service_period_start/app_service_period_endcan be included as needed. - The live preview in the process designer shows the PDF with sample data before the process is published.
Tip
To create an EPC QR code (payment QR code on the invoice), use the qrCode helper in combination with buildString in the template:
<img src="{{{qrCode (buildString "BCD\n002\n1\nSCT\n" app_bic "\n" app_seller_name "\n" app_iban "\nEUR" app_gross_total "\n\n\nInvoice " app_invoice_no)}}}" width="150" />
Details on all available Handlebars helpers can be found in the Handlebars helper reference.