Skip to content

ERP plugins

invoiceR checks and approves invoices but does not pay them itself. Payment is handled by the ERP or accounting system. The connection to it is made by an ERP plugin. Each plugin can take on up to three tasks:

  1. Master data import: regularly fetch accounts, cost centers, projects, suppliers, VAT codes and other master data from the ERP (see Master data).
  2. Posting export: pass approved documents to the ERP as a creditor document after the final check, depending on the plugin together with the invoice PDF.
  3. Pre-posting: with a few ERPs, report the invoice before the last approval so that it appears in evaluations. Payment only happens after approval.
ERP systemImportExportPre-postingError feedbackConnection
AbacusyesyesyesSOAP (AbaConnect)
Abacus via ODBCyesyesyesODBC and file
ComarchyesFile
CSS eGeckoyesXML file
Generic CSVyesyesCSV file
SAP (IDoc)yesIDoc file
Axians InfomayesFile
Microsoft Dynamics 365 Business CentralyesyesyesREST API
Generic SQL ServeryesSQL
NexusyesyesyesSOAP and REST
Generic ODBCyesODBC
DynasoftyesODBC
LobosyesyesyesyesODBC
OpaleyesFile
pain.001 (ISO 20022)yesyesXML file
ProffixyesAPI
E3KyesyesREST API

Error feedback means: if the ERP rejects a posting, invoiceR brings the document back to the final check and shows the error message there and in the history. Plugins without error feedback pass the posting on without evaluating a response from the ERP. You then see errors in the ERP itself.

Import and export run as recurring Hangfire jobs. Their configuration is stored as JSON in the table conf.IrRecurringJobs in the field Configuration. It contains the connection details for the ERP, ERP-specific details (company, document type) and invoiceR settings such as the role that is informed about errors.

Import: At the scheduled time, the job connects to the ERP, fetches the master data and reconciles it with the existing data. Details under Master data import.

Export: When a document is fully approved, invoiceR creates an entry in the export queue (table exp.IrCaseBookings). The export job regularly looks for open entries and passes each document to the ERP individually. A processed entry gets a processing date and is not exported again.

Example: Microsoft Dynamics 365 Business Central

Section titled “Example: Microsoft Dynamics 365 Business Central”

The Business Central plugin connects through the Business Central REST API and logs in with an app registration in Microsoft Entra ID.

It imports accounts, suppliers, projects, articles and currencies with exchange rates, and exports approved documents as purchase invoices with the PDF as attachment.

SettingMeaning
AzureAdTenantIdDirectory (tenant) ID in Microsoft Entra ID
AzureAdClientIdApplication ID of the app registration
AzureAdClientSecretClient secret of the app registration
AzureAdScopeScope, usually https://api.businesscentral.dynamics.com/.default
BusinessCentralEnvironmentName of the Business Central environment, for example Production
OrganizationUnitExternalIdsList of company IDs in Business Central that are imported or exported. Each corresponds to an organization unit in invoiceR.
MappingKeys, SourceImport only, see Master data
ExceptionRoleIdExport only: role a document is assigned to when the export fails
CreateMissingVendorExport only: if the supplier is missing in Business Central, the export creates it (true) or stops with an error (false, default)
TaskClassIdentifierMethodNameMethodArgumentIdentifier
Import accountsenio.erp.Plugin.MSDynamics365.Entities.AccountsDoImportenio.erp.Plugin.MSDynamics365.Import.ImportArgument
Import suppliersenio.erp.Plugin.MSDynamics365.Entities.SuppliersDoImportenio.erp.Plugin.MSDynamics365.Import.ImportArgument
Import projectsenio.erp.Plugin.MSDynamics365.Entities.ProjectsDoImportenio.erp.Plugin.MSDynamics365.Import.ImportArgument
Import articlesenio.erp.Plugin.MSDynamics365.Entities.ArticlesDoImportenio.erp.Plugin.MSDynamics365.Import.ImportArgument
Import currenciesenio.erp.Plugin.MSDynamics365.Entities.CurrencyExchangeRatesDoImportenio.erp.Plugin.MSDynamics365.Import.ImportArgument
Export documentsenio.erp.Plugin.MSDynamics365.Export.InvoicesDoExportenio.erp.Plugin.MSDynamics365.Export.ExportArgument

Example configuration for the supplier import:

{
"AzureAdTenantId": "<directory-id>",
"AzureAdClientId": "<application-id>",
"AzureAdClientSecret": "<client-secret>",
"AzureAdScope": "https://api.businesscentral.dynamics.com/.default",
"BusinessCentralEnvironment": "Production",
"OrganizationUnitExternalIds": ["<company-id-1>", "<company-id-2>"],
"MappingKeys": ["IrOrganizationUnitId", "Number"],
"Source": "MSDynamicsImport"
}