Types of Rules
Creating a Rule in the Dashboard
1
Open the Rules editor
In the AntifraudAI dashboard, go to Settings → Rules and click New Rule.
2
Choose a rule type
Select one of the four rule types:
block, allow, score_adjust, or flag. The form will update to show the relevant configuration fields for your chosen type.3
Set the condition
Define when the rule should fire by specifying:
- Field — the transaction attribute to evaluate (e.g.
billing_address.country,amount,user_id) - Operator — the comparison to apply (see the condition reference below)
- Value — the target value or list of values to match against
4
Set the action
Configure what happens when the rule fires:
- For
blockorallow: no additional configuration is needed. - For
score_adjust: enter a positive integer to increase the score or a negative integer to decrease it. - For
flag: enter the custom signal string to append (e.g.high_value_new_user).
5
Set the priority
Enter a priority integer. Rules are evaluated in ascending order — a rule with priority
1 runs before a rule with priority 100. Lower numbers win conflicts.6
Save and activate
Click Save. The rule is immediately active in the environment you are currently viewing (sandbox or production). You can toggle a rule on or off at any time from the Rules list.
Rule Condition Reference
Example Rules
The following examples show rules in the JSON format accepted by the Rules API. You can create and manage the same rules through the dashboard UI described above.1. Block transactions from high-risk countries
2. Allow transactions from VIP users
For large VIP lists, use an
in condition with a generous list or combine multiple allow rules to keep your rules maintainable.
