Policy Rules Reference
This page documents every condition type available in the Klear policy builder and how they are evaluated.
Condition types
| Condition | Field | Example |
|---|---|---|
| Amount threshold | sgd_amount | sgd_amount > 1000 |
| Category match | category | category in [Alcohol, Gambling] |
| Department scope | department_id | department = Sales |
| Submission lag | transaction_date | transaction_date < now - 60d |
| Missing receipt | has_receipt | sgd_amount > 50 AND has_receipt = false |
| GST code | gst_code | gst_code = BL |
Actions
| Action | Effect |
|---|---|
| Flag (soft) | Warning shown to submitter; expense can still be submitted; flag visible to approvers |
| Block (hard) | Expense cannot be submitted until the condition is resolved |
| Require extra approval | Adds chain steps beyond the base policy chain |
Fraud signals (automatic)
Klear runs deterministic fraud checks on every submission. These are not configurable policies — they are system-level signals flagged automatically:
| Signal | Trigger |
|---|---|
| Duplicate | Same amount + merchant + date within 7 days by same user |
| Round amount | Amount is a round number (e.g. SGD 500.00) |
| Split expense | Multiple expenses from same merchant on same day summing to a policy threshold |
| Outlier | Amount is more than 3x the user's average for that category |
| Fake merchant | Merchant name matches known test/fictitious patterns |
Fraud signals are visible to Admins and Approvers on the expense detail page. They do not block submission by default but they are recorded in the audit trail.
Priority and conflict resolution
When multiple policies match a single expense:
- Policies are evaluated in descending Priority order (higher number first)
- The first hard block encountered stops all further evaluation
- All soft flags from all matching policies are shown cumulatively
- The most specific approval chain (department over company-wide) is applied
Locked chain steps
Company-wide policy steps marked Locked cannot be removed or reordered by department-scoped policies. They are always present in the final resolved chain, regardless of department overrides.