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

# If

![If Node configuration panel](https://mintcdn.com/cognigy-docs-legacy/sbu8K_1z3Hht9e7i/_assets/ai/develop/node-reference/logic/if.png?fit=max\&auto=format\&n=sbu8K_1z3Hht9e7i\&q=85\&s=45c74f81e0d46c89bbdbc06785009c94)

## Description

This Node executes either one or another part of a [Flow](https://docs-classic.cognigy.com/ai/agents/develop/projects-and-flows/overview) based on a condition. An If Node has two child Nodes: a *Then Node* and an *Else Node*. The condition is evaluated during the execution of the Flow. If the condition evaluates to `true`, the Flow takes the path of the Then Node; if it evaluates to `false`, the path of the Else Node is executed.

## Parameters

### Condition Field

In the **Condition** field, use [CognigyScript](https://docs-classic.cognigy.com/ai/platform-features/cognigyscript) without `{{ }}`. For example, `input.slots.city` is all that is required. This evaluates to `true` if an Input Keyphrase with the tag `city` is found.

### Rule Editor

The Rule editor allows you to quickly create simple conditions.

![If Node Rule editor with condition settings](https://mintcdn.com/cognigy-docs-legacy/sbu8K_1z3Hht9e7i/_assets/ai/develop/node-reference/logic/if-conditions.jpg?fit=max\&auto=format\&n=sbu8K_1z3Hht9e7i\&q=85\&s=ca2365d00c10bd2134fb9dc5a3d00c1c)

### Advanced Editor

The Advanced editor allows you to write Conditions that go beyond one comparison.

![If Node Advanced editor with CognigyScript conditions](https://mintcdn.com/cognigy-docs-legacy/sbu8K_1z3Hht9e7i/_assets/ai/develop/node-reference/logic/if-conditions-rule.jpg?fit=max\&auto=format\&n=sbu8K_1z3Hht9e7i\&q=85\&s=dc858b6473754a4904447395a67016b0)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.