Rule Conditions & Actions
Every rule in Mod AI is built from two parts: conditions that define when the rule triggers, and actions that define what happens when it does. This page is a reference for all available condition types, operators, and action types.
Conditions
Conditions define when a rule triggers. A rule only fires when all of its conditions are true.
Condition Types
| Condition Type | Description | Example |
|---|---|---|
| Field comparison | Compare a document field to a specific value | Invoice number starts with "INV-2025" |
| Amount threshold | Trigger based on a monetary amount | Total amount greater than $1,000 |
| Vendor match | Trigger for a specific vendor | Vendor is "Office Depot" |
| Date range | Trigger based on an invoice date | Invoice date is in Q4 |
| Contains text | Check if a field contains specific text | Description contains "consulting" |
| Is null / Is not null | Check whether a field has a value | PO Number is not empty |
Operators
The available operators depend on the field type, but the full list includes:
| Operator | Works With | Description |
|---|---|---|
| Equals | Text, number, date | Exact match |
| Not equals | Text, number, date | Does not match |
| Contains | Text | Field includes the specified text |
| Starts with | Text | Field begins with the specified text |
| Greater than | Number, date | Field value exceeds the specified value |
| Less than | Number, date | Field value is below the specified value |
| Between | Number, date | Field value falls within a range (inclusive) |
| Is null | Any | Field has no value |
| Is not null | Any | Field has a value |
Multiple Conditions
When a rule has multiple conditions, they are combined with AND logic -- all conditions must be true for the rule to fire. For example, a rule with these two conditions:
- Vendor equals "Staples"
- Total amount greater than $500
Only fires for Staples invoices over $500. A Staples invoice for $200 would not trigger it.
Actions
Actions define what happens when a rule's conditions are met. When a rule fires, all of its actions execute.
Action Types
| Action Type | Description | Example |
|---|---|---|
| Set field | Set a specific field to a value | Set Payment Terms to "Net 30" |
| Apply GL account | Assign a GL account to line items | Code to account 5200 Office Supplies |
| Apply dimension | Set a dimension value on line items | Set Department to "Marketing" |
| Flag for review | Add a review flag to the document | Flag invoices from new vendors |
| Add note | Attach a note to the document | Note: "Verify pricing against contract" |
| Skip validation | Bypass a specific validation check | Skip PO matching for this vendor |
Multiple Actions
A single rule can have multiple actions. When the rule fires, all actions execute. For example, a rule could:
- Apply GL account 5200 (Office Supplies)
- Set Department dimension to "Operations"
- Add a note: "Standard monthly order"
All three actions happen together when the conditions are met.
Learn More
- Creating a Rule -- Step-by-step instructions for building rules.
- Common Rule Examples -- Real-world examples showing conditions and actions in practice.