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:
- Master data import: regularly fetch accounts, cost centers, projects, suppliers, VAT codes and other master data from the ERP (see Master data).
- 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.
- Pre-posting: with a few ERPs, report the invoice before the last approval so that it appears in evaluations. Payment only happens after approval.
Available plugins
Section titled “Available plugins”| ERP system | Import | Export | Pre-posting | Error feedback | Connection |
|---|---|---|---|---|---|
| Abacus | yes | yes | yes | SOAP (AbaConnect) | |
| Abacus via ODBC | yes | yes | yes | ODBC and file | |
| Comarch | yes | File | |||
| CSS eGecko | yes | XML file | |||
| Generic CSV | yes | yes | CSV file | ||
| SAP (IDoc) | yes | IDoc file | |||
| Axians Infoma | yes | File | |||
| Microsoft Dynamics 365 Business Central | yes | yes | yes | REST API | |
| Generic SQL Server | yes | SQL | |||
| Nexus | yes | yes | yes | SOAP and REST | |
| Generic ODBC | yes | ODBC | |||
| Dynasoft | yes | ODBC | |||
| Lobos | yes | yes | yes | yes | ODBC |
| Opale | yes | File | |||
| pain.001 (ISO 20022) | yes | yes | XML file | ||
| Proffix | yes | API | |||
| E3K | yes | yes | REST 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.
How import and export work
Section titled “How import and export work”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.
Configuration
Section titled “Configuration”| Setting | Meaning |
|---|---|
AzureAdTenantId | Directory (tenant) ID in Microsoft Entra ID |
AzureAdClientId | Application ID of the app registration |
AzureAdClientSecret | Client secret of the app registration |
AzureAdScope | Scope, usually https://api.businesscentral.dynamics.com/.default |
BusinessCentralEnvironment | Name of the Business Central environment, for example Production |
OrganizationUnitExternalIds | List of company IDs in Business Central that are imported or exported. Each corresponds to an organization unit in invoiceR. |
MappingKeys, Source | Import only, see Master data |
ExceptionRoleId | Export only: role a document is assigned to when the export fails |
CreateMissingVendor | Export only: if the supplier is missing in Business Central, the export creates it (true) or stops with an error (false, default) |
| Task | ClassIdentifier | MethodName | MethodArgumentIdentifier |
|---|---|---|---|
| Import accounts | enio.erp.Plugin.MSDynamics365.Entities.Accounts | DoImport | enio.erp.Plugin.MSDynamics365.Import.ImportArgument |
| Import suppliers | enio.erp.Plugin.MSDynamics365.Entities.Suppliers | DoImport | enio.erp.Plugin.MSDynamics365.Import.ImportArgument |
| Import projects | enio.erp.Plugin.MSDynamics365.Entities.Projects | DoImport | enio.erp.Plugin.MSDynamics365.Import.ImportArgument |
| Import articles | enio.erp.Plugin.MSDynamics365.Entities.Articles | DoImport | enio.erp.Plugin.MSDynamics365.Import.ImportArgument |
| Import currencies | enio.erp.Plugin.MSDynamics365.Entities.CurrencyExchangeRates | DoImport | enio.erp.Plugin.MSDynamics365.Import.ImportArgument |
| Export documents | enio.erp.Plugin.MSDynamics365.Export.Invoices | DoExport | enio.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"}