Roboteka
Roboteka · Catalog · Ternary (if-then-else)

Ternary (if-then-else)

The Ternary robot compares two values and returns one of two preset results using an if-then-else scheme in Bitrix24 business processes and robots. It takes values A and B, an operator (eq, neq, gt, lt, contains, is_empty and more) and both result options, returning the chosen value plus a Y/N condition flag.

The robot performs an if-then-else choice: it compares value A with value B using the selected operator and returns either the true-value or the false-value. Supported operators: eq, neq, gt, lt, gte, lte, contains, not_contains, starts_with, ends_with, is_empty, not_empty and matches (regular expression); numbers are compared numerically, strings are case-insensitive by default. Typical use cases: inserting the right salutation into an email depending on a contact field; picking a notification text by deal amount without a chain of Condition blocks. It returns two values: the chosen result to write into a field or use in the next step text, and a Y/N flag for conditional branching of the business process.

What input parameters does the robot accept?

Parameter Type Required? Default
Value A string yes
Operator: == / != / < / > / <= / >= / contains / starts_with / ends_with / is_empty / not_empty / matches string yes
Value B (not needed for is_empty / not_empty) string
Return if condition is true string yes
Return if condition is false string
Case-sensitive string comparison (Y/N, default N) string

What does the robot return?

Parameter Type
Result (value_true or value_false) string
Condition met (Y/N) string

Scenario: notification text based on deal amount

  1. A deal moves to the Invoice sent stage
  2. The robot compares the deal amount with a 500000 threshold using the gt operator
  3. The manager notification gets either VIP client or Standard inserted

Related robots

Related articles