Skip to content

FMFI E-Invoice — Technical & Consultant Reference

This document is intended for consultants and developers working with the FMFI E-Invoice app. For end-user guidance, see index.md.


Table of contents


E-Invoice Setup — field reference

Open the E-Invoice Setup page (search for "E-Invoice Setup" in Business Central).

General settings

Field Description
E-Invoice Address Your company's e-invoice address (OVT code or similar). This is the sender address used in the Finvoice XML.
Intermediator Code The code of your e-invoice operator (bank/service provider).
Send E-Inv. To All Customers When enabled, e-invoices are created for all customers. When disabled, you must explicitly enable e-invoicing per customer on the Customer Card.
Default Finvoice Receiv. Field Which field on the Customer Card is used to determine the customer's e-invoice address. Can be overridden per customer.
Finvoice Receiver Alternative Fallback value used when a customer is missing an e-invoice address (e.g. EKIRJE, PRINT, TULOSTUS).
Cust. Address Details Source Controls whether the customer address in the XML is taken from the Customer Card or from the posted invoice document.
Finvoice Validation Controls what happens when technical XML validation fails before sending: Blank = no validation, Message = show the validation result but continue, Error = block sending on validation failure.
Finvoice Validation Scope Controls whether validation checks the XML schema only or both the schema and Schematron business rules.
Write To One File When enabled, all invoices are concatenated into a single XML file. Usually required when using a bank as operator.
Zip Per Invoice Creates a separate ZIP per invoice (each containing the XML and any attachments).
Increase No. Printed On Export Increments the "No. Printed" counter on the posted document when an e-invoice is exported.
Skip Zero Amount Invoices Skips invoices where Amount Including VAT is zero when suggesting invoices.
Print 0 Invoice Lines Controls whether invoice lines with zero amount are included in the XML.
Write Finvoice SOAP Includes the Finvoice SOAP envelope header. Usually required by operators.
Default Inv. Overdue Interest Default overdue interest rate used when none is defined on the payment term.
InvoiceFreeText Std Text A Standard Text Code whose content is exported in the <InvoiceFreeText> element.
Invoice Comment Lines Visible Include invoice comment lines in the e-invoice (note: EN 16931 does not support comment lines).
Skip EN16931 Identifier Omits the <SpecificationIdentifier> element from the XML.

Invoice types — enable or disable which document types can be sent as e-invoices:

  • Invoice — Sales invoices
  • Credit Memo — Sales credit memos
  • Service Invoice — Service invoices
  • Service Credit Memo — Service credit memos

Attachments

Field Description
Include Attachments Include document attachments (from Document Attachment) in the e-invoice export.
Auto Generate Invoice Printout Automatically generates a PDF printout of the invoice before exporting. Only available when Include Attachments is enabled.
Attachment Path Path prefix for attachment filenames (e.g. Attachments\). Can also be used to prepend the filename.
Skip Attachment Name Prefix When enabled, removes the attachment:// prefix from attachment URLs in the XML.

Azure Blob Storage connection

Field Description
ABS Account Name Azure Storage account name for direct blob export.
ABS Container Name Container name within the storage account.
Access Key Azure Storage access key (masked field).

Customer Card — E-Invoice fields

On the Customer Card, the E-Invoice group contains:

Field Description
E-Invoice Address The customer's e-invoice address (OVT code, IBAN, or other endpoint identifier).
Intermediator Code The customer's e-invoice operator code.
Enable E-Invoice Default = uses the global setting from E-Invoice Setup, Yes = always send e-invoices, No = never send e-invoices.
Business Identity Code The customer's Finnish business identity code (Y-tunnus). Used in the Finvoice XML <BusinessId> element.
Alternative Receiver Field Id Override which Customer Card field is used as the e-invoice receiver address for this customer.

When Send E-Inv. To All Customers is disabled in E-Invoice Setup, only customers with Enable E-Invoice set to Yes will be included when suggesting e-invoices.


Export/Import Setup

The E-Invoice Exp. Imp. Setup page lets you define named worksheet configurations. Each configuration specifies:

Field Description
Code Unique identifier for the configuration.
Description Human-readable name.
Direction Export or Import.
Suggest Invoices Codeunit Which codeunit is used to suggest invoices (allows extensibility).
Export Codeunit Which codeunit handles the export (e.g. Export to Zip, Export to Azure Blob).

This is the main extensibility point: by creating new Export/Import Setup records and pointing them to custom codeunits, consultants can add new export targets or invoice suggestion logic without modifying the base app.

Default configurations

After installation, the app creates:

  • An Export configuration using the Finvoice 3.0 export engine with ZIP file output
  • Additional configurations can be added for Azure Blob Storage or custom integrations

Bank detail configuration

The E-Invoice Bank Detail Card page controls which bank accounts appear in the Finvoice XML.

Field Description
Bank No. Links to a Bank Account in Business Central.
Show As Default Bank Only one bank per currency can be the default. The default bank is shown first in the Finvoice XML.
Currency Code Associates the bank with a specific currency.

If no bank details are configured, the app falls back to the bank information in Company Information.


Worksheet columns reference

Column Description
Document Type Invoice, Credit Memo, Service Invoice, or Service Cr. Memo
Document No. The posted document number
Account No. Customer number
Account Name Customer name
Amount Invoice amount excluding VAT
Amount Including VAT Invoice amount including VAT
E-Invoice Sent Whether the e-invoice has been sent (can be toggled manually)
E-Invoice Date Sent Date when the e-invoice was sent
E-Invoice Time Sent Time when the e-invoice was sent
Factoring Sent Date Date when factoring data was sent
Has Printout Attachment Whether a PDF printout is attached
Contains Validation Errors Whether the generated XML has validation issues (click to see details)

Validation

The app can validate generated Finvoice XML before sending. Validation has two setup controls in E-Invoice Setup.

Finvoice Validation controls what happens when validation fails:

Setting Behaviour
Blank No validation.
Message Validation runs and shows the validation result, but does not prevent export.
Error Validation runs and blocks export if the XML is invalid.

Finvoice Validation Scope controls how much the API validates:

Setting Behaviour
Schema Validates the XML against the Finvoice XSD schema only.
Schema and Schematron Validates both the XSD schema and Schematron business rules.

You can also validate individual invoices from the worksheet using the Validate Invoice action.


Permissions

The app includes the permission set e-invoice FMD which grants access to all E-Invoice tables and objects. Assign this permission set to users who need to work with e-invoices.


Extending the app

The app is designed for extensibility through the Export/Import Setup pattern:

  1. Create a new codeunit that processes E-Invoice Worksheet FMD records.
  2. Create a new Export/Import Setup record pointing to your codeunit.
  3. Users can select your custom worksheet to use your export/import logic.

Integration events

The core export engine (Export - Finvoice 3.0 FMD) publishes [IntegrationEvent] hooks at key points during Finvoice XML generation. Subscribe to these events from your own extension to customize the XML output without modifying the base app:

Event Purpose
OnAfterGetCustomers Adjust Bill-to / Sell-to customer data before XML generation
OnBeforeAddSellerPartyDetails Modify seller party XML element before it is added
OnAfterGetSetBankInformation Adjust bank account selection after resolution
OnBeforeAddInvoiceRecipientPartyDetails Modify invoice recipient XML element
OnBeforeAddBuyerPartyDetails Modify buyer party XML element
OnBeforeAddDeliveryPartyDetails Modify or suppress delivery party details
OnBeforeInsertInvoiceRowContent Modify or skip individual invoice rows
OnBeforeRowFreeText Add custom content before row free text
OnAfterInsertInvoiceRow Add custom elements after each invoice row
OnBeforeEpiDetails Add content before payment details (EPI)
OnAfterEpiDetails Add content after payment details
OnAfterGetSetAttachmentInformation Modify attachment references
OnBeforeGetInvoiceLines Override invoice line retrieval
OnAfterGetInvoiceLines Post-process invoice lines
OnAfterGetInvoiceFreeTextBeforeAddToInvoiceDetails Override free text content
OnAfterinvoiceSoapDataForInvoice Modify the SOAP envelope

Finvoice XML standard

The generated XML complies with:

  • Finvoice 3.0 — Finnish e-invoicing standard
  • EN 16931 — European e-invoicing standard (when Skip EN16931 Identifier is disabled)

The XML includes proper VAT handling with UN 5305 tax category codes and supports multiple VAT rates per invoice.