action.skip

Configuring Payment Matching

← Configuring Reconciliation/Settlements

As part of the settlement procedure, JustOn Cash Management can execute payment matching operations: it compares bank statement items (and payments created from them) with accounts and entries, looking for matching data like the customer number or statement number – as passed with the reference text – or the amount. Payment matching is automatically executed on bank statement retrieval.

After successful matching, JustOn Cash Management can complete the actual settlement.

For a detailed description of the functional matching concept, see Automatic Settlement using Data Comparison.

Settlement or payment matching?

Make sure not to confuse settlement with payment matching.

Settlement
Settlement is the mechanism for effectively associating payments with entries using entry items.
Payment matching
Payment matching is the operation that compares bank statement items or payments with entries using a unique criterion or customizable matching configurations. After successful matching, JustOn Cash Management can complete the actual settlement.

Preconditions

Payment matching is automatically executed on bank statement retrieval. The following general conditions apply:

  • Only currently downloaded bank statement items are subject to the matching procedure, where the matching result is Unmatched. That is, the bank statement items must not have been processed before. In addition, their status must be BOOK.
  • The Status of entries used as the matching target must be Open.
  • The Statement Date of entries used as the matching target must be before the Booking Date of the bank statement item.

Another important aspect is the data quality. If there is no end-to-end ID – the safest matching approach –, it is essential that other information is recognizable. The statements on which the entries are based typically include an ID, like an invoice number, order number, etc. If so, this number is saved as statement no to the entry record. Preferably, payers then include this statement number in the reference text of their payment orders. Since this reference is also part of the bank statement item, JustOn Cash Management can relate the matching strings.

Assume, for example, you want to use the invoice number for payment matching. In this case, you must make sure that

In addition, the string to be evaluated should, preferably, be at the beginning of the Reference field of the bank statement item. For the best matching results, you should therefore ask your customers to only specify the invoice number in the payment reference.

Info

Generally, the unique ID produced when initiating payment transactions from JustOn Cash Management is the safest – and therefore, preferred – way to settle entries with payments.

With respect to data comparison (if there is no unique ID), providing the statement number in the payment reference produces the best results. This is why this approach is preferred to other data.

Matching Configurations

The data comparison is configurable. To this end, JustOn Cash Management provides the custom Salesforce object Matching Configuration. Each matching configuration holds a predefined and reusable search template for one discrete matching target.

To adjust the search and comparison features for the expected data in your org, you can

  • Customize the options per matching configuration
  • Create new matching configurations
  • Define the matching priority – with multiple possible matches, the match produced with the higher prioritized search configuration takes precedence
  • Individually enable or disable existing matching configurations

Info

JustOn Cash Management provides ready-to-use matching configurations that cover typical comparison use cases:

  • statement number (invoice number, order number, etc.)
  • account number (customer number)
  • amount

For details, see Getting Default Matching Configurations.

Your business, however, may require more specfic or completely different matching configurations.

Make sure to adjust your matching configurations according to your needs and to test them appropriately.

Once matching configuration records are available and set active, JustOn Cash Management automatically applies them on bank data retrieval.

Available Information

A matching configuration includes the following information:

Field Required Description
Name The name of the matching configuration record, must be unique
Description
Template The (predefined) search template
Priority An integer value to define the matching priority (ascending, 1 = highest priority)
Parser Config Optional JSON expression that defines an input string filter (a regular expression) for the bank statement item field to be evaluated
Search Config Optional JSON expression that defines a search customization, for example, to query a specific field or to apply a similarity comparison
Active Activates the matching configuration

Search Templates and Configuration Options

Search templates "open" data sources in order to find matching entries. The following search templates are available by default:

Entry by statement number

Find the entry by extracting the statement number from the reference field

Data source
Reference field of the bank statement item, which can hold more than the statement number and must therefore be parsed to extract the relevant string
Target record
Entry, where the matching target is the field Statement No
Parser configuration
The statement number pattern to match, for example {"pattern" : "INV-\\d{5}"}
Search configuration
  • A case sensitivity setting, like {"case-sensitive" : true}

    If "case-sensitive" : true|false is not specified, JustOn Cash Management defaults to a case-insensitive comparison.

Account by account number reference

Find the account by extracting the account number from the reference field

Data source
Reference field of the bank statement item, which can hold more than the account number and must therefore be parsed to extract the relevant string
Target record
Account, where the matching target is a user-defined field that holds the account number
Parser configuration
The account number pattern to match, for example {"pattern" : "ACC-REF-\\d{5}"}
Search configuration
The account field that holds the account number, and, optionally, a case sensitivity setting, for example {"target-field" : "accountnumber", "case-sensitive" : true}
If "case-sensitive" : true|false is not specified, JustOn Cash Management defaults to a case-insensitive comparison.
Account by contact number reference

Find the account by extracting the contact number from the reference field

Data source
Reference field of the bank statement item, which can hold more than the contact number and must therefore be parsed to extract the relevant string
Target record
Contact, where the matching target is a user-defined field that holds the contact number
Parser configuration
The contact number pattern to match, for example {"pattern" : "CNT-REF-\\d{5}"}
Search configuration
The contact field that holds the contact number, and, optionally, a case sensitivity setting, for example {"target-field" : "contactnumber__c", "case-sensitive" : true}
If "case-sensitive" : true|false is not specified, JustOn Cash Management defaults to a case-insensitive comparison.
Entry by amount

Find the entry by matching the amount

Data source
Amount and Amount CDI fields of the bank statement item
Target record
Entry, where the matching targets are the fields Initial Amount and Open Amount and
  • Entries of the type Credit match against Amount CDI = Debit for outgoing amounts
  • Entries of the type Debit match against Amount CDI = Credit for incoming amounts
Search configuration
  • A percentage value by which the amount can differ to cover rounding differences, currency conversion differences, underpayments/overpayments, etc. {"percentage" : 0.02}, for example, will allow a 2% amount difference.
  • An absolute amount by which the amount can differ. {"absolute" : 2.00}, for example, will allow an absolute amount difference of 2,00 (of the given currency).

You can use either one of percentage or absolute amount configurations, or both at the same time. When using both, JustOn Cash Management applies the configuration that yields the smaller deviation.

If you want to match the exact amount explicitly, use the percentage configuration {"percentage" : 0.00}. An absolute amount configuration using 0.00 will not work because the absolute amount must be positive.

Account by IBAN

Find the account by matching the IBAN

Data source
  • Creditor IBAN – for outgoing amounts (Amount CDI is Debit)
  • Debtor IBAN – for incoming amounts (Amount CDI is Credit)
Target record
  • Payment instruments (with the type set to SEPA Mandate), where the matching target is the field IBAN
  • Accounts, where the matching target is a user-defined field that holds the IBAN
Search configuration
  • The payment instrument field that holds the IBAN, like {"related-table" : "jpay1__paymentinstrument__c", "related-field" : "jpay1__iban__c", "related-table-account-id-field" : "jpay1__account__c"}
  • The account field that holds the IBAN, for example {"related-table" : "account", "related-field" : "bankaccount__c", "related-table-account-id-field" : "id"}
Account by account name

Find the account by matching the creditor or debtor name against the account name

Data source
  • Creditor Name – for outgoing amounts (Amount CDI is Debit)
  • Debtor Name – for incoming amounts (Amount CDI is Credit)
Target record
Account, where the matching target is the field Name
Search configuration
A similarity value between 0 and 1, where 0 = 0% and 1 = 100%
{"similarity" : 0.7}, for example, will retrieve name matches with a 70% similarity.
Account by contact name

Find the account by matching the creditor or debtor name against the contact name.

Data source
  • Creditor Name – for outgoing amounts (Amount CDI is Debit)
  • Debtor Name – for incoming amounts (Amount CDI is Credit)
Target record
Contact, where the matching target is the field Full Name
Search configuration
A similarity value between 0 and 1, where 0 = 0% and 1 = 100%
{"similarity" : 0.7}, for example, will retrieve name matches with a 70% similarity.
Entry by correlating dates

Find the entry by correlating dates.

Data source
Value Date and Booking Date fields of the bank statement item
Target record
Entry, where the matching targets are the fields Statement Payment Due Date and Statement Date and a payment cannot be received prior to its corresponding entry (Value Date | Booking Date >= Statement Date)

JustOn Cash Management currently matches exact dates only, so it does not support a parser configuration or search configuration.

Entry by custom field

Find the entry by extracting a string from the reference and matching it to a user-defined field on the entry.

Data source
Reference field of the bank statement item, which can hold more information than the relevant string and must therefore be parsed to extract the relevant string
Target record
Entry, where the matching target is a user-defined field that holds the relevant string
Parser configuration
The Reference field of the bank statement item and a pattern to match, for example {"pattern" : "A-Z-\\d{15}", "target-field" : "jpay1__reference__c"}
Search configuration
The custom field on the entry that holds the relevant string and, optionally, a case sensitivity setting, for example {"target-field" : "customerreference__c", "case-sensitive" : true}
If "case-sensitive" : true|false is not specified, JustOn Cash Management defaults to a case-insensitive comparison.

Fields of the data types Formula and Long Text Area cannot be used for matching.

Getting Default Matching Configurations

You can deploy the default matching configurations applying the relevant JustOn Configurator package. To do so:

  1. Log in your target Salesforce org.
  2. In the same browser session, open the JustOn Configurator.

    If the link does not work, copy the URL https://juston-configurator.herokuapp.com/.

  3. Click Salesforce OAuth2.

    This connects the JustOn Configurator with your current Salesforce session using your current credentials. Make sure that you are connected with the intended user and org.

    jo_configurator_session
    Verifying session settings

  4. Scroll down the list to find the package Payment Matching Configurations.

  5. Click Deploy.

    This deploys the ready-to-use matching configurations that cover typical comparison use cases:

    • statement number (invoice number, order number, etc.)
    • account number (customer number)
    • amount

    You can now proceed to adjust these matching configurations or create additional ones according to your requirements.

Defining Matching Configurations

To create or edit a matching configuration:

  1. Click to access the App Launcher, and select Setup Cash Management.
  2. Open the Matching Configurations tab.
  3. Click New to create a new record, or click and select Edit next to an existing record to modify it.
  4. Specify the details as necessary.

    pay_app_paymatch_config_new
    Creating a new matching configuration record

    The mandatory information includes

    • Name – the (unique) name of the matching configuration record
    • Template – the (predefined) search template
    • Priority – a value for the matching priority in ascending order (the lower the value, the higher the priority, 1 = highest priority)

    Additional information may include

    • Parser configuration – a JSON expression that defines an input string filter intended to match a certain number pattern
    • Search configuration – a JSON expression that defines a search customization, for example, to query a specific field or to apply a similarity comparison
  5. Click Save.

    This saves the specified information as required.

    Once a matching configuration is available and set Active, JustOn Cash Management automatically applies it on bank data retrieval.

Activating or Deactivating Matching Configurations

To activate or deactivate a matching configuration:

  1. Open the matching configuration record you want to activate or deactivate.

    1. Open the Matching Configurations tab.
    2. Click and select Edit next to the relevant record.
  2. Select (or deselect, respectively) the Active checkbox.

    pay_app_paymatch_config_active

  3. Click Save.

    If set Active, JustOn Cash Management automatically applies the matching configuration on bank data retrieval.

Example Input String Filters

This section lists some typical statement numbers as examples and corresponding input string filters. Input string filters are based on regular expressions.

Info

Salesforce-based software like JustOn Cash Management uses regular expressions the same way as Java does (see Using Patterns and Matchers in the Salesforce Help). For an overview of the regular expression syntax, you can therefore refer to the Pattern overview in the Java Documentation.

Note, however, that in the matching configuration records, input string filters are part of the parser configuration in JSON. This is why the backslash character required for some regex constructs (\d for digit characters, for example) must be escaped using another backslash, like \\d. So if you use tools like, for example, regex101 to define and test your regular expressions, make sure to add the additional backslash when copying them to the parser configuration.

Common constructs typically used to match statement numbers may include, for example

  • \\d{4} matches a four-digit number (exact number of occurrences)
  • \\D{1,6} matches a string of one to six letters (minimum-maximum number of case insensitive non-digit characters)
  • [ABCD] matches one of the given four (case sensitive) letters A, B, C or D
  • (JustOn|BERLIN) captures one of the two possible literal (exact, case sensitive) matches for JustOn or BERLIN

    ?> in front of the group disables backtracking, so that once a match is found, the other strings are not tested. This may be necessary to save calculation resources.

  • (?i) makes the following pattern match ignore the case (case insensitive modifier)

Statement Number Pattern Example Example Values Input String Filter
 Masked backslash
year + hyphen + 6-digit number 2022-000123 20\\d{2}-\\d{6}
year + hyphen + 5-digit customer number + hyphen + 6-digit statement number 2021-98765-000123 20\\d{2}-\\d{5}-\\d{6}
one of three 3-character business entity codes (PAR, BER, WAR, case insensitive) + year + 6-digit number PAR2009000123
BER2016000123
War2022000123
(?i)(?>PAR|BER|WAR)20\\d{2}\\d{6}
one of four 1-character statement type identifiers (I = invoice, C = credit, X = cancellation, D = dunning) + year + hyphen + 5-digit number I2019-00012
C2020-00012
X2021-00012
D2022-00123
[ICXD]20\\d{2}-\\d{5}
year + customer name (truncated to six characters, less possible, case insensitive) + 7-digit statement number 2022SALESF0001234
2022Salesf0001234
2022ACME0001234
20\\d{2}\\D{1,6}\\d{7}