Working with reference positions
By setting up payment reference rules, you can define how payment references are validated, matched, and processed within your system. These rules help automate reconciliation by identifying key elements in payment references, such as document numbers, amounts, or other identifiers.
As part of this setup, you can use reference positions to extract only a specific part of a payment reference for matching. This is useful when references include prefixes, suffixes, or other embedded information, and only a defined substring should be used for matching in Business Central.
Tipp
Use reference positions when only a portion of the payment reference is relevant for matching. If the entire reference matches a field in your system, use Direct Match instead.
To configure a payment reference rule that uses reference positions:
Search (
) for and select Payment Reference Rules.Click New.
On the General FastTab, enter information for the fields marked with an asterisk:
- Code
- Payment Reference Search Template - for example, choose DESCTRANSACDETAILS.
On the Validation FastTab, enter a pattern in the Validation Pattern Code field. For example, if payment references follow a structure such as INV-2024-001/12345, and only 12345 should be used for matching: you could add the following regex:
^INV-\d{4}-\d{3}/(\d+)$Part Meaning Explanation ^ Start of the string Ensures the match begins at the start INV- Literal prefix Matches the text “INV-” \d{4} Four digits Matches the year (for example, 2024) - Literal dash Separates parts of the reference \d{3} Three digits Matches the sequence number (for example, 001) (\d+) One or more digits (captured group) Captures the number used for matching (12345) $ End of the string Ensures nothing comes after the digits On the Matching FastTab, disable Direct Match and enter information for the following fields:
- Match to Table
- Match to Field
- Reference Start Position - for example, enter 10.
- Reference Length - for example, enter 5.
Save the rule and test it with sample payment references. When processed, the system extracts the substring 12345 starting at position 10 and uses it to perform the match in Business Central.
Related information
Setting up a payment reference rule
Default payment reference rules
Configuring check digit validation
Payment reference rule examples
Payment reference rules FAQ