Automation Rules let you set up rules that change your data for you. A rule watches for records that match the conditions you choose, and when one matches, it automatically applies the actions you set — like assigning a tax treatment, filing something to a Chart of Accounts account, or adding a tag. Once a rule is in place, Trac runs it as your data is created or updated, so you don’t have to make the same edit over and over by hand.

Rules can target three kinds of data:

  • Activities — the money activity recorded on your holdings: buys, sells, dividends, transfers, and so on (see Activities). This is the entity type to pick for new rules about money movements.
  • Portfolio Items — your holdings themselves. The rule list shows these as Holding.
  • Transactions — a legacy entity type kept so rules written before Trac moved to activities are still readable. Don’t start new rules here; use Activity instead.

The data Trac matches against is whatever is already in your portfolio, so see Adding Your Data for how that data gets in.


Who can use Automation Rules#

Automation Rules live with your portfolio’s other configuration, so they’re an admin tool. You set them up once for the portfolio and they apply to the matching data for everyone using it.


Get to Automation Rules#

  1. Open Configurations.
  2. Choose the Automation Rules tab.

You’ll see the list of rules already set up for the portfolio. Each rule shows its name, an active/inactive indicator, an entity-type chip (Activity, Holding, or Transaction), and a short summary of what it matches and what it does.

The header has a search box — type to narrow the list by rule name, description, or ID — and a plus (+) button to add a new rule. If there are no rules yet, the list shows “No automation rules found”.


Create a rule#

Tap the plus (+) button to open the rule form. A rule has a few settings at the top, then a Triggers section (the conditions) and an Actions section (what to do).

Settings#

  • Rule ID — generated for you and read-only. You don’t need to set this.
  • Name (required) — how the rule appears in the list. Give it something you’ll recognize, like “Municipal bond tax treatment”.
  • Description — optional free text explaining what the rule is for.
  • Active — a toggle. Only active rules run; turn a rule off to pause it without deleting it.
  • Entity Type — the kind of data the rule applies to: Activity, Portfolio Item, or the legacy Transaction. Changing this swaps which fields you can match on and which actions are available, so pick it first.
  • Application Mode — Immediate or Future Only (see Application modes).

Triggers (the conditions)#

Triggers are the conditions a record must meet for the rule to fire. All triggers must match for the rule to apply — they’re combined with AND, not OR.

  1. In the Triggers section, tap Add Triggers (the button reads Edit Triggers once you’ve added some).
  2. In the filter builder, add one condition at a time: pick a field, an operator (such as equals, contains, is empty, is greater than), and a value.
  3. Save the triggers. They appear back on the form as filter pills.

The fields you can match on depend on the entity type:

  • Activity rules can match on event fields (such as activity, trade date, settlement date, status, description, and notes), on posting details, and on the parent holding’s fields.
  • Portfolio Item rules match on holding fields.
  • Transaction rules match on legacy transaction fields (type, tax treatment, friendly type, amounts, dates, and more) and on the parent holding’s fields.

The trigger builder is the same filter tool used in Explorer, so the operators and matching behave consistently across the app.

Actions (what to do)#

Actions are what the rule does when its triggers match. Add as many as you need.

  1. In the Actions section, tap the plus (+) next to the title. A new action box appears at the top of the list.
  2. Choose an Action Type:
    • Set Field — set one field to a value. This is the only action available for Activity rules, because activities have no tags.
    • Add Tag / Remove Tag — add or remove a tag (Portfolio Item and legacy Transaction rules).
    • Create Linked Transaction — pair a legacy transaction with its other side automatically (legacy Transaction rules only).
  3. For Set Field, pick the Field to set, then enter the Value. The value input matches the field: a text box for text, a dropdown for choices like Activity or Tax Treatment, a date picker for dates, a number input for amounts, a switch for yes/no fields, and a Chart of Accounts picker for the COA field.
  4. Use Remove Action at the bottom of an action box to delete it.

Tip: set the Entity Type before you build actions. If you configure actions and then switch the entity type to one that doesn’t support them, Trac will block saving until the actions match the chosen type.

Save#

Tap Save. The rule is saved in the background and the form closes; your new rule shows up in the list.


How matching rules are applied#

When more than one rule could touch the same record, Trac applies them in a consistent order — highest priority first, then oldest rule first, breaking ties by rule ID — so results are predictable. A rule that carries no priority of its own sits at the default of 1, which means giving one rule a priority of 0 pushes it below the rest without having to set a priority on every other rule:

  • Setting the same field twice: the first rule to set a field wins; later rules that try to set the same field are skipped.
  • Tags add up: tag actions from every matching rule are applied, so different rules can each add their own tag.

Rules never block your data from being saved. If a rule can’t apply an action (for example, the value isn’t valid for the field), Trac skips that action and saves the record anyway.


Application modes (Immediate vs. Future Only)#

The Application Mode controls which records a rule reaches:

  • Immediate — the rule applies to matching records, including existing ones it’s evaluated against.
  • Future Only — the rule applies only to records created after the rule itself, leaving your existing data untouched. Use this when you want a new rule to start shaping data going forward without retroactively rewriting history.

Edit, duplicate, and turn rules on or off#

From the Automation Rules list you can manage existing rules:

  • Edit — tap a rule (or its Edit button) to reopen the form with its current settings. Make your changes and Save. Existing rules also have a trash icon in the form header to delete them.
  • Turn on/off — use a rule’s active toggle to pause or resume it without deleting it. Inactive rules never run.
  • Duplicate — expand a rule card and tap the Copy icon (“Duplicate rule”). The form opens pre-filled with that rule’s triggers and actions, named “<original name> (Copy)”, as a brand-new rule. Adjust whatever you like and save — the original rule is left unchanged. This is the fastest way to make a variation of a rule you already have.

Test a rule against existing data (Apply In Explorer)#

On the web app, each rule with triggers and actions has an Apply In Explorer button. It opens Explorer with the rule’s triggers turned into filters and its actions ready as a batch change, so you can:

  1. See exactly which existing records the rule matches.
  2. Apply the rule’s actions to those records in one batch.

This is a good way to preview a rule before relying on it, or to apply a new Future Only rule to data that already exists.


Activity rules#

Activity is the entity type for automating money movements. Create a rule as usual and choose it. A few things are specific to activities:

  • Triggers can match on event details (activity, trade date, settlement date, status, description, notes, and more), on the individual postings that make up the event, and on the parent holding.
  • Actions are limited to Set Field — activities have no tags, so the tag and linked-transaction actions don’t apply.
  • Rules run as you create or update an event. Anything a rule changes still has to pass the same balance and content checks as a manual edit, so a rule can’t push an event into an invalid state.
  • When rules change an event you’re editing, the editor shows a brief “rules applied” confirmation summarizing how many matched.

You can also reach this from the other direction: see Automate activities in the Activities guide.


A worked example#

Say the coupon payments on your municipal-bond holdings come in with a vague description and you want them labelled consistently and flagged for tax review. You’d create an Activity rule like this:

  • Name: Municipal bond coupons
  • Entity Type: Activity
  • Application Mode: Immediate
  • Triggers (both must match):
    • the parent holding’s tags contains muni
    • the activity’s description contains coupon
  • Actions:
    • Set Field → Activity = Dividend Cash
    • Set Field → Notes = Municipal coupon — check tax exemption

From then on, any matching activity is labelled and annotated as you record it. On the web app, use Apply In Explorer on the rule to apply it to the matching activities you already have.