Setting Conditions for Triggers
Conditions allow users to define specific criteria that must be met for a trigger to activate. Conditions can be set up using AND or OR logic, enabling flexible control over when automations are initiated.
Note: setting conditions for a trigger is optional
Types of Condition Logic
- AND Condition - All specified conditions must be true for the trigger to activate.
- OR Condition - One(or more) of the specified conditions must be true for the trigger to activate.
This flexibility lets users create highly specific or broad conditions depending on the needs of their workflows.
How to Set Up Conditions
Step 1: Add Conditions to the Trigger
1. After selecting the trigger type, scroll to the Conditions section.
2. Choose whether to use AND or OR conditions based on the automation requirements
Step 2: Define the Conditions
1. Click Add Condition and specify each condition's field, comparison operator, and value.
2. If using multiple conditions, ensure that each is properly defined to avoid unintended triggers.
Examples of Conditions
Using AND Conditions (All Conditions Must Be True)
When using AND conditions, the trigger will only activate if all specified conditions are met. This is useful when precise criteria are needed for automations to run.
Example:
Suppose an automation is needed to activate only when:
- Name is "Sample"
- Sample Type is "Virus"
Condition:
- Name = "Sample" AND
- Sample Type = "Virus"
Explanation: In this case, the automation will only trigger if both the sample’s name is "Sample" and the sample type is "Virus." If only one of these conditions is true, the automation will not activate.
Using OR Conditions (Any Condition Can Be True)
With OR conditions, the trigger will activate if any one of the specified conditions is met. This is useful when the user wants broader criteria for automations to run.
Example:
Suppose an automation is needed to activate if:
- Name is "Sample"
- Name is "Tube"
- Sample Type is "Virus"
Condition:
- Name = "Sample" OR
- Name = "Tube" OR
- Sample Type = "Virus"
Explanation: Here, the automation will trigger if any of these conditions is true. This means that if the sample's name is either "Sample" or "Tube," or if the sample type is "Virus," the trigger will activate. Only one of these conditions needs to be met.