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:

  1. Search (Search) for and select Payment Reference Rules.

  2. Click New.

  3. On the General FastTab, enter information for the fields marked with an asterisk:

    • Code
    • Payment Reference Search Template - for example, choose DESCTRANSACDETAILS.
  4. 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+)$

    PartMeaningExplanation
    ^Start of the stringEnsures the match begins at the start
    INV-Literal prefixMatches the text “INV-”
    \d{4}Four digitsMatches the year (for example, 2024)
    -Literal dashSeparates parts of the reference
    \d{3}Three digitsMatches the sequence number (for example, 001)
    (\d+)One or more digits (captured group)Captures the number used for matching (12345)
    $End of the stringEnsures nothing comes after the digits
  5. 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.
  6. 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.

Setting up a payment reference rule
Default payment reference rules
Configuring check digit validation
Payment reference rule examples
Payment reference rules FAQ