When to use keyword rules
Keyword rules are designed for line items that exact-match automation cannot remember. Datamolino normally learns line item coding from the full description - so the next time it sees the exact same description, the same coding is applied. That works well when descriptions repeat. It does not work when the description is slightly different on every invoice.
Typical examples where exact-match learning will not repeat:
A description that contains a date (for example "Office rent - March 2026").
A description that contains an invoice number or reference (for example "Shipping fee #INV-7714").
A description that contains a variable identifier the supplier appends to every line.
In all three cases, the meaningful part of the description ("Office rent", "Shipping fee") is consistent, but the rest changes. Keyword rules let you match on the part that stays the same and apply coding to those exceptions.
For background on how exact-match line item learning works and where it stops, see Automate line items.
Access keyword rules through Automation
Keyword rules sit inside a contact's automation settings.
Open the contact (supplier)
Go to its automation settings
Click the Line Item Automation tab
Switch to Keyword Rules
Add a new rule
The Line Item Automation tab gives you two options - Bill Split Rules and Keyword Rules - and only one can be active at a time. Choose Keyword Rules to set up keyword-based coding for that contact.
π Why can I only pick one - Bill Split or Keyword Rules?
The two automations target the same line item data, so a contact uses one approach at a time. Use Bill Split when one document needs to be split into fixed parts every time. Use Keyword Rules when you want to code individual line items based on what their descriptions contains.
π Do I need to be paired with an accounting contact first?
For contact-level rules, yes. If you don't see the automation button, make sure the document is paired to a Xero or QuickBooks contact first. Once it is, the option will appear. Folder-level rules (covered further down) can exist without a contact match.
Specify the keyword, conditions, and coding
Each rule has three parts: the keyword to look for, the matching condition, and the coding to apply when the rule fires.
Enter the keyword you want Datamolino to detect in line item descriptions. It can be anything that appears on the invoice - for example "shipping", "lease", or "office supplies".
Choose how the keyword should be matched. The available operators are:
Begins with - the description must begin with the keyword. For example, some suppliers (common in Australia) prefix taxable line items with
*. Because*appears at the start of the description, you can set up a Begins with rule with*as the keyword to automatically apply the correct tax code to those items.Ends with - the description must end with the keyword.
Contains - the keyword can appear anywhere in the description. This is the most common choice when the description varies.
You can add multiple conditions to a single rule and choose how they're evaluated - either All conditions must be met or At least one condition must be met. This means one rule can cover several keyword variations at once. For example, use At least one condition must be met with keywords shipping, freight, and carriage to code all three to the same account with a single rule.
Then set the coding to apply when the rule matches - ledger account, tax code, and tracking categories (Xero) or class, location, and product/service (QuickBooks), depending on the integration.
π Can I set up more than one rule?
Yes. You can add as many rules as you need, each with a different keyword and coding. Rules are independent of each other, so each one is checked separately against the line item descriptions.
π Which coding fields can a rule apply?
The available fields depend on the folder's accounting software. Xero folders can code ledger account, tax code, and tracking categories. QuickBooks folders can code account, tax, class, location, and product/service. FreeAgent shows its own field sets. Fields that are not relevant to your integration do not appear in the rule form.
π Is supplier level keyword automation available for offline folders?
Supplier-level keyword rules aren't available for offline folders, but folder-level keyword rules are - see the Folder rules section below.
Review and test your rules
After saving a rule, test it before it runs on live documents. In the Automation panel, enter a description you want to test and click Test rules. Datamolino will show whether the keyword matched and what coding would be applied. Once you're happy the rule is working as expected, open a real invoice with a matching line item and confirm the coding was applied correctly.
Create folder-level rules for all contacts
A rule you create for one supplier can be converted into a folder rule, meaning it will be used across all invoices in that folder. Datamolino will search for the keyword across documents from every contact in the folder and apply the rule when it matches.
π Where can I manage folder level keyword rules?
To review the rules at folder level, open the folder menu and go to Line Items Rules. This is where folder-wide keyword rules are managed.
π When should I use a folder rule instead of a contact rule?
Use a folder rule when the same keyword should be coded the same way regardless of which supplier the invoice came from - for example, "shipping" lines that always belong on the same account. Use a contact rule when the coding depends on the supplier - the same keyword could mean different things for different vendors.
π What happens if both a contact rule and a folder rule could match?
Contact rules win. Datamolino evaluates contact-level rules first, and only falls back to folder-level rules when no contact rule matches.
Copying keyword rules from one folder to another
If you have more than one folder connected to the same Xero, QuickBooks, or FreeAgent organisation, you can copy folder-level keyword rules across folders.
Go to Folder Menu
Click Accounting & Automation
Select Line Item Rules
Select the folder you want to copy rules from
Click Copy rules
Note: All folder keyword rules will be copied each time you press Copy rules. You cannot select which rules to copy - either all or none.
Exclusive versus Composite keyword rules
π What's the difference between exclusive and composite keyword rules?
Exclusive rules are the default. When an item description matches a keyword, Datamolino applies the first matching rule and stops there β no other rules are checked. Because the match is final, each exclusive rule must include both a ledger account and a tax code.
Composite rules work differently. Datamolino checks all matching rules and combines them. If one rule provides the ledger account and another provides the tracking category, both are applied together to build the final coding. Because the result is assembled from multiple rules, no fields are required in any individual rule.
π Can I create a rule that only sets part of the coding - like just the ledger account or just a tracking category?
Yes. To do this, switch the folder to use composite keyword rules. Once enabled, you can create rules that cover only one part of the coding β for example, a rule that sets only the ledger account, and a separate rule that sets only the tracking category.
When an item description matches more than one rule, Datamolino combines the results to form the complete coding.
π How can I switch to using composite keyword rules?
To use composite keyword rules, follow these steps
Go to Folder Menu
Click Accounting & Automation
Click Workflow
Find Item coding match mode and select Composite
Click Save.
π Why can't I see the workflow settings?
Workflow settings, including composite keyword rules, can be changed only by the folder administrator.
β
Composite keyword rules are not available for FreeAgent integration.
First-match wins explained
Keyword rules use first-match-wins logic. Each line item is checked against the rule list in priority order, and as soon as one rule matches, that rule fires and no further rules are evaluated for that line.
π How are keyword rules prioritised?
Individual rules are prioritised based on their order, which you can change using the up and down arrows in the rules list.
Supplier keyword rules have priority over folder rules.
If we don't find a match for the line item description in any of the rules, we will look for any remembered coding from the supplier's past documents.
If there is none, we will look at the general default settings of the supplier and if there are none, we will look for folder level defaults.
π When are keyword rules the right tool?
Use keyword rules when the description has one meaningful keyword that determines the coding, and that keyword either repeats with small variations (dates, reference numbers) or appears across many suppliers in a consistent way. They are ideal for the exception cases that exact-match learning cannot handle.








