> For the complete documentation index, see [llms.txt](https://docs.borndigital.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.borndigital.ai/digital-agent/conversation-flow/nodes-explained/decision-node.md).

# DECISION node

Use the Decision node to branch the conversation based on conditions over variables.

The Decision node sends the conversation down different paths depending on the data you have – for example the customer type, an invoice amount or the result of an API call. It does not talk to the customer and does not wait for input.

The values it decides on usually come from a [Function node](/digital-agent/conversation-flow/nodes-explained/function-node.md), the [entities of an Answer node](/digital-agent/conversation-flow/nodes-explained/answer-node.md#entities), or the node's own **Tools** and **Variables**.

<figure><img src="https://4261467870-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F6iQTvxgRZRwPS1NgIGEb%2Fuploads%2FQ9gad97Yq5b86by4l9kF%2Fnodes2-dec-editor.png?alt=media&amp;token=daa1f859-63a8-4536-83ba-2ffde708af6c" alt="The Decision node editor"><figcaption><p>A Decision node with two conditions</p></figcaption></figure>

## Conditions

Click **Add** to add a condition, then expand it:

* **Label (Optional)** – a readable name, for example *VIP customer*. It is shown in the editor and on the canvas instead of the expression.
* **Value** – a Python-style expression that is either true or false, for example `customer_type == 'VIP'` or `invoice_amount > 100`. Insert variables with `{` or the `{x}` icon.
* **Next** – the node the conversation continues to when the condition is true. Turn on **Dynamic** to take the node's name from a variable.

Use the icons on a condition to duplicate or delete it, and drag the handle on the left to reorder conditions.

{% hint style="info" %}
Conditions are evaluated from top to bottom and the **first true condition wins**. Put the most specific conditions first.
{% endhint %}

## When no condition is true

The **Next** field at the bottom of the editor is the default path. The conversation takes it when none of the conditions is true – similar to `else` in programming or `ELSE` in an SQL `CASE`. On the canvas this connection is labelled **Other**.
