# Logical

> Logical IF/THEN/ELSE operator available in Process Mining expressions for Automation Suite, used to evaluate conditions and return calculated values.

## `IF - THEN - ELSE`

### Description

Checks a condition specified by comparison field or expression.

If the `IF` condition returns `true`, the `THEN` operations are calculated.

If the `IF` condition returns `false`, the `ELSE` operations are calculated.

:::note
`ELSE` is optional, and will return `NULL` when not set.
:::

### Syntax

`IF <Comparision field or Expression>`

`THEN <Expression or Field or Constant>`

`[ELSE <Expression or Field or Constant>]`

### Supported values

All values can be used.

### NULL handling

If the result of the `IF` condition is `NULL`, the `ELSE` operations are calculated.

### Example

`IF User = "Robot" THEN "Automated event" ELSE "Manual event"`

## `AND`

### Description

Compares two conditions, and returns `true` if both of comparison field values or expressions are `true`.

### Syntax

`<Comparison field or Expression> AND <Comparison field or Expression>`

### Supported values

All values can be used. Both values must be of the same kind.

### NULL handling

If any of the inputs is `NULL`, the result is `NULL`.

### Example

`Department = "Sales" AND Salary > 50000`

## `OR`

### Description

Compares two conditions, and returns `true` if any of comparison field values or expressions is `true`.

### Syntax

`<Comparison field or Expression> OR <Comparison field or Expression>`

### Supported values

All values can be used. Both values must be of the same kind.

### NULL handling

If any of the inputs is `NULL`, the result is `NULL`.

### Example

`Department = "Sales" OR Salary < 50000`

## `NOT`

### Description

Returns the inverse of a boolean value.

If the result of the condition is `true`, the `NOT` operation will return `false`. If the condition is `false`, the `NOT` operation will return `true`.

### Syntax

`NOT <Comparison field or Expression>`

### Supported values

All values can be used.

### NULL handling

If any of the inputs is `NULL`, the result is `NULL`.

### Example

`NOT Department = "Sales"`
