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

# Desk Rules

> Automate workflows with conditional rules

# Desk Rules

Desk rules automate actions based on submission data. When conditions are met, rules can change status, set priority, or draft response emails.

## How Rules Work

Desk rules are evaluated when:

* A submission is created
* Extracted data changes
* Status or priority is updated
* A rule is manually triggered

When conditions match, the rule's actions execute automatically.

## Creating a Rule

1. Navigate to your desk's **Rules** tab
2. Click **+ New Rule**
3. Define conditions and actions
4. Enable the rule

### Rule Settings

| Setting     | Description                        |
| ----------- | ---------------------------------- |
| **Name**    | Descriptive name for the rule      |
| **Enabled** | Toggle rule on/off                 |
| **Order**   | Execution order within a group     |
| **Group**   | Optional grouping for organization |

## Conditions

Rules trigger when all conditions are true.

### Field Conditions

Compare extracted field values:

| Operator         | Description        | Example                     |
| ---------------- | ------------------ | --------------------------- |
| **Equals**       | Exact match        | State = "CA"                |
| **Not Equals**   | Does not match     | Status != "Declined"        |
| **Greater Than** | Numeric comparison | TIV > 10000000              |
| **Less Than**    | Numeric comparison | Years in Business \< 3      |
| **Contains**     | Text contains      | Insured Name contains "LLC" |
| **Exists**       | Field has a value  | Effective Date exists       |
| **Not Exists**   | Field is empty     | Loss History not exists     |

### Required Fields Missing

Trigger when required fields haven't been extracted:

```
Condition: Required fields missing = true
Action: Set status to "Needs Info"
```

## Actions

### Set Status

Automatically update submission status:

```
IF TIV > 50,000,000
THEN Set Status = "Review"
```

### Set Priority

Assign priority based on criteria:

```
IF Effective Date < 7 days from now
THEN Set Priority = "Urgent"
```

### Draft Email

Generate a response email using AI:

```
IF Status = "Needs Info" AND Required fields missing
THEN Draft Email with instructions:
  "Request the missing information: [list missing fields]"
```

Draft emails go to your action items for review before sending.

## Rule Groups

Organize related rules into groups:

* **Initial Processing** - Rules that run on new submissions
* **Escalation** - Priority and assignment rules
* **Response Automation** - Email drafting rules

Groups execute in order, and rules within a group execute by their order setting.

## Examples

### Auto-Escalate Large Risks

```
Name: Escalate High TIV
Conditions:
  - TIV > 25,000,000
Actions:
  - Set Priority = "High"
```

### Request Missing Information

```
Name: Request Missing Docs
Conditions:
  - Status = "Review"
  - Required fields missing = true
Actions:
  - Set Status = "Needs Info"
  - Draft Email: "Please provide the following..."
```

### Fast-Track Renewals

```
Name: Renewal Processing
Conditions:
  - Subject contains "renewal"
  - Prior Policy Number exists
Actions:
  - Set Priority = "Normal"
  - Set Status = "Review"
```

## AI-Generated Rules

Click **Generate Rule** to describe what you want in plain language:

> "When a submission is missing the ACORD 125 form, set status to Needs Info and draft an email requesting it"

Kantilever will create the rule conditions and actions for you.

## Testing Rules

Before enabling a rule:

1. Click **Test Rule**
2. Select a sample submission
3. Preview what actions would execute
4. Adjust conditions as needed
