Payment Matching Fields

JustOn allows for tracking collections for invoices. To this end, you can import payment entries from CSV files. Imported payment entries are then matched to invoices and dunnings, and, optionally, to opportunities and accounts.

The custom setting Payment Matching Fields determines which fields of which objects to consider, controlling the matching scope.

Payment Matching Fields Information

The custom setting Payment Matching Fields includes the following information:

Field Description Example Values
Name A unique name for the custom setting record. Account Number
Invoice Number
Active Determines whether the current field is used for the matching. true
Field Specifies the API name (or relationship name) of the field to be used for matching the object to payment entries. Account__r.AccountNumber
Reference Match Expression Defines a regular expression used to find matching strings in the Reference field of the payment entry. See Adjusting Reference Matching
Source Specifies the API name of the object to which the payment entry is to be matched. Invoice__c


JustOn ships pre-defined matching settings for the invoice number, the IBAN and the account number.

Name Source Field Reference Match Expression
Invoice Number Invoice__c Name
Invoice IBAN Invoice__c BankAccount__c [A-Z]{2,2}[0-9]{2,2}[a-zA-Z0-9]{1,30}
Account Number Invoice__c Account__r.AccountNumber

Defining Payment Matching Fields

Depending on your organization's requirements, you must customize the scope for the payment data matching process.

  1. Click to enter Setup, then open Custom Settings.

    In Salesforce Lightning, navigate to Custom Code > Custom Settings.

    In Salesforce Classic, navigate to Develop > Custom Settings.

  2. Click Manage in the row of Payment Matching Fields.

  3. Click New.
  4. Specify the details as necessary.

    The mandatory information include the name and the field.

    See Payment Matching Fields Information.

  5. Click Save.

To directly match payment entries to accounts, opportunities or dunnings, you can define the following payment matching settings:

Name Field Active Source
Account No AccountNumber Account
Opportunity Name Name Opportunity
Dunning Name Dunning__c

Adjusting Reference Matching

The basic matching behavior is to compare all words (strings separated by spaces) that are contained in the Reference field of the payment entry with the specified matching fields. However, the relevant strings may not always be separated by spaces, which may prevent them from being matched.

To facilitate the matching, you can use a regular expression that decomposes a complex string, enabling JustOn to detect the relevant part. Provide the expression that works for your Reference field values in the field Reference Match Expression of the custom setting Payment Matching Fields.


For details about the regular expression syntax, refer, for example, to the Pattern overview in the Java Documentation.

Example: Matching Specific Invoice Numbers

The following examples show regular expressions for some invoice number formats that may be defined using counters settings.

Counter Example Value Regular Expression
[Year]-{00000} 2017-00021 20\d{2}-\d{5}
XYZ.[Year]99{000000} XYZ.201799000101
A[YearShort]B{000000} A17B123456 A\d{2}B\d{6}

Example: Matching Invoices With Customer Number

Suppose you have a customer number field CustomerNumber__c on the account. The values are six-digit numbers, for example: 001000, 201000, 991889.

To match invoices to payment entry references that contain such numbers, the Payment Matching Fields configuration would be:

Name Source Field Reference Match Expression
Customer Number Invoice__c Account__r.CustomerNumber__c \d{6}