If / Else
Identifier and availability
- Type:
action - Stable identifier:
if_else - Status: Selectable — available in the new-node selector and importable.
Purpose
Branches the flow based on contact conditions.
Prerequisites and context
Required configuration: settings. Review the available context below before using variables.
Parameters
| JSON path | Type | Required | Default | Allowed values | Description |
|---|---|---|---|---|---|
settings |
object | Yes | — | — | Node-specific settings. Unknown keys are rejected. |
settings.conditions |
condition[] | Yes | — | — | One or more Contact conditions. All conditions must pass. |
Unknown parameter and settings keys are rejected. Resource references use names, emails, document keys, or endpoints rather than database IDs.
Condition object contract
A conditions value is a non-empty array of at most 50 objects. Every condition in the array uses AND semantics.
| Operator family | Required object keys | Meaning |
|---|---|---|
| has_tag, not_has_tag | operator, value | value is the exact Contact Tag name. Omit field. |
| empty, not_empty | operator, field | Tests whether the selected field has a value. Omit value. |
| equals, not_equals, contains, not_contains | operator, field, value | Requires a nonblank string or finite number. Use empty/not_empty for blank values. Pipeline/status fields accept these operators with an exact human-readable name. |
| greater_than, greater_than_or_equal, less_than, less_than_or_equal | operator, field, value | Requires a finite numeric value and cannot be used with Pipeline or Pipeline Status fields. |
Allowed field tokens are: email, phone, first_name, last_name, full_name, source, city, state, pipeline, pipeline_id, pipeline_status, pipeline_status_id, tenant.activated, tenant.activation_step, tenant.plan_id, tenant.plan_name, tenant.plan_free_trial_days, tenant.subscription_status, tenant.subscription_billing_cycle, tenant.subscription_amount, tenant.subscription_trial_days_left, tenant.subscription_trial_end_date, tenant.subscription_has_card_on_file, tenant.subscription_card_brand, tenant.subscription_card_last_four, and tenant.subscription_next_billing_at.
For pipeline, pipeline_id, pipeline_status, and pipeline_status_id, value is still the exact human-readable Pipeline or Pipeline Status name in the target tenant—not a numeric ID. The name must resolve uniquely.
Examples:
[
{
"operator": "has_tag",
"value": "VIP"
},
{
"operator": "not_empty",
"field": "email"
},
{
"operator": "equals",
"field": "state",
"value": "CO"
}
]
Inputs and available variables
Context exposed on if: contact. Context exposed on else: contact.
Templated strings use double braces, for example {{contact.first_name}}. Availability in the editor does not create runtime context; the trigger and preceding branch still need to provide it.
Connections and branches
Connect this action into a root path with branch actions or into an existing branch using that parent’s token. It then terminates its current sequential path and exposes these exact, case-sensitive branch ports: if, else. Put following work inside those branches; do not place a sibling after this action.
Connection fragment:
{
"from": "action_if_else",
"to": "next_action",
"branch": "if",
"order": 1
}
Valid JSON node example
{
"key": "action_if_else",
"type": "action",
"name": "if_else",
"display_name": null,
"parameters": {
"settings": {
"conditions": [
{
"operator": "has_tag",
"value": "VIP"
}
]
}
}
}
Validation and runtime caveats
All conditions use AND semantics. No valid conditions evaluates false and selects else.
See the Automation JSON import format for the envelope, dependency resolution, graph rules, complete examples, and AI author checklist.