Logic

Conditions

Use a Conditions node to choose which actions or agents run next, without writing a custom action. Using JSONPath, reference fields in the previous node’s context payload and compare their values against your conditions.

Branches are evaluated in order: If, followed by any Else if branches. Only the first matching branch is selected. Else runs when no preceding branch matches. If Else is not connected, no further nodes run from this Conditions node when no conditions match.

Each branch can connect to multiple actions or agents. All nodes connected to the selected branch are triggered and receive the previous node’s context payload unchanged.

Add a Conditions node

  1. In Orchestrate, open the pipeline you want to edit.
  2. From Logic in the left panel, drag Conditions onto the canvas.
  3. Connect an event, action, or agent to the Conditions node's input. For actions and agents, you can use either a Success or Failed connection.
  4. Select the Conditions node. Under If in the right panel, configure the following:
    • Condition name (optional) - Enter a name that is unique within the node, up to 120 characters.
    • JSON Path - Enter the JSONPath to a field in the previous node’s context payload. The $. prefix is provided automatically: enter result.score to reference $.result.score.
    • Operator - Select how to compare the field's value.
    • Value JSON - Enter the comparison value as valid JSON. No value is needed for Empty or Not empty.
  5. To add another branch, click + Add Else If and configure its conditions. You can add up to 10 Else if branches per node.
  6. Connect If and every Else if branch to the actions or agents that should run when it matches. Each branch can connect to more than one node.
  7. Optionally, connect Else to an action or agent.
  8. Click Save.
⚠️

Connection limitations

A Conditions node's output cannot connect to an event or another Conditions node. Connections cannot create loops.

Combine conditions

To add conditions within the same branch:

  1. Select the Conditions node.
  2. In the relevant If or Else if branch, click + Add Condition.
  3. Enter the JSON path, operator, and comparison value.
  4. Select AND when both conditions must match, or OR when either condition can match.
  5. Click Save.

You can add up to 10 conditions per branch. When combining three or more conditions, AND is evaluated before OR. For example, Condition 1 OR Condition 2 AND Condition 3 is evaluated as Condition 1 OR (Condition 2 AND Condition 3).

To remove an individual condition, click its x button and save the pipeline.

Operators and values

Choose an operator and comparison value that match the incoming field’s type. Enter strings in double quotes, such as "InProgress". Enter numbers and booleans without quotes, such as 80 or true. The number 80 and the string "80" are different value types.

Field typeSupported operatorsValue example
TextEquals, Not equals, Contains, Not contains"InProgress"
NumberEquals, Not equals, Greater than, Greater or equal, Less than, Less or equal80
BooleanEquals, Not equalstrue
ObjectEquals, Not equals, Contains, Not contains{"project_id":0}
ArrayEquals, Not equals, Contains, Not contains[1,3]

Date and time values use the operators for their stored type: number operators for numeric values, or text operators for strings.

Empty matches missing fields, null, "", {}, and []. Not empty matches non-empty values. Other operators do not match a missing field or null.

An incompatible operator or comparison value also returns false. For example, Greater than does not match a text field. These type mismatches do not block saving the pipeline. Each Value JSON input has a 128 KB size limit.

Matching behavior

Equals requires an exact match. Contains checks whether the specified value is included in the field.

Field typeEqualsContains
TextMatches the exact text, including capitalization. "InProgress" does not match "inprogress".Matches a substring regardless of capitalization. "deleted" matches "Item Deleted event".
ObjectAll properties and values must match, with no additional or missing properties.All specified properties and values must be present. The field can contain additional properties.
ArrayAll elements and their order must match.The specified elements must be present, regardless of order.

For an array field, Contains accepts a single value, such as 3, or an array, such as [1,3]. Use Not equals or Not contains to exclude matches instead.

Reorder or remove branches

  1. Select the Conditions node.
  2. Use the up or down arrow beside a branch to change its evaluation order, or click its x button to remove it.
  3. Click Save.

Reordering a branch keeps its conditions and connections. Removing a branch removes its outgoing connections, but does not delete the connected nodes. Else cannot be reordered or removed.

Conditions in version history

In the pipeline’s version history, Conditions nodes appear in the canvas JSON with "type": "logic" and "name": "Conditions".

The node’s config.branches array contains its branches in evaluation order. Each branch includes its name and conditions, including JSON paths, operators, comparison values, and AND/OR joiners. The Else branch has no conditions.

Outgoing connections identify their branch through source_branch.branch_id. When comparing versions, you can review changes to branch settings, evaluation order, and downstream connections.

Routing example

Suppose the previous node returns:

{
  "result": {
    "score": 92
  }
}

Configure the Conditions node as follows:

BranchJSON PathOperatorValue JSONConnected action
Ifresult.scoreGreater or equal90High-score action
Else ifresult.scoreGreater or equal70Review action
Else———Fallback action

The score matches both comparisons, but only If is selected because it is evaluated first. The High-score action receives the original JSON payload unchanged.

A score of 75 selects Else if. A score below 70, a missing result.score field, or an incompatible value type selects Else in this example.





Did this page help you?