Formula

Multiple operations evaluating to a boolean

Definition

The formula is at the heart of the product. Users define formulas to specify the core of a scenario. Formulas are utilized in various areas, such as:

  • Trigger conditions
  • Rule creation
  • Variable filters

A formula is built using Operand and Operator concepts.

How to create a valid formula

A formula is a set of conditions, each defined by a valid operation that evaluates to a boolean value. Formula builders allow you to:

  • Add conditions
  • Remove existing conditions
  • Nest conditions
  • Condition editting interface

    Condition builder interface

You can define formulas in multiple places, but the most important ones are the trigger and rule formulas.

Trigger

πŸ“˜

WHERE .... AND ... AND ....

A trigger is a set of conditions. You can view the trigger as a logical AND operation that combines the results of each individual condition.

In this example, the second condition is invalid: the operation evaluates to a number which is not a boolean.

Example of trigger formula

Example of trigger formula

Rule

πŸ“˜

(IF ... AND ....) OR (IF .... AND .... AND ....)

A rule is a set of group, each defined by a set of conditions. You can view the rule as a logical OR operation, each OR operand being a AND logical operation.

In this example, the second block is incomplete (require at least one condition). In practice, you need to delete the second block or define a valid condition.

Example of rule formula

Example of rule formula


What’s Next

To build a formula, you need to create conditions. Creating conditions involves combining operands and operators