Skip to content

Configuring Payment Matching

JustOn Cash Management can relate payment transactions with entries based on matching data like the customer number or statement number – as passed with the reference text – or the amount. Depending on the data quality, this either directly connects payments with entries or produces a list of probable matches to be reviewed and completed by users.

Preconditions

The payment matching procedure 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. Typical information may be the statement number (invoice number, order number, etc.) or the customer number.

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.

Functional Overview

The payment matching procedure is automatically executed on bank statement retrieval. This procedure covers two approaches:

Matching via end-to-end ID
When initiating payment transactions via a connected bank account, JustOn Cash Management generates a unique ID – the end-to-end ID. This ID is saved both to the produced SEPA XML, which is transferred to the bank, and to the payment record as associated to the original entry. Since bank systems keep this ID when processing the payment, it will also be part of the bank statement item information. Thanks to the unique ID, JustOn Cash Management can easily relate the executed money transfer (the bank statement item) with the original receivable/payable (the entry).
Generally, payment matching using the unique ID is the safest – and therefore, preferred – way to settle entries with payments.
Matching by data comparison
If there is no unique ID, JustOn Cash Management proceeds to relate payments with entries based on matching data like the customer number or statement number – as passed with the reference text – or the amount.
The statements on which the entries are based, usually 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. This reference is also part of the bank statement item, so JustOn Cash Management can relate the matching strings.
With respect to data comparison, providing the statement number in the payment reference produces the best results and is therefore preferred to other data.

Should the automatic matching yield no immediate results, JustOn Cash Management produces a list of probable matches to be reviewed and completed by users.

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

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 Reference field of the bank statement item and a statement number pattern to match, for example {"pattern" : "INV-\\d{5}", "target-field" : "prefix__reference__c"}
Account by account number reference

Find the account by extracting the account number from the reference

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 Reference field of the bank statement item and an account number pattern to match, for example {"pattern" : "ACC-REF-\\d{5}", "target-field" : "prefix__reference__c"}
Search configuration
The account field that holds the account number, for example {"target-field" : "accountnumber"}
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.10}, for example, will allow a 10% amount difference.
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 account field that holds the IBAN, for example {"related-table" : "account", "related-field" : "accountiban__c", "related-table-account-id-field" : "id"}
Account by contract number reference

Find the account by extracting the statement number (like a contract number) from the reference and matching it to a user-defined field on a custom object

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
  • Account, where the matching target is a user-defined field that holds the contract number
  • Custom object that represents contracts, where the matching target is a user-defined field that holds the contract number
Parser configuration
The Reference field of the bank statement item and a statement number pattern to match, for example {"pattern" : "CONTR-\\d{5}", "target-field" : "prefix__reference__c"}
Search configuration
  • The account field that holds the statement number, for example {"related-table" : "account", "related-field" : "contractnumber__c"}
  • The custom object and field that hold the statement number (like the contract number), for example {"related-table" : "prefix__contract__c", "related-field" : "prefix__contractnumber__c", "related-table-account-id-field" : "prefix__accountid__c"}
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.

Getting Default Matching Configurations

You can deploy the default matching configurations using the JustOn Configurator. 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. Deploy the relevant JustOn Configurator package.

    alt text
    Deploying 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 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
  • (?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}