> ## Documentation Index
> Fetch the complete documentation index at: https://docs.verisoul.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Building Rules

> Create, backtest and publish rules in the dashboard

A rule is evaluated on a trigger, checks its conditions against the account, session or verification, and adds the account to a list or removes it from one. This page covers building and managing rules in the dashboard. How rules are evaluated and how lists interact is covered in [Rules](/action/rules).

## Creating a rule

**Create New Rule** opens the builder, optionally from a template:

| Template | Sets up |
| - | - |
| **Blocked Countries** | Block accounts from chosen countries |
| **Blocked Domains** | Block accounts using listed email domains |
| **Allow Emails** | Allow specific email addresses |
| **Blocked ISPs** | Block accounts whose sessions come from listed service providers |
| **Allow ISPs** | Allow accounts whose sessions come from listed service providers |

A rule has a name (up to 25 characters, fixed after creation), a trigger, conditions, at least one action, and a status.

### Triggers

| Trigger | Evaluated |
| - | - |
| **Account Creation** | On the first session of each account |
| **All Sessions** | On every session |
| **ID Check Completed** | When an ID Check session linked to an account completes |
| **Face Match Completed** | When a Face Match session linked to an account completes |

Verification triggers offer verification fields only. Changing the trigger removes conditions the new trigger cannot use.

### Conditions

Conditions are rows of field, operator and value. Rows in a group must all match (AND), and groups are alternatives (OR). A rule can have up to 10 groups.

Any field in the Accounts and Sessions tables, and any field in the verification response, can be used. Notes on values:

* Percentages are entered from 0 to 100. Email Score ranges from -100 to 100, and IP Reputation Score from -1 (trusted) to 1 (risky).
* Value sets, such as countries, take up to 1,000 values.
* Fields with a fixed vocabulary, such as countries and decisions, accept only listed values.
* Comparisons such as **Greater Than** match only when the field has a value. Use **Blank** to match missing values.
* On the Lists field, **Equals** matches exact list membership.

### Actions

Actions add the account to a list or remove it from one, following the [list hierarchy](/action/lists#list-hierarchy-and-movement). An account on **Allow** is not moved to **Block** by an add action; add a **Remove from List** action for Allow first. Removals run before additions.

## Backtesting

**Rule Backtesting** runs the conditions against the project's current data while you build. It shows the matching accounts and sessions with their **Real**, **Suspicious** and **Fake** split.

| Aspect | Detail |
| - | - |
| Data | Accounts and sessions as they are now |
| Window | All accounts for account conditions, the last 89 days of sessions when a session field is used |
| Rows | Up to 1,000 shown, with CSV download |

Backtesting checks conditions only. It ignores the trigger, the actions, and current list membership, so it shows who matches the conditions today. A rule's statistics show who it acted on once it is live.

## Publishing

A rule runs while its status is **Enabled**. Turning a rule on or off needs **Turn rules on and off**, a separate permission from **Edit rules**, so a custom role can build and test rules without making them live. Without it, new rules save disabled, and editing a live rule keeps it live.

A rule can be saved to several projects at once when you create it. Each project is checked separately, and list actions refer to lists by name in each project.

## Versions and history

Every change writes a new version, including turning a rule on or off, archiving and restoring. **Rule Version History** keeps every version, and **Restore this version** copies an earlier one into a new version.

A rule's page shows how many accounts, sessions and verifications it hit in the selected period, and its trigger history (up to 50,000 rows per tab). Statistics count trigger events, so an account that triggers a rule on several sessions is counted each time.

**Duplicate** copies a rule into a new, disabled rule. **Archive** stops a rule and hides it from the default view; archived rules keep their history and their names, and rules are never deleted.

## Rules from the AI Agent

The [AI Agent](/dashboard/ai-agent) can draft a rule from your data. **Review in Rules** opens the builder with the suggestion and its backtest, and nothing is created until you save.

## Permissions

| Action | Viewer | Analyst | Editor |
| - | - | - | - |
| View rules, history and backtests | ✓ | ✓ | ✓ |
| Create, edit, duplicate, archive and restore | | | ✓ |
| Turn rules on and off | | | ✓ |

Admins have every permission. See [Managing Users](/dashboard/managing-users). Rules belong to a project, so Sandbox and Production rules are separate.

## Need Help?

If you have any questions about building rules, please contact our support team at [support@verisoul.ai](mailto:support@verisoul.ai).
