Reference
Article MarkdownReport an error

Action if_else

System ID: action_if_else

Description

Evaluates conditions and routes the scenario to the matching branch. Supports simple comparisons, AND/OR logic, placeholders, and setting constants in the block that matched. Order: ifelseifelse.

Events (scenario branches)

Event When it occurs
(name from config) A condition in an if / elseif / else block matched; the name comes from the event field or the condition mapping
default No condition matched and else has no event

Parameters

Parameter Type Required Default Description
if object no {} Main condition block
elseif object no {} Additional blocks (can be several)
else object no {} Default block if all conditions are false

Condition formats in a block:

  • simple: "{{param}}>3": "event_name"
  • AND: "and": ["{{a}}>=1", "{{b}}<=2"], "event": "e2"
  • OR: "or": ["{{a}}==1", "{{b}}==2"], "event": "e3"
  • constants: "set": {"key": "value"}
  • compare strings in single quotes: "'{{name}}'=='John'"

Configuration example

{
  "if": {
    "{{total}}>3": "gt3",
    "set": {
      "doubled": "(({{total}}*2))"
    }
  },
  "elseif": {
    "{{status}}!=1": "ne1"
  },
  "else": {
    "event": "fallback",
    "set": {
      "flag": "fallback"
    }
  }
}
Using your own AI agent?Install the open skill so your AI agent can work with current official ConnectiveOne documentation.Get the skillNeed support?Couldn’t find the answer or need help from the ConnectiveOne team? Create a request in Client Portal.Create a request