Skip to content

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
false
Field Specifies the API name (or relationship name) of the field to be used for matching the object to payment entries. Account__r.AccountNumber
Name
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

Info

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

Defining Payment Matching Fields

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

  1. In Setup, 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.

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
xyz.201799000101
(?i)XYZ\.20\d{2}99\d{6}
A[YearShort]B{000000} A17B123456 A\d{2}B\d{6}

Info

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