# Conditional

A conditional tool evaluates an expression and halts downstream execution of the workflow if the execution equates to `False`. This is a helpful tool to only execute parts of a workflow based on certain conditions, potential examples include:

* Send an email *only* if a certain number of shipments have order priority of High
* Publishing a dataset to a data warehouse *only* if your dataset passes specific validation logic.

When writing your conditional expression, it's required that the expression evaluates to a boolean - `true` or `false`. Examples of boolean expressions include:

`ANY({OrderStatus} = "High")` - Return true if any record has an OrderStatus of "High".

`ALL({OrderStatus} = "High")` - Return true if *all* records have an OrderStatus of "High".

`AVG({Sales}) > 5000` - Return true if the average of a sales column is greater than 5000.

`ISNULL({var!Threshold})` - Return true if the global variable Threshold is not defined.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.cascade.io/cascade/tools/flow/conditional.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
