Record rules
Set a rule every save of a record must pass, such as a property required when a status is Done, and see what people and the Agent read when a save is refused.
Who can do this: Owners and Admins, or a role with Organization settings.
A record rule is a condition every save of a record must pass. It is checked on every save: screen, Agent, API, import and workflow. A save that breaks it is refused, and nothing is written.
Add a rule#
Open the rules#
Go to Settings > Data > Record rules, choose the Object, then New rule.
Name it#
The Name appears in the refusal, so make it say why: "Done visits have hours".
Say when it applies#
Under When, add conditions on the record's own properties, such as Status is Done. A record must meet all of them. With no conditions, the rule applies to every record.
Say what it requires#
Under Then, choose one:
- Require properties: the properties that must be filled in.
- Allow only some options: a choice property and the options it may hold.
- Refuse the save: the save is refused outright.
Write the message#
Message is what people read when the rule refuses a save. A rule that refuses the save needs one. For the others, leave it empty and people read a description of the rule.
Choose when and for whom#
Under Checked, pick On every save or When a record is created. Under Applies to, pick who the rule binds.
Check, then save#
Check existing records counts the records that break the rule now. Then Save.
You can also ask the Agent to add a rule: it shows you a card to approve first. A condition that compares two properties is set through the Agent or the API; the editor keeps it as it is.
Who a rule binds#
| Applies to | Binds |
|---|---|
| People and agents | Everyone who saves: people on screen, imports, workflows, API keys and the Agent |
| Agents only | The Agent, Minis, hired agents, a workflow's AI steps and a person's own MCP client. Not a person saving by hand |
| Agents of other companies | Agents acting for another company. None reaches SalexHub yet, so this binds nobody today |
Forms on your site, connectors and incoming mail are not checked.
When a save is refused#
The person, the Agent or the API reads the rule's Message. Without one, the refusal says what the rule wants:
- Require properties: "Hours is required: Done visits have hours. Fill it in."
- Allow only some options: "Priority cannot be Low here: Urgent repairs. Choose High, Critical."
Where it shows:
- On screen: where the change was made, on the property the rule names.
- In an import: the row is refused and listed as "Line 14:" followed by the message.
- The Agent: it reads the same message and tells you the change was refused.
- The API: a
VALIDATIONerror with the reasonrecord_ruleand one issue for each property.
Allow only some options judges only a value the save adds. A value the record already held stays.
Manage rules#
Each rule has a switch to turn it On or off, Edit and Archive. An archived rule can be restored, or deleted for good. Rules from your modules lists the rules a module brings, such as the Sales module's discount and price limits.
Limits#
| What | Up to |
|---|---|
| Rules on one object | 100 |
| Conditions in one rule | 50 |
| Properties one rule requires, or options it allows | 50 |
| A rule's name | 120 characters |
| A rule's message | 500 characters |
FAQ#
Does a new rule change the records I already have?#
No. It is checked when a record is next saved. Check existing records shows how many would be refused now.
Can a condition look at a linked record?#
No. A rule reads the record being saved, and only its own properties.