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

# If

<Frame>
  <img class="image-center" src="https://mintcdn.com/cognigy-15abf2ba/jD73u_IBHRit9B59/_assets/ai/develop/node-reference/logic/if.png?fit=max&auto=format&n=jD73u_IBHRit9B59&q=85&s=321ec80bbd2999c878eea47d661f3f12" alt="If Node configuration panel" style={{ width: 'auto' }} width="828" height="552" data-path="_assets/ai/develop/node-reference/logic/if.png" />
</Frame>

## Description

This Node executes either one or another part of a [Flow](/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](/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.

<Frame>
  <img class="image-center" src="https://mintcdn.com/cognigy-15abf2ba/jD73u_IBHRit9B59/_assets/ai/develop/node-reference/logic/if-conditions.jpg?fit=max&auto=format&n=jD73u_IBHRit9B59&q=85&s=6d62dc7a07b7648ff6f471dc69493f9c" alt="If Node Rule editor with condition settings" style={{ width: 'auto' }} width="550" height="316" data-path="_assets/ai/develop/node-reference/logic/if-conditions.jpg" />
</Frame>

### Advanced Editor

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

<Frame>
  <img class="image-center" src="https://mintcdn.com/cognigy-15abf2ba/jD73u_IBHRit9B59/_assets/ai/develop/node-reference/logic/if-conditions-rule.jpg?fit=max&auto=format&n=jD73u_IBHRit9B59&q=85&s=08f67452bcb97898d94799e138648d09" alt="If Node Advanced editor with CognigyScript conditions" style={{ width: 'auto' }} width="529" height="175" data-path="_assets/ai/develop/node-reference/logic/if-conditions-rule.jpg" />
</Frame>
