Understanding document type matching
Payment reference rules define how payment references are validated, matched, and processed in your system. These rules help automate reconciliation by identifying key elements in payment references, such as document numbers, amounts, or document type indicators.
You can set up document type matching as part of these rules to handle more advanced scenarios. Document type matching extracts and maps document type indicators (for example, INV for invoices or CM for credit memos) from payment references. This allows the system to more accurately match payments to their related documents, reducing manual effort and improving reconciliation accuracy.
Tip
When you turn on Match Document Type, link at least one document type mapping. Keep mappings up to date for all possible indicators, and always test your rule configuration before using it in production.
To create document type mappings
Set up mappings that define how document type indicators in payment references correspond to specific document types in Business Central.
To create document type mappings:
- Search () for and select Document Type Mappings.
- Add mappings for your document type indicators. Enter:
- Code - a unique identifier for the mapping.
- Description - a brief description of the mapping.
- Document Type Indicator - for example, INV.
- Document Type - for example, Invoice.
To create a payment reference rule for embedded document types
Use a payment reference rule to detect document type indicators that appear as part of payment references.
To create a payment reference rule for embedded document types:
Search () for and select Payment Reference Rules.
Click New.
On the General FastTab, enter information in the fields marked with an asterisk:
- Code
- Payment Reference Search Field Template - for example, select DESCTRANSACDETAILS.
On the Validation FastTab, enter a pattern in the Validation Pattern Code field. For example, for a reference such as INV2024001, you could add the following regex:
^[A-Z]{2,3}\d{7}$On the Matching FastTab, turn on Match Document Type and enter information in the following fields:
- Match to Table - for example, select Cust. Ledger Entry.
- Match to Field - for example, select Document Type.
- Reference Start Position - for example, enter 4.
- Reference Length - for example, enter 7.
- Document Type Start Position - the position where the indicator begins in the payment reference. For the example INV2024001, enter 1.
- Document Type Length - the number of characters in the indicator. For the example INV2024001, enter 3.
On the action bar, click Related Document Types, and then link one or more mappings to the rule.
When the system processes a payment reference, it extracts the first three characters and matches them to a defined document type mapping. If no mapping exists for the indicator, the document type field remains blank.