Rule conditions

The Rule conditions are criteria that define when a completion Rule must be applied to an imported bank transaction.

You can set the conditions when creating or editing a Rule in the Add/Edit rule dialog, accessible from the Apply rules dialog, or directly in the Recurring transactions table.

The conditions can refer to the Description, Account, Amount and Date.

A Rule is applied only if all the specified conditions are met. If even one condition is not met, the Rule is not applied. Conditions left empty are ignored.

Regole sul campo Importo nel dialogo Applica regole

Description condition

The Description condition allows you to identify bank transactions based on the text in the bank statement description.

Enter a word or a short phrase that identifies the transactions to be automated, such as the name of a supplier, a service or a contract number.

Banana Accounting compares the text specified in the Rule with the description of the imported bank transactions. When a match is found and all the other specified conditions are met, the Rule is applied.

For better results, it is advisable to use only the keywords needed to identify the transaction, avoiding information that may vary in the bank transaction descriptions.

Search methods in the Description

You can use different search methods:

  • Search by word or phrase: the program searches for the specified word or sequence of words in the same order.
    • Best Insurance 892-948 – Identifies transactions containing this sequence of words and numbers.
    • Insurance – Identifies transactions containing the word "Insurance".
  • Search by independent words (+): enter the + symbol only once before the first word. For example, +Best Insurance 892-948. The Rule searches for all the specified words and number sequences, even if they appear in a different order or are separated by other words. The + symbol is not considered part of the search text.

    Important: when the bank transaction description contains contract, policy or customer numbers, or other specific references, it is advisable to use the + symbol. This allows the Rule to identify the transaction even if the order of the information in the description changes.

  • Search by alternative words (|): use the | symbol to separate alternative words. For example, coffee|restaurant. The Rule identifies transactions containing at least one of the specified words.
  • Uppercase and lowercase: the search is not case-sensitive. For example, a Rule that searches for Insurance also identifies INSURANCE and insurance.

The text used as a condition is stored in the Description column of the Recurring transactions table.

Warning: avoid using the entire original description from the bank statement. It may contain dates, reference numbers or identifiers specific to a single transaction, preventing the Rule from identifying similar transactions in subsequent imports.

Account condition

The Account condition allows you to limit the application of the Rule to transactions imported from a specific bank, postal or credit card account.

  • Account specified: the Rule identifies only transactions from the specified account, provided that the other conditions are also met.
  • Account left empty: the Rule can be applied to transactions from different bank accounts, provided that all the other specified conditions are met.
    Banana Accounting uses the bank account and the transaction type to correctly complete the transaction in Debit or Credit.

This option is useful, for example, when you want to use the same Rule to identify payments to a supplier made from different bank accounts.

Amount condition (or Amount in currency)

The Amount condition allows you to apply a Rule only to bank transactions with a specific amount or within a specified range of amounts.

This is useful, for example, when you want to assign different contra accounts to transactions from the same supplier based on the amount.

The feature for defining ranges of amounts is available starting from version 10.2.3 of Banana Accounting Plus (Dev Channel).

How to set an Amount condition

The condition must:

  • Start with the ! symbol.
  • Be enclosed in square brackets [ ].
  • Use unformatted amounts, without thousands separators and with a period as the decimal separator.
  • Use the supported comparison operators: =, >, <, >=, <=, <>.

For example, to identify transactions with an amount greater than or equal to CHF 1'000.00, enter:

[!>=1000.00]

Regole sul campo Importo nel dialogo Applica regole

In the image, the Rule identifies transactions with the description "Purchase of office supplies" and an amount greater than or equal to CHF 1'000.00, assigning the contra account to account 1510 Furniture and fixtures.

This condition allows you to distinguish between transactions with similar descriptions but different amounts.

Examples of conditions applicable to the Amount column

SyntaxMeaning
[!=1000.00]transactions with an exact amount of CHF 1'000.00
[!>1000.00]transactions with an amount greater than CHF 1'000.00
[!>=1000.00]transactions with an amount greater than or equal to CHF 1'000.00
[!<1000.00]transactions with an amount less than CHF 1'000.00
[!<=1000.00]transactions with an amount less than or equal to CHF 1'000.00
[!>=1000.00 !<=2000.00]transactions with amounts between CHF 1'000 and CHF 2'000
[! |!100.00 |!<150.00]transactions with an exact amount of CHF 100.00 or CHF 150.00

Date condition

  • The Date condition allows you to apply a Rule only to bank transactions with a specific date or within a specified period.

  • This is useful when you want to apply different accounting criteria based on the month, quarter or year, for example when VAT rates or accounting procedures change.
  • This feature is available starting from version 10.2.3 of Banana Accounting Plus (Dev Channel).
  • How to set a Date condition

  • Open the Add/Edit rule dialog.
  • Select the Date field.
  • Enter the condition in the Comment field.
  • The condition must:
  • Start with the ! symbol.
  • Be enclosed in square brackets [ ].
  • Use the date in ISO format YYYY-MM-DD.
  • For example, to identify transactions dated before April 1, 2025, enter:
  • [!<2025-04-01]
    Regole sul campo Data nel dialogo Applica regole

In the image, the Rule is applied to transactions dated before April 1, 2025.

The Date condition allows you to distinguish between transactions by month, quarter or year, for example when a VAT Code must be used until a specific date and replaced by another code in subsequent transactions.

Examples of conditions applicable to the Date column

SyntaxMeaning
[!=2025-03-31]transactions dated  31.03.2025
[!>2025-03-31]transactions dated after 31.03.2025
[!>=2025-03-31]transactions dated on or after 31.03.2025
[!<2025-03-31]transactions dated before 31.03.2025
[!<=2025-03-31]transactions dated on or before 31.03.2025
[!>=2025-03-31 !<=2025-06-30]transactions within the date range from 31.03.2025 to 30.06.2025
[! |!2025-03-15 |!<2025-03-18]transactions dated 15.03.2025 or 18.03.2025

 

How to define conditions in the Recurring transactions table

You can enter and edit conditions directly in the Recurring transactions table, using the same syntax described in the previous sections.

The conditions are entered in the Rule columns, such as Description, Debit Account, Credit Account, Amount and Date.

When all the specified conditions match the data of the imported bank transaction, the Rule can be applied to complete the transaction.

Regole di automazione nelle tabella Registrazioni ricorrenti

Rule weight and conflict resolution

The weight of a Rule determines which Rule takes priority when multiple Rules identify the same bank transaction.

The weight depends on the number of specified conditions: the greater the number of conditions, the greater the weight of the Rule.

When multiple Rules can be applied to the same transaction, Banana Accounting selects the one with the highest weight, considering it more specific.

This allows you to use general Rules and more detailed Rules at the same time, letting the program automatically apply the one with the highest priority.

DateDocDescriptionDebit A/CCredit A/C
 !RuleCredit 1100 Accounts receivable
 !RuleCredit Fratelli Bernasconi10301150 Customer Bernasconi

Suppose you import a transaction with the description "Credit Fratelli Bernasconi" into bank account 1030.

Both Rules identify the transaction:

  • First Rule: identifies the word "Credit" and contains a general contra account.
  • Second Rule: identifies the description "Credit Fratelli Bernasconi" and contains an additional condition on Debit Account 1030.

The second Rule has a higher weight because it contains an additional condition on the Debit Account and is therefore applied with priority.

The transaction is completed with the contra account 1150 Customer Bernasconi, instead of the general contra account 1100 Accounts receivable.

This allows you to define general Rules for common transactions and specific Rules for particular transactions, letting Banana Accounting automatically select the one with the highest priority.