With coding rules, Clara automatically fills in the accounting fields (cost center, GL account, project and more) of every new card transaction. You set up the logic once, and Clara applies it as soon as each expense comes in.
Your team stops classifying field by field, data arrives complete even when someone forgets to fill it in, and month-end close is faster and more reliable.
Types of rules
There are two types of rules: basic rules, which assign values to a single field, and advanced rules, which combine several conditions and can fill in several fields at once.
Basic rules (mapping)
- You choose an input: User group, User location or Category.
- You choose the accounting field to fill in and match each value.
- They fill in one field per rule.
- Example: Finances group → Cost center Finanzas y Tesorería.
- Available on all plans.
Advanced rules (conditional)
- You combine one or more conditions joined with AND.
- You can use User location, Category, User, Tags, Merchant, Amount, Creation date or Description.
- They fill in one or more fields per rule.
- Example: if the location is Bogotá, CO and the group is WEBSEC2 → GL account 5305 – Ciberseguridad and Project Auditoría Anual 2026.
- Available on the Pro and Enterprise plans.
Availability and permissions
- Free plan: basic rules by Category, User group or User location.
- Pro and Enterprise plans: basic and advanced rules, including combinations of several conditions.
Only users with the Admin or Bookkeeper role can create, edit and deactivate rules.
How to create a basic rule
- Go to Accounting fields and open the Coding rules tab.
- Click New rule and choose a basic rule.
- Enter a name for the rule, for example "Automatic cost center".
- In the first selector, choose the input: User group, User location or Category.
- In the selector on the right, choose the accounting field you want to fill in, for example Cost center.
- In each row, choose an input value and its matching value. For example: Finances → Finanzas y Tesorería.
- Click Add row to map more values. To remove a row, click the trash icon.
- Check the summary in the How the rule works panel and click Save changes.
How to create an advanced rule
- In the Coding rules tab, click New rule and choose an advanced rule.
- Enter a name for the rule, for example "Annual audit".
- Under If the following conditions are met, choose the input, the operator (for example Equals) and the value (for example Bogotá, CO).
- Click Add condition to add another condition joined with AND, for example User group equals WEBSEC2.
- Under Then, complete the following fields, choose the accounting field and its value. For example: GL account → 5305 – Ciberseguridad.
- Click Add field to fill in more fields with the same rule, for example Project → Auditoría Anual 2026.
- Check the summary in the How the rule works panel and click Save changes.
The order in which rules are applied
Clara evaluates advanced rules first and basic rules second, each group in the order it appears on the list.
- A new card transaction comes in.
- Clara checks the advanced rules, from first to last.
- Then it checks the basic rules, from first to last.
- Once a rule fills in a field, that field no longer changes, even if a later rule also matches.
- If no rule matches, the field stays empty so you can fill it in manually.
On the rules list, the number next to each rule shows its priority.
How to tell which fields Clara filled in
- Notice in Transactions: if your company has at least one active rule, you'll see a purple banner on the transactions table.
- Clara Intelligence animation: the first two times you open a transaction with auto-filled fields, you'll see a purple animation and a message explaining why each field was filled in.
- Activity log: each transaction keeps an entry with all the fields the rule filled in, for example: "Auto-populated accounting fields: Cost center X, GL account Y, Project Z".
How to edit, pause and reorder rules
- Edit: click the rule, change what you need and click Save changes.
- Pause or reactivate: use the rule's toggle. A paused rule stops applying to new transactions.
- Change the priority: drag the rule by the dots icon or use the arrows to move it up or down within its group.
- Search: type the name in Search by rule.
Frequently asked questions
Do rules apply to past transactions?
No. Rules only apply to new card transactions.
Can I change a field that Clara filled in?
Yes. Any user who can edit the transaction can change the value. Your edit always wins: the rule won't change that field again.
Can a rule overwrite a value I chose manually?
No. A value chosen manually always takes precedence over any rule.
What happens if two rules apply to the same field?
The one with the higher priority applies. Advanced rules are evaluated before basic rules and, within each group, the list order decides. Once a rule fills in the field, that field no longer changes.
What happens if no rule matches?
The field stays empty and is filled in manually, as usual.
When does a transaction move to review on its own?
When rules fill in all the required accounting fields.
Why can't I create advanced rules?
Advanced rules are available on the Pro and Enterprise plans. If you're on the Free plan, talk to your Clara account executive about your options.
Comments
Please sign in to leave a comment.