Conditions in an automation indicate whether the automation should continue or stop. There can be one or more conditions that a record (e.g., Account, Deal, etc.) needs to meet in order for individual automation Actions to take place. In this article, we will show you how to use conditions.
Each Action may be preceded by one or more sets of conditions separated by "Or". Conditions are set based on specific fields (for example, Name, Email, Status/Stage, Address, etc.) in the record that the automation is set for. In cases where the "Record is edited" Trigger is selected, the condition can be entered in the field value both before or after the change.
Operators
When adding conditions, we use operators that compare values from selected fields. There are two types of operators.
Mathematical (relational), which indicate the comparison of numerical values, i.e:
- greater than >
- less than <
- equal to =
Example: We have selected that the automation is triggered when a new Deal is created. The Deal should also meet two conditions. One specifies that the final price must be greater than 10,000.00 in the currency of the Deal and the other specifies that the estimated profit must be up to 5,000.00 in the currency of the Deal.
Example: Let's continue with the previous example, where we defined two conditions - the final price and the estimated profit of the new Deal. Now we will add some more conditions. Specifically, we need to define which currency the Deal needs to be in.
The conditions will be the following:
- The Deal currency has to be $.
- Classification 1 has to be filled in (regardless of the value).
- The Deal probability has to be 70% or more.
Logical operators, which allow you to set up the value of a field by:
- is/isn't
- contains, contains/does not contain all
- changed, changed to
- is/isn't filled in, etc.
Example: We can compare a retrieved dynamic value based on data from the previous step. This example shows that a new Meeting will be created only if the following condition is met - that a Contact from the first step (trigger) exists for the Quote in the third step.
Value
We add a value into a specific field that depends on the data type of that field (text, date, number, etc.). It is possible to add either an absolute or a dynamic value to the condition.
- An absolute value contains a specific value, a selection of data (e.g., a picklist item) or a specific record (e.g., an Account).
- A dynamic value is flexible and changes with the input data from the previous Action or Trigger.
The Select values from previous steps button will appear if there is a list of values available from a previous Action or Trigger. After selecting a value that is dynamic, a number will appear indicating from which step the value is taken. The color of the dynamic value item determines whether it is an Action » blue or a Trigger » green. A dynamic value allows you to compare both the original and new (changed) values from previous steps.
Example: Absolute and dynamic values can be combined within one condition. We have set that if a Sales Order is deleted, it is first checked if our condition is met:
- Sales Order currency is € - Absolute value
- Estimated costs are greater than the Profit - Dynamic value
- Sales Order status is Canceled - Absolute value
If the Sales Order meets all these conditions, we will receive an email notification. The content of the notification can include, for example, what the estimated costs and profit of the Sales Order were.
Condition criteria settings
The condition is defined based on the selected field and then compared to the selected value using an operator. If there is more than one condition defined, the order of the conditions does not matter. All conditions in one set must occur at the same time.
Adding conditions and settings
One or more conditions can be added to the automation. Within one set, conditions are composed based on the logical relation "AND" + Add condition. If you need to add two or more sets of conditions, each set will be separated by "OR". If the automation is to proceed to the next step, it is sufficient that either conditions from one or the other set are met. If neither set of conditions is met, the automation will end at that step and no further steps will follow.
One set of conditions
If you need all conditions in the set to be met at the same time, choose the AND relation. To do this, click the + ADD CONDITION button.
The example below shows one set in which the conditions are related with AND. All of these conditions must be met for the automation to proceed. The order of the conditions does not matter, they all have to be met at the same time.
Example: If the Deal stage is changed from Closing to Closed Won and the final price is greater than $10,000.00, e.g., a Task will be created.
Two or more sets of conditions
In case it is sufficient that at least one of the sets of conditions is met, choose the OR relation. In simple terms, if the first set of conditions is not met, but the second set of conditions is met, then the next step of the automation will take place. If neither the first nor the second set of conditions is met, the automation will end and the next steps will not take place.
Example: For the automation to proceed to the next step (e.g., creating a Meeting), at least one of the following sets of conditions must be met when an Account is edited:
- Either the Account is a current customer with the VIP category.
OR - Or the Account is a potential customer with a Business Relationship Value grater than $50,000 (the currency is based on the global settings of the instance).
Conditions based on previous steps
If you have more than one action in the automation, the list of fields will be expanded and contain items from each action. Depending on the type of trigger (e.g., record …is created, …is edited, …is deleted, etc.), a field selection will also be added.
Deleting and editing conditions
Delete a specific condition by clicking the gray X button to the right of the field. Edit the Values and Operators in the conditions however you want. Confirm the changes you have made by clicking the Save button.