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

# Condition action

> Split your workflow into different paths using conditional logic. Evaluate contact data, call outcomes, or variables to route each execution.

Split your workflow into different paths based on conditions. The workflow evaluates each path's conditions and follows the first one that matches.

## Configuration

A condition node has two or more **paths**. Each path has:

| Field      | Required | Description                                            |
| ---------- | -------- | ------------------------------------------------------ |
| Label      | Yes      | A name for this path (e.g., "Interested", "No answer") |
| Conditions | Yes      | One or more rules to evaluate                          |
| Default    | —        | One path must be marked as the default fallback        |

The default path runs when no other path's conditions match.

## Condition rules

Each condition evaluates a field against a value using an operator.

| Field    | Required | Description                                                                    |
| -------- | -------- | ------------------------------------------------------------------------------ |
| Field    | Yes      | The data field to check (contact field, trigger data, or previous step output) |
| Operator | Yes      | How to compare                                                                 |
| Value    | Yes      | The value to compare against                                                   |

### Available fields

* **Contact fields** — `firstName`, `lastName`, `email`, `phone`, `businessName`, `dnc`
* **Trigger data** — `tagName`, `channel`, `outcome`, `message`, or any webhook payload field
* **Custom fields** — Any custom field on the contact
* **Previous step outputs** — Reference outputs from earlier actions using dot notation (e.g., `nodeId.outcome`)

#### Do Not Contact (DNC)

`dnc` is a boolean field on every contact. It is set to `true` when the contact has opted out (STOP keyword on SMS, unsubscribe link on email, or a manual flag in the contact panel). Branching on DNC lets you suppress outreach for opted-out contacts while still letting the workflow continue down a "log only" path.

| Operator   | Description                  | Example                 |
| ---------- | ---------------------------- | ----------------------- |
| Equals     | DNC has a specific value     | `dnc` equals `true`     |
| Not equals | DNC does not have that value | `dnc` not equals `true` |

**Typical pattern:**

| Path    | Condition           | Then                               |
| ------- | ------------------- | ---------------------------------- |
| DNC     | `dnc` equals `true` | Slack message to #compliance, end  |
| Default | —                   | Send SMS / Send Email / Voice call |

### Operators

| Operator     | Description         | Example                         |
| ------------ | ------------------- | ------------------------------- |
| Equals       | Exact match         | outcome equals "completed"      |
| Not equals   | Does not match      | outcome not equals "voicemail"  |
| Contains     | Text includes value | message contains "pricing"      |
| Not contains | Text excludes value | email not contains "spam"       |
| Greater than | Numeric comparison  | durationSeconds greater than 60 |
| Less than    | Numeric comparison  | durationSeconds less than 10    |
| Starts with  | Text begins with    | phone starts with "+1"          |
| Ends with    | Text ends with      | email ends with "@gmail.com"    |
| Is empty     | Field has no value  | email is empty                  |
| Is not empty | Field has a value   | phone is not empty              |

#### Date operators

Date-typed custom fields (see [Contacts → Custom fields](/concepts/contacts#field-types)) support a separate operator set that compares calendar dates rather than string values.

| Operator   | Description                                   | Example                                              |
| ---------- | --------------------------------------------- | ---------------------------------------------------- |
| Before     | The field's date is earlier than the value    | renewalDate before `2026-06-01`                      |
| After      | The field's date is later than the value      | renewalDate after `2026-01-01`                       |
| Equals     | The field's date is exactly the value         | birthday equals `2026-05-02`                         |
| In Between | The field's date is within an inclusive range | renewalDate in between `2026-04-01` and `2026-04-30` |

Dates are compared in `YYYY-MM-DD` form. The same operators are also available in the Contacts page filter bar.

## Example

**Route by call outcome:**

Trigger: Conversation ended → Agent Type: voice

| Path       | Condition                   | Then                      |
| ---------- | --------------------------- | ------------------------- |
| Interested | outcome equals "completed"  | Send follow-up email      |
| Voicemail  | outcome equals "voicemail"  | Wait 4 hours → Retry call |
| No answer  | outcome equals "no\_answer" | Send SMS                  |
| Default    | —                           | Add "needs-review" tag    |

**Route by channel:**

Trigger: Contact replied

| Path         | Condition                  | Then                          |
| ------------ | -------------------------- | ----------------------------- |
| SMS reply    | channel equals "sms"       | Slack message to #sms-replies |
| Instagram DM | channel equals "instagram" | Slack message to #social      |
| Default      | —                          | Slack message to #general     |
