Rule configuration

Everything you need to know about rules, and how to configure them.

Written By Matias

Last updated 10 days ago

The Synci rule engine enables advanced financial automation. While our introductory guide covers the basics of creating rules, this article dives deep into the configuration options that allow you to transform, calculate, and precisely control how your data flows between your bank and your destinations.


Rule components & logic

Every rule consists of Conditions (the "if") and Actions (the "then"). If a rule has no conditions, its actions are always executed when new transactions are synced in attached bank accounts or transfer links.

Conditions

Conditions define when a rule should trigger. Each condition consists of:

  • Field: The transaction property to check (e.g., amount, creditor.name).

  • Operator: The comparison logic (e.g., Contains, Greater than, Matches regex).

  • Value: The value to compare against. You can use static text and/or dynamic Liquid expressions.

Actions

Actions define what happens when conditions are met. Multiple actions can be added to a single rule, and they are executed in the order you define them. Each action consists of:

  • Action Type: The type of action to perform (e.g., Set Field, Set YNAB Field, Set Lunch Money Field).

  • Field: The transaction property to set.

  • Value: The value to set the field to. You can use static text and/or dynamic Liquid expressions.

Rule settings (trigger logic)

  • Trigger on any condition: If enabled, the rule triggers if at least one condition matches (OR logic). If disabled, all conditions must match (AND logic).

  • Skip other rules: If enabled and this rule triggers, Synci will stop processing any subsequent rules for that specific transaction. Use this to prioritize specific rules or create "catch-all" logic at the bottom of your list.


Liquid expressions

Synci uses the Liquid template language for dynamic values in rule conditions and actions. Liquid lets you reference transaction fields, apply filters to transform values, and chain multiple operations together.

Basic syntax

Use {{ }} to insert a dynamic value:

{{ transaction.creditor.name }}

This inserts the creditor name from the current transaction. All transaction fields are accessed through the transaction object.

Plain text (without {{ }}) is treated as a literal value β€” no special syntax needed for static values like 100, EUR, or Groceries.

Inserting variables

In the rule editor, type { to open the variable picker. Select a field from the dropdown to insert it as a chip, with optional modifiers. You can also type the full variable path manually if free-text is enabled.

We also provide a β€œInsert variable” button below the input field. Clicking this will open the same window as if you had typed {.

Commonly used fields

Field Description

transaction.amount

Transaction amount (positive for income, negative for expenses)

transaction.currency

ISO currency code (e.g., EUR, USD, NOK)

transaction.creditor.name

The name of the party receiving the payment

transaction.debtor.name

The name of the party sending the payment

transaction.remittance_information.unstructured

The "memo" or "description" from your bank

transaction.booking_date

The date the transaction was recorded by the bank

transaction.value_date

The date the transaction was settled

transaction.balance_after_transaction

Account balance after the transaction

Mapped fields

Synci provides mapped fields β€” pre-cleaned versions of your bank data:

FieldDescription

transaction.mapped.payee

A cleaned-up payee name automatically determined by Synci

transaction.mapped.description

A cleaned-up version of the bank's description

transaction.mapped.date

The most relevant date for the transaction

Other fields

For the full list of available fields, see the {{ }} variable picker in the rule editor. Additional fields include debtor/creditor details (IBAN, BIC, etc.), remittance information, currency exchange data, external identifiers, and enriched transaction data.


Modifiers / Filters

Modifiers transform a value. Add a modifier after a variable using the | (pipe) character:

{{ transaction.creditor.name | upcase }}

This takes the creditor name and converts it to uppercase.

Chaining filters

Filters can be chained left-to-right. Each filter receives the output of the previous one:

{{ transaction.remittance_information.unstructured | remove: "REF " | upcase | truncate: 50 }}

This removes "REF ", converts to uppercase, then truncates to 50 characters.

Limit: A maximum of 10 filters can be chained per expression.

Text filters

FilterExampleDescription

remove

{{ transaction.creditor.name | remove: "PURCHASE AT " }}

Remove all occurrences of a substring

replace

{{ transaction.memo | replace: "old", "new" }}

Replace all occurrences of a substring

upcase

{{ transaction.creditor.name | upcase }}

Convert to UPPERCASE

downcase

{{ transaction.creditor.name | downcase }}

Convert to lowercase

strip

{{ transaction.memo | strip }}

Remove leading and trailing whitespace

truncate

{{ transaction.memo | truncate: 50 }}

Truncate to a maximum number of characters

append

{{ transaction.memo | append: " (synced)" }}

Add text to the end

prepend

{{ transaction.memo | prepend: "Note: " }}

Add text to the beginning

Position-based text filters

These Synci-specific filters operate on character positions (1-based indexing):

FilterExampleDescription

remove_at

{{ transaction.memo | remove_at: 1, 5 }}

Remove characters from position 1 to 5

keep_at

{{ transaction.memo | keep_at: 6 }}

Keep everything from position 6 onward

remove_at details:

  • {{ value | remove_at: 5 }} β€” Removes everything from the 5th character to the end.

  • {{ value | remove_at: 1, 10 }} β€” Removes the first 10 characters.

  • {{ value | remove_at: 5, 5 }} β€” Removes only the 5th character.

keep_at details:

  • {{ value | keep_at: 5 }} β€” Keeps everything from the 5th character to the end (removes the first 4).

  • {{ value | keep_at: 1, 10 }} β€” Keeps only the first 10 characters.

  • {{ value | keep_at: 3, 8 }} β€” Keeps only characters 3 through 8.

Math filters

FilterExampleDescription

times

{{ transaction.amount | times: 1.21 }}

Multiply (e.g., add 21% tax)

plus

{{ transaction.amount | plus: 1.50 }}

Add a value

minus

{{ transaction.amount | minus: 5 }}

Subtract a value

divided_by

{{ transaction.amount | divided_by: 100 }}

Divide by a value

abs

{{ transaction.amount | abs }}

Absolute value

round

{{ transaction.amount | round: 2 }}

Round to N decimal places

Math filters can be chained:

{{ transaction.amount | times: 1.21 | plus: 1.50 }}

This adds 21% tax and then a flat processing fee.

Date filters

FilterExampleDescription

date_add

{{ transaction.booking_date | date_add: 7 }}

Add days to a date

date_add (negative)

{{ transaction.booking_date | date_add: -1 }}

Subtract days from a date

date

{{ now | date: "%Y-%m-%d" }}

Format a date

The now variable represents the current date and time:

{{ now | date: "%Y-%m-%d" }}           β†’ today's date
{{ now | date_add: -7, "%Y-%m-%d" }}   β†’ 7 days ago

Regex capture

Extract specific parts of a field using regular expressions. The regex_capture filter returns the first capture group (the part in parentheses):

FilterExampleDescription

regex_capture

{{ transaction.memo | regex_capture: '/Ref: (\d+)/' }}

Extract a regex match

Example: If the memo is "Invoice Ref: 9982", the result is "9982".

You can optionally specify which capture group to extract:

{{ transaction.memo | regex_capture: '/(\w+): (\d+)/', 2 }}

If you're unfamiliar with regular expressions, we recommend using a regex helper like RegExr or Olaf Neumann's Regex Generator.

Other useful filters

FilterExampleDescription

default

{{ transaction.memo | default: "No memo" }}

Use a fallback if the value is empty

size

{{ transaction.memo | size }}

Get the length of a string

split

{{ transaction.memo | split: "," }}

Split a string into an array

first / last

{{ transaction.memo | split: " " | first }}

Get the first/last element of an array

For the full list of standard Liquid filters, see the Liquid documentation.


Action types

Set Field

Sets a bank transaction field. This persists the change in Synci β€” useful for cleaning up transaction data before it's transferred.

Set YNAB Field

Sets a YNAB transaction field during transfer. Available fields: memo, payee_name, amount, date, cleared, approved, category_id, flag_color.

Set Lunch Money Field

Sets a Lunch Money transaction field during transfer. Available fields: amount, date, category_id, payee, currency, notes, tags.

Stop Transfer

Completely prevents the transaction from being transferred to its destination. This action takes no value.

Use case: Filtering out internal transfers or specific types of automated transactions you don't wish to track.


Testing rules

You can test a rule before saving it using the Preview/Test feature. This dry-runs the rule against real or sample transactions so you can verify that your conditions match and your actions produce the expected result.

Preview shows you:

  • Whether the conditions matched the test transaction.

  • A before/after comparison of every field that was changed.

  • Any errors in your Liquid expressions.

Preview runs the exact same logic as production, so what you see is what you'll get.


Attaching, detaching, and reordering rules

Attaching rules to bank accounts or transfer links

Click the green "Attach" button to attach the rule to a bank account or transfer link. A dialog will appear, letting you select which entity you want to attach the rule to. In the next step, you can configure the rule execution order.

Detaching rules

Click the "More" button at the top of the page, then "Detach" to detach the rule from a bank account or transfer link. A dialog will appear, letting you select which entity you want to detach the rule from.

Reordering rules

Click the "More" button at the top of the page, then "Reorder" to reorder the rule execution for a given bank account or transfer link. A dialog will appear, letting you select which entity you want to reorder the rule within. Once an entity is selected, you will see all the rules that are attached to the entity, and can drag and drop the rules into your preferred execution order.


Configuration example: Multi-step cleanup

You can combine multiple techniques in a single rule:

  1. Condition: remittance_information.unstructured Starts with CHECKING_TRANSFER:

  2. Action 1: Set Field β†’ remittance_information.unstructured β†’ {{ transaction.remittance_information.unstructured | remove: "CHECKING_TRANSFER: " }}

  3. Action 2: Set YNAB Field β†’ memo β†’ Internal Transfer: {{ transaction.remittance_information.unstructured }}

What happens: When a transaction's memo starts with "CHECKING_TRANSFER:", Action 1 strips that prefix from the bank transaction, then Action 2 sets the YNAB memo to "Internal Transfer:" followed by the cleaned memo.


Pro tips

  • 1-Based Indexing: Position-based filters (remove_at, keep_at) start counting at 1, not 0.

  • Regex Delimiters: Always wrap regex patterns in delimiters (e.g., /pattern/).

  • Order Matters: Rules are processed from top to bottom. Drag and drop to reorder.

  • Chain Wisely: You can chain up to 10 filters per expression. Each filter receives the result of the previous one.

  • Preview First: Use the Preview feature to test your rules against real transactions before enabling them.

  • Unknown Filters: The engine uses strict mode β€” only recognized filters are allowed. If you use an unknown filter name, you'll get a clear error message.

  • Plain Text is Fine: You don't need Liquid syntax for simple static values. Just type EUR or Groceries directly.