Configuration Guide
Fine-tune Magic Documents Import to match your business processes. Configure general settings, email processing rules, document recognition, vendor mapping, and default values.
Accessing Setup
To open the configuration page, search for Magic Documents Import Setup using the Business Central search bar (Alt+Q), or navigate to:
Path: Departments > Administration > Application Setup > Magic Documents Import Setup
You need the MDI-ADMIN permission set to access configuration settings. Users with MDI-USER can view settings but cannot modify them.
General Settings
These settings control the core behavior of Magic Documents Import:
| Setting | Type | Default | Description |
|---|---|---|---|
| Enabled | Boolean | No | Master switch to enable or disable document processing. Must be set to Yes to process any documents. |
| Default Document Type | Option | Purchase Invoice | The document type assumed when the system cannot automatically determine the type from the document content. |
| Auto-Create Documents | Boolean | No | When enabled, Business Central documents are created automatically after successful extraction without manual review. |
| Require Review | Boolean | Yes | Requires a user to review and approve extracted data before a BC document is created. Recommended for production use. |
| Keep Original Files | Boolean | Yes | Stores the original uploaded file as an attachment on the created BC document for audit trail purposes. |
Email Processing Configuration
Configure how Magic Documents Import monitors and processes incoming email invoices. This is the core feature for automating accounts payable workflows.
Email Invoice Processing
Magic Documents Import can automatically poll a dedicated mailbox for incoming invoices, extract attachments (PDF, XML, images), and process them through the document recognition pipeline. This enables a fully hands-free AP workflow.
| Setting | Default | Description |
|---|---|---|
| Incoming Email Address | (blank) | The email address to monitor for incoming invoices (e.g., invoices@yourcompany.com). |
| Email Polling Interval | 5 minutes | How frequently the system checks for new emails. Options: 1, 2, 5, 10, 15, 30, or 60 minutes. |
| Accepted Attachment Types | PDF, XML, CSV, JPEG, PNG, TIFF | File types that will be extracted from email attachments. Other attachment types are ignored. |
| Auto-Forwarding Rules | Disabled | Define rules to automatically route emails from specific senders or with specific subjects to the import processing queue. |
| Process Email Body | No | When enabled, the system also analyzes the email body for invoice data in addition to attachments. |
| Mark Processed Emails | Move to Folder | What to do with processed emails: move to a folder, mark as read, or delete. "Move to Folder" is recommended. |
Document Recognition Settings
Configure how the system reads and extracts data from incoming documents:
OCR Settings
| Setting | Description |
|---|---|
| OCR Engine | Select the OCR engine: Built-in (included) or Azure AI Document Intelligence (requires Azure subscription for higher accuracy). |
| Document Language | Primary language of incoming documents. Supports 40+ languages. Set to Auto-Detect for multilingual environments. |
| Confidence Threshold | Minimum confidence score (0-100%) for extracted fields. Fields below this threshold are flagged for review. Default: 80%. |
Field Extraction Rules
Define which fields are extracted and how they are mapped to Business Central fields:
- Header Fields: Vendor name, VAT number, invoice number, invoice date, due date, currency, total amount
- Line Fields: Item description, quantity, unit price, line amount, VAT rate, item number
- Summary Fields: Subtotal, VAT amount, total amount, payment reference, IBAN/bank details
Vendor Mapping
Magic Documents Import automatically matches incoming documents to existing vendor records in Business Central. The system uses multiple matching strategies in order of priority:
Automatic Matching
| Priority | Match Method | Description | Accuracy |
|---|---|---|---|
| 1 | VAT Registration No. | Matches the extracted VAT number against the Vendor Card VAT Registration No. field. | Highest |
| 2 | Vendor Name | Fuzzy matching of the extracted vendor name against vendor records. Handles abbreviations and minor variations. | High |
| 3 | Address | Compares the extracted address against vendor addresses. Used as a secondary confirmation. | Medium |
| 4 | Email Sender | For email imports, matches the sender email domain against vendor email or website records. | Medium |
Manual Mapping Rules
For vendors that cannot be matched automatically, you can define manual mapping rules:
| Field | Description |
|---|---|
| Source Identifier | The text or value extracted from the document (vendor name, VAT No., email address, etc.) |
| Match Type | Exact Match, Contains, Starts With, or Regular Expression |
| Target Vendor No. | The Business Central vendor number to map to when the rule matches |
| Priority | Rule priority (lower number = higher priority). Used when multiple rules match. |
Line Item Matching
Configure how extracted line items are matched to items or G/L accounts in Business Central:
By Item No.
Matches the extracted item number or SKU directly against the Item No. field in the Item table.
By Barcode
Uses extracted barcode or GTIN values to find items via the Item Reference table.
By Description
Fuzzy matching of extracted line descriptions against item descriptions and search descriptions.
By Vendor Item No.
Matches against vendor-specific item numbers stored in Item Vendor Catalog entries.
Default Values
Set fallback values that are applied when the corresponding data cannot be extracted from the document:
| Field | Default Behavior | Notes |
|---|---|---|
| Posting Date | Work Date (today) | Used when no invoice date is extracted from the document |
| Due Date | Calculated from Payment Terms | Falls back to vendor payment terms if no due date is found |
| Location Code | (blank) | Default warehouse location for inventory items on purchase documents |
| Dimension Values | From Vendor Card | Default dimensions inherited from the matched vendor record |
| VAT Bus. Posting Group | From Vendor Card | Inherited from vendor unless overridden by extraction rules |
Configuration Complete?
Now that your settings are in place, learn how to import and process documents in the Usage Guide.
Usage Guide