Skip to content

An auto-rule fills a transaction by a condition: “If expense and description contains ‘pyaterochka’, then category ‘Groceries’”. Rules work on statement lines during import, on transactions you enter by hand and, on your command, on recorded transactions too.

Where to find the rules

In personal and business workspaces, open Settings → Automation → Auto-rules. The “Rules” tab of the import section leads to the same screen.

Each rule in the list shows its number, name and a wording in plain words. Above the list you can narrow the rules by condition field, category, account and status. A viewer sees the list but cannot change it.

How to create a rule

  1. Click “Add rule”. From a register transaction or statement row, choose “Create auto-rule” to start with conditions and actions from that source. You can edit or remove each row.
  2. In “If”, click “Add condition”, choose a field, then enter its operator and values. A description can match several texts.
  3. Open the underlined phrase in the “If” heading to choose whether all conditions or at least one must match.
  4. In “Then”, click “Add action” to set a category, counterparty, project, tags or, in a business workspace, an accrual date. Click again to add another assignment. Switching to split, transfer or skip replaces the actions and keeps the conditions.
  5. Click “View matching operations” to see the matches from the last 90 days before saving. Close the list to return to the draft. A saved rule with unchanged conditions can also open the register.
  6. To fill fields or split recorded transactions, select “Apply to existing operations” and save the rule. Review the before-and-after values, select transactions and confirm. Closing this list keeps the rule and leaves recorded transactions as they were.

If in “All conditions” mode two conditions on the same field share no value, such as “account is any of [Card]” and “account is any of [Cash]”, the rule never fires. The form warns about it and offers to switch the rule to “Any condition” or to merge the values into one condition.

A split by shares

The “Split and fill” type divides one transaction into several allocation lines. Use it to spread shared costs over projects or dividends by the shares of the partners.

  1. Choose the “Split and fill” type. The form shows two lines.
  2. On every line set a share in percent, a category and, if needed, a project. A share is a number above zero with at most two decimal places. A rule has 2 to 10 lines; “Add a line” adds one.
  3. The shares must add up to exactly 100 %. Their sum is shown under the lines, and the rule is not saved until it is 100 %.

Every line but the last gets its share of the amount rounded down to the cent. The last line gets the rest, so the lines always add up to the amount exactly. For example, 999.99 split 33.33 %, 33.33 % and 33.34 % gives 333.29, 333.29 and 333.41.

When the amount is so small that a line would be zero (for example, 0.01 split in half), the rule does not apply. The statement line shows “Rule ‘…’ not applied: the amount is too small to split”, and the other rules work as usual.

A split does not touch a line whose category you chose yourself or that came from a file column. Such a line shows “Split ‘…’ not applied: the category is set explicitly”. The counterparty and tags of a split transaction come from “Fill in fields” rules.

Accrual date

In a business workspace a rule can set the accrual date: the operation day, the last day of the previous month, or the first or last day of the current or next month. For example, the rule “description contains ‘salary’” with the category “Payroll” and the date “Last day of the previous month” puts the salary paid on 5 March on 28 February. The profit and loss report on the accrual basis shows that expense in February.

The accrual date is set on a “Fill in fields” rule or on a single line of a split. A split line without its own date takes the one of the “Fill in fields” rules. “Operation day” clears a date set earlier: the line accrues on the day of the transaction. A rule does not change an accrual date you set yourself. A personal workspace has no accruals and no such field.

A transfer between own accounts and an excluded line

The “Turn into a transfer” type is for a deposit top-up, a credit card repayment or a transfer between your own bank accounts. Choose the transfer account, for example “Deposit”. A matching expense of the card statement becomes a transfer from the card to the deposit, a matching income becomes a transfer from the deposit to the card. A transfer gets no category, counterparty, project or tags. The transfer account must be open and visible to every member: an account with “Selected members” access cannot be chosen.

When the transfer account is in another currency, the line gets the error “The transfer account is in another currency”. The batch cannot be applied until you choose another account or another decision for the line. The rule does not act on the statement of the deposit itself: when you upload the deposit statement, its “Deposit top-up” line finds the transfer already made among the possible matches. Link it, and no second transfer appears, so each balance changes once. Upload the deposit statement after the card statement is applied: until the transfer exists, the line cannot find it and stays an income.

The “Do not import” type excludes a matching line, such as a cashback return or a cancelled payment. The line stays in the preview with the decision “Exclude” and the mark of the rule. You can include it in the line form, and then the mark goes.

A rule of these two types must check something besides the account, otherwise it would hit the whole statement of the account. In “All conditions” mode add a condition on another field; in “Any condition” mode do not use the “Account” condition.

Deposits: a transfer by the account number

A bank often opens each new deposit on its own account, such as 42101810…01 and then 42101810…02. To keep placing and returning a deposit out of expenses and income, create an account of the “Deposit” type and one rule:

  1. Type — “Turn into a transfer”, transfer account — “Deposit”.
  2. The condition “Other party account” starts with 421. These are the first digits of the deposit account numbers of your bank, visible in the 1C statement. You can list several beginnings, such as 421 and 422.
  3. If you have several banks, add the condition “Account any of” with the current account of this bank. Then the rule leaves the statements of other banks alone.

Now a payment to any 421… account becomes a transfer to “Deposit”, and a receipt from such an account a transfer from “Deposit”. You do not need to know the number of a new deposit in advance. The balances of the current account and of “Deposit” change, income and expenses do not.

Interest stays income with its own category when the bank pays it from another account, such as 47426…. If interest comes from the deposit account itself, add the condition “Description does not contain ‘interest’” to the rule, so an “Interest payment” line does not match it.

Conditions on statement data

Four conditions are marked “import only”: only statement lines carry their data.

  • “INN from the statement” — the counterparty INN of a 1C statement, “equals” one of the listed values.
  • “Bank category” — the category the bank gave a card purchase in the statement, for example “Supermarkets”. Case and the letter “ё” are ignored.
  • “MCC” — the merchant category code of a card statement: “equals” one of the codes, such as 5411, 5499, or “from and to”, such as from 5811 to 5814.
  • “Other party account” — the account number of the payee of a payment and of the payer of a receipt in a 1C statement: “starts with” one of the listed beginnings. A beginning has 3 to 20 digits; a whole number fits too.

The bank category and the MCC come only from personal card statements, so a business workspace form does not offer them. The form preview checks these conditions against the statement line the transaction was created from. Transactions entered by hand have no statement data, so such conditions never hold for them. The form reminds you of it.

The counterparty of a statement line

Rules also work on lines whose counterparty is already found. In a 1C statement the counterparty is found by its INN. When a line has no INN, as in a card statement, the counterparty is looked up by its “Statement names”.

“Statement names” are set in the counterparty card (the payee in a personal workspace). They are how the bank writes it in a statement, for example “PYATEROCHKA”. You can set up to 10 names of 3 to 100 characters. A statement line without an INN whose description holds such a name gets this counterparty. When a name fits two counterparties, the line stays without one: choose it by hand.

The category of a line comes in this order:

  1. the category from a file column;
  2. the category of a rule;
  3. the default category of the counterparty;
  4. the default category of the batch.

A rule changes the found counterparty only when it sets a counterparty itself. The “counterparty” condition sees the counterparty found by INN or by name.

Counterparty groups

To cover many counterparties with one rule, put them in a group: “Employees”, “Suppliers”, “Landlords”. Groups live in the “Counterparty groups” directory (“Payee groups” in a personal workspace). A counterparty belongs to one group at most, chosen in the “Group” field of its card. The list of counterparties has a “Group” column and a filter by it; “No group” shows the ones not sorted yet.

The “Counterparty group” condition tests the group of the line counterparty: “any of” the listed groups or “none of” them. For example, “counterparty group any of Employees” with the category “Payroll” files the payments to every employee, new ones included as soon as they join the group. The condition sees the counterparty found by INN or by name, and the counterparty of a transaction. It does not see a counterparty set by another rule. A line without a counterparty and a counterparty without a group have no group, so “none of” holds for them.

A group can be archived even with counterparties in it: they stay in the group and the rule keeps working. A group that has counterparties or that a rule refers to cannot be deleted.

A rule from a transaction or a statement line

In the register open the “⋯” menu of a transaction and choose “Create auto-rule”. The same button is in the correction form of a transaction and on a line of the import preview. The form opens filled in: the conditions “description contains” and “account”, the actions are the category and counterparty of the source. Remove what you do not need before saving.

A new rule does not change a batch that is already loaded. To apply it, click “Rebuild preview”.

Suggestions: when the service offers a rule itself

After you change the category of a transaction or of a statement line by hand, a “Create an auto-rule?” hint may appear at the bottom of the screen. It appears only when no rule sets that category on its own. “Create rule” opens the same filled-in form as “Create auto-rule”, already with the new category. Closing the hint creates nothing.

After a batch is applied, a “Suggested auto-rules” block appears under its totals:

  • in a business workspace it lists the pairs “counterparty → category” met at least twice in the batch and in the transactions of the last year that no rule files yet. If a counterparty has different categories, the most frequent one is offered. The category the counterparty already has by default is not offered;
  • in a personal workspace it lists the bank categories of the statement with the number of transactions in each. Pick your own category for each one; when one category is set more often than the others, it is already chosen.

Nothing is ticked at first. Tick the lines you need and click “Create rules (N)”: only the ticked rules are created, in one action. Hints and suggestions count only transactions on accounts you can see.

Turn the hints off with “Don’t suggest again” or with the “Suggest auto-rules” switch on the Auto-rules screen, where you can turn them on again. The setting is kept in this browser.

Order, pause and copy

Every matching rule applies to a line. One may set the counterparty, another the project. When two rules set the same field, the one higher in the list wins, and tags add up. Change the order with “Move up” and “Move down” in the «⋯» menu at the end of the rule row.

“Split and fill”, “Turn into a transfer” and “Do not import” rules set the kind of a line. Only one of them acts, the highest in the list. With a transfer or an exclusion, “Fill in fields” rules set nothing on the line, even when they stand higher. With a split, the category and project come from its lines, and the counterparty, tags and accrual date from “Fill in fields” rules. A split that does not apply gives way to the next rule of a line kind.

To keep a general “yandex” rule off a “Yandex Plus” subscription, give it the condition “description does not contain ‘plus’”.

Click a rule row to edit the rule. The other actions sit in the «⋯» menu. “Pause” turns a rule off without deleting it. “Resume” puts it back in its place. “Copy” opens a form with the same conditions and actions. A saved copy goes last.

A transaction entered by hand

The transaction form does not pick a category itself, in the simple or the full mode. When you leave the category empty, the server checks the rules and then the counterparty’s default category when you save. A rule fills only empty fields: the category, the project and the counterparty. It does not change what you chose, and its tags are added to yours.

Before you save, the form shows under the category what will be filled: “Will be filled by rule ‘Groceries’: category” or “Default category of the counterparty ‘Groceries’”. The hint updates when you change the amount, the description, the account or the counterparty.

  • To keep a rule off this transaction, press “Do not apply” next to it. “Apply” brings it back.
  • If a reference of the rule is archived, the hint says so, for example “Rule ‘Groceries’: category archived”. The rule does not fill that field.
  • If neither a rule nor the counterparty supplies a category, save the single-line payment and categorize it later in the categorization queue. The payment is saved the same way if you turn off the only rule that suggested a category or split and the counterparty has no default category.
  • If the transaction is split into several lines, rules do not change the categories, projects and accrual dates of the lines and do not split it.
  • A “Split and fill” rule acts when no category is chosen. The hint shows “Will be filled by rule ‘…’: split into 2 lines”, and the saved transaction gets the lines of the rule. A project and an accrual date you chose pass to every line.

“Turn into a transfer” and “Do not import” rules do not apply to manual entry, and no rule applies to a transfer. A transaction a rule filled gets the “By rule” mark.

Through the API and MCP rules do not apply by default. To apply them, pass the applyAutoRules flag.

Apply a rule to recorded transactions

A new rule does not touch transactions that are already recorded. To sort the history with it, click “Apply to operations” on a “Fill in fields” or “Split and fill” rule. Editors and owners have the button.

The window lists the transactions of the period that the rule will change. By default it is the last 90 days; you can change the period, up to a year. Every row shows what changes: “Category: Other → Taxi”, new tags as “+ Trips”. Transactions that already have what the rule sets are not listed.

  1. Uncheck the transactions you want to keep as they are.
  2. Click “Apply to selected”.

The rule sets only its own fields. The other fields, the amount, the rate, accounts and the transaction date stay, and the tags of the rule are added to the existing ones. A split replaces the only line of a transaction with the lines of the rule: the amount and the account balance stay the same. The window shows the new lines with their amounts, and for an accrual date “Accrual: before → after”. Every transaction gets a correction with the reason “Auto-rule “name””, a history entry and the “By rule” mark. Other rules are not applied.

One page, up to 100 transactions, is applied at a time. When the list is longer, the next part opens after the application. If someone changed the rule or a transaction while the window was open, nothing changes: the window shows an error and reloads the list.

Some transactions in the list cannot be checked; the row says why:

  • a category, project, counterparty or tag of the rule is archived;
  • the rule sets a category, project, accrual date or split, and the transaction is split into several lines;
  • the rule splits the transaction, and its line pays an accrual;
  • the amount is too small to split;
  • the rule sets a counterparty, and a line of the transaction pays an accrual of another counterparty;
  • the transaction would get more than 100 tags.

Transfers are not listed. “Turn into a transfer” and “Do not import” rules do not apply to recorded transactions. The “INN from the statement”, “Bank category”, “MCC” and “Other party account” conditions are checked against the statement line the transaction was created from; manually entered transactions do not have them. The form preview and the register opened by “Open in the register” check these conditions the same way. The number in the preview may be larger than the application list: transactions the rule would not change are not listed.

The “By rule” mark

A transaction created by import or by hand with rules, or corrected by applying a rule, remembers them. In the register its category shows the “By rule” badge. The badge tooltip names the rules, and a click opens the auto-rules screen at the last one. The history of the transaction shows “Filled by auto-rules” at the creation event.

If you change the category, project, counterparty or tags by hand, the mark is removed and the history shows “Auto-rule mark removed”. Editing the description, amount or date keeps the mark. The register filter “Filled by a rule” finds the transactions that rules filled.

A rule that refers to an account hidden from you is not visible to you. In the mark of a transaction it is called “Auto-rule (unavailable)”.

When an expense is assigned directly to a business direction, the preview explains why a project assignment or another split is unavailable. Clear the direction explicitly before applying that rule. A category or tag change preserves the direction.