- IF conditions
Conditions
Contains
Starts with
Ends with
Does not contain
Does not start with
Does not end with
Equals
Does not equal
Greater than
Less than
Is true
Is not true
Is present
Is not present
IF conditions
IF conditions allow you to add more logic to your Recipe flow. Escalate urgent support tickets by checking the priority with an IF condition or use the IF condition to check for a valid email before sending an onboarding greeting.
IF conditions can be found in multiple features in AppConnect:
| Example |
---|---|
Trigger conditions | You can set IF conditions for your triggers to define what subset of trigger events should be processed by the recipe, e.g. only new Insightly accounts with the type "Customer", or only Leads with the rating "Hot". The trigger condition is set to only process new/updated cases with the status of "Closed”. |
Conditional action step | You can set IF conditions within your recipes to better define the workflow procesing logic, e.g. update the Zendesk organization if found, otherwise create new Zendesk organization. Recipe that uses conditional steps to decide whether to create or update Zendesk organization. |
Auto-retry feature in error monitor step | You can set IF conditions to determine when to carry out auto-retries, e.g. only auto-retry the steps in the Monitor block again if the error thrown is a timeout or a temporary network issue. Configuring the retry condition field. In this example, the actions in the Monitor block will only be carried out again if the error message does not contain the 401 error code. |
Conditions
Each condition consists of 3 parts - data, condition and value. Conventionally, the data (left-hand-side) is the variable data from your app, e.g. case status, or lead rating. Accordingly, the value (right-hand-side) is the static value you wish to check against, e.g. "Closed" or "Hot", correspondingly. Data and values are case sensitive.
In this article, we go through the 14 conditions you can choose from. We will be using trigger conditions as examples. Additionally, you can combine multiple conditions with the AND or OR operators to set up complex conditions.
Each condition will be valid for different data types. If a condition is attempted to be used for invalid data types, it might prevent the Recipe from starting successfully.
Furthermore, if an invalid IF condition was set up for triggers, the Recipe might:
throw a trigger error after the recipe has started, resulting in the inability to pick up trigger events, or
result in the recipe filtering out all trigger events.
Contains
This condition checks if the data contains the value. It is case-sensitive - make sure to downcase or upcase both before comparison if you are not concerned about case sensitivity. It works with any characters, numbers, words, letters, and symbols.
Valid types
This condition is only valid for array and string data types.
Trigger data | Condition/value | Picked up by recipe? |
---|---|---|
"UI bug" | contains "bug" | Yes |
"UI BUG" | contains "bug" | No |
"Instructions unclear" | contains "bug" | No |
"" | contains "bug" | No |
nil | contains "bug" | No |
12345 | contains 123 | No |
[1, 2, 3] | contains 1 | Yes |
[1, 2, 3] | contains [1, 3] | No |
["abc", "pqr", "xyz"] | contains "abc" | Yes |
["abc", "pqr", "xyz"] | contains ["abc", "pqr"] | No |
Starts with
This condition checks if the trigger data string begins with the value. It is case-sensitive - make sure to downcase or upcase both before comparison if you are not concerned about case sensitivity.
The Starts with condition searches only for exact matches, and null values will not be picked up.
Valid types
This condition is only valid for string data types.
Trigger data | Condition/value | Picked up by recipe? |
---|---|---|
"(408) 555-6928" | starts with "(408)" | Yes |
"408 555-6928" | starts with "(408)" | No |
"(650) 555-2395" | starts with "(408)" | No |
"" | starts with "(408)" | No |
nil | starts with "(408)" | No |
12345 | starts with 123 | Trigger error thrown |
numeric_type_pill | starts with 123 | Trigger error thrown |
numeric_type_pill | starts with "123" | Yes #if pill = 12345 |
Special non-string data type cases
When we try to compare non-string data types with a starts with condition, it will throw a trigger error. For example, comparing a number type with a number type will throw an error.
However, if the trigger data input field is a non-string datapill, and the value is a string, AppConnect converts the datapill's value into a string value for you and does the comparison, evaluating to true if the converted value meets the condition.
Ends with
This condition checks if the trigger data ends with the value. It is case-sensitive - make sure to downcase or upcase both before comparison if you are not concerned about case sensitivity. It works with any characters, numbers, words, letters, and symbols.
If the field you specify in your condition is left blank in the application you’re using, no event will be picked up.
Valid types
This condition is only valid for string data types.
Trigger data | Condition/value | Picked up by recipe? |
---|---|---|
"(408) 555-6928" | ends with "6928" | Yes |
"408 555-6928" | ends with "(6928)" | No |
"(650) 555-2395" | ends with "6928" | No |
"" | ends with "6928" | No |
nil | ends with "6928" | No |
12345 | ends with 345 | Trigger error thrown |
numeric_type_pill | ends with 345 | Trigger error thrown |
numeric_type_pill | ends with "345" | Yes #if pill = 12345 |
numeric_type_pill | ends with "345" | No #if pill = 123 |
Special non-string data type cases
When we try to compare non-string data types with a ends with condition, it will throw a trigger error. For example, comparing a number type with a number type will throw an error.
Comparing number types for ends with condition will throw a trigger error
However, if the trigger data input field is a non-string datapill, and the value is a string, AppConnect converts the datapill's value into a string value for you and does the comparison, evaluating to true if the converted value meets the condition.
Does not contain
This condition is the opposite of the contains condition. It checks if the trigger data DOES NOT contain the value. It is case-sensitive - make sure to downcase or uppercase both before comparison if you are concerned about case sensitivity.
If the field you specify is left blank in the application you are using, the Doesn’t contain condition will not count it, and no event will be picked up. This can be circumvented by using the Is true or Is not true conditions with a string formula, as shown in the Is true section below, or by pairing it with the Is present condition.
Valid types
This condition is only valid for array and string data types.
Trigger data | Condition/value | Picked up by recipe? |
---|---|---|
"UI bug" | doesn't contain "bug" | No |
"UI BUG" | doesn't contain "bug" | Yes |
"Instructions unclear" | doesn't contain "bug" | Yes |
"" | doesn't contain "bug" | Yes |
nil | doesn't contain "bug" | No |
12345 | doesn't contain 123 | No |
[1, 2, 3] | doesn't contain 1 | No |
[1, 2, 3] | doesn't contain [1, 3] | Yes |
["abc", "pqr", "xyz"] | doesn't contain "abc" | No |
["abc", "pqr", "xyz"] | doesn't contain ["abc", "pqr"] | Yes |
Does not start with
This condition is the opposite of the starts with condition. It checks if the trigger data string DOES NOT begin with the value. It is case-sensitive - make sure to downcase or uppercase both before comparison if you are concerned about case sensitivity.
If the field you specify is left blank in the application you are using, the Doesn’t start with condition will not count it, and no event will be picked up. As with the Doesn’t contain trigger condition, this can be circumvented by using a string formula with the Is true formula as shown in the Is true section below, or by pairing it with the Is present condition.
Valid types
This condition is only valid for string data types.
Trigger data | Condition/value | Picked up by recipe? |
---|---|---|
"(408) 555-6928" | doesn't start with "(408)" or "(669)" | No |
"408 555-6928" | doesn't start with "(408)" or "(669)" | Yes |
"(650) 555-2395" | doesn't start with "(408)" or "(669)" | Yes |
"" | doesn't start with "(408)" or "(669)" | Yes |
nil | doesn't start with "(408)" or "(669)" | No |
12345 | doesn't start with 123 | Trigger error thrown |
numeric_type_pill | doesn't start with 123 | Trigger error thrown |
numeric_type_pill | doesn't start with "123" | No #if pill = 12345 |
numeric_type_pill | doesn't start with "123" | Yes #if pill = 345 |
Special cases
Non-string data types
When we try to compare non-string data types with a doesn't start with condition, it will throw a trigger error. For example, comparing a number type with a number type will throw an error.
Comparing number types for doesn't start with condition will throw a trigger error
However, if the trigger data input field is a non-string datapill, and the value is a string, AppConnect converts the datapill's value into a string value for you and does the comparison, evaluating to true if the converted value meets the condition.
Nil/null
When the trigger data is nil (also known as null), the trigger event will not be picked up by the recipe, even if it seems like it matches the condition, e.g. nil doesn't end with "345".
Does not end with
This condition is the opposite of the ends with condition. It checks if the trigger data DOES NOT end with the value. It is case-sensitive - make sure to downcase or upcase both before comparison if you are not concerned about case sensitivity. It works with any characters, numbers, words, letters, and symbols.
If the field you specify is left blank in the application you are using, the Doesn’t end with condition will not count it, and no event will be picked up. Similar to the Doesn’t contain trigger condition, this can be circumvented by using a string formula with the Is true formula as shown in the Is true section below, or by pairing it with the Is present condition.
Valid types
This condition is only valid for string data types.
Trigger data | Condition/value | Picked up by recipe? |
---|---|---|
"(408) 555-6928" | doesn't ends with "6928" | No |
"408 555-6928" | doesn't ends with "(6928)" | Yes |
"(650) 555-2395" | doesn't ends with "6928" | Yes |
"" | doesn't ends with "6928" | Yes |
nil | doesn't ends with "6928" | No |
12345 | doesn't ends with 345 | Trigger error thrown |
numeric_type_pill | doesn't ends with 345 | Trigger error thrown |
numeric_type_pill | doesn't ends with "345" | No #if pill =12345 |
numeric_type_pill | doesn't ends with "345" | Yes #if pill =123 |
Special cases
Non-string data types
When we try to compare non-string data types with a doesn't end with condition, it will throw a trigger error. For example, comparing a number type with a number type will throw an error.
However, if the trigger data input field is a non-string datapill, and the value is a string, AppConnect converts the datapill's value into a string value for you and does the comparison, evaluating to true if the converted value meets the condition.
Non-string datapills will be converted to a string for comparison if value is a string.
Nil/null
When the trigger data is nil (also known as null), the trigger event will not be picked up by the recipe, even if it seems like it matches the condition, e.g. nil doesn't end with "345".
Equals
This condition checks if the trigger data equals the value. It is case-sensitive - make sure to downcase or upcase both before comparison if you are not concerned about case sensitivity. It works with any characters, numbers, words, letters, and symbols.
Valid types
This condition is valid for all data types, e.g. booleans, string, integers and floats, dates, arrays.
Trigger data | Condition/value | Picked up by recipe? |
---|---|---|
"Closed" | equals "Closed" | Yes |
"Closed" | equals "closed" | No |
"" | equals "Closed" | No |
"" | equals null | No |
'null' | equals nil | Yes |
nil | equals "Closed" | No |
12345 | equals 12345 | Yes |
12345 | equals "12345" | Yes |
6 - 1 | equals 5 | Yes |
"Closed".present? | equals true | Yes |
"Closed".present? | equals "true" | No |
"Closed".present? | equals 1 | No |
Special string conversion cases
When we try to compare a non-string data type trigger data to a string data type value, AppConnect will convert the trigger data into string for comparison, e.g. 12345 equals "12345" will evaluate to true.
Does not equal
This condition is the opposite of the equal condition. It checks if the trigger data DOES NOT equal the value. It is case-sensitive - make sure to downcase or uppercase both before comparison if you are concerned about case sensitivity. It works with any characters, numbers, words, letters, and symbols.
Valid types
This condition is valid for all data types, e.g. booleans, string, integers and floats, dates, arrays.
Trigger data | Condition/value | Picked up by recipe? |
---|---|---|
"Closed" | does not equal "Closed" | No |
"Closed" | does not equal "closed" | Yes |
"" | does not equal "Closed" | Yes |
"" | does not equal null | Yes |
'null' | does not equal nil | No |
nil | does not equal "Closed" | Yes |
12345 | does not equal 12345 | No |
12345 | does not equal "12345" | No |
6 - 1 | does not equal 5 | No |
"Closed".present? | does not equal true | No |
"Closed".present? | does not equal "true" | Yes |
"Closed".present? | does not equal 1 | Yes |
Greater than
This condition checks if the trigger data is greater than the value.
If value is set to a number, and the trigger data field has a null value, the recipe will raise a trigger error, as computationally, a number cannot be compared with a null value. To resolve this issue, add an is present condition along with the greater than condition.
Valid types
This condition is valid for string, date, timestamp, integer and number data types.
Trigger data | Condition/value | Picked up by recipe? |
---|---|---|
"2017-06-31T12:00:00.252805-07:00" | greater than "2017-12-31T12:00:00.252805-07:00" | No |
"2017-06-30T12:00:00.252805-07:00" | greater than "2017-01-31T12:00:00.252805-07:00" | Yes |
"2017-06-31" | greater than "2017-12-31" | No |
"2017-06-31" | greater than "2017-01-31" | Yes |
5 | greater than 10 | No |
5 | greater than 1 | Yes |
1.5 | greater than 10.5 | No |
1.5 | greater than 1.23 | Yes |
"abc" | greater than "abcde" | No #ASCII value comparison |
"abc" | greater than "a" | Yes #ASCII value comparison |
nil | greater than "2017-01-31T22:00:00.252805-07:00" | Trigger error thrown |
"2017-06-31" | greater than nil | Trigger error thrown |
nil | greater than 10 | Trigger error thrown |
1.5 | greater than nil | Trigger error thrown |
"abc" | greater than nil | Trigger error thrown |
Less than
This condition checks if the trigger data is less than the value.
If value is set to a number, and the trigger data field has a null value, the Recipe will raise a trigger error, as computationally, a number cannot be compared with a null value. To resolve this issue, add an is present condition along with the less than condition.
Valid types
This condition is valid for string, date, timestamp, integer and number data types.
Trigger data | Condition/value | Picked up by recipe? |
---|---|---|
"2017-06-31T12:00:00.252805-07:00" | less than "2017-12-31T12:00:00.252805-07:00" | Yes |
"2017-06-30T12:00:00.252805-07:00" | less than "2017-01-31T12:00:00.252805-07:00" | No |
"2017-06-31" | less than "2017-12-31" | Yes |
"2017-06-31" | less than "2017-01-31" | No |
5 | less than 10 | Yes |
5 | less than 1 | No |
1.5 | less than 10.5 | Yes |
1.5 | less than 1.23 | No |
"abc" | less than "abcde" | Yes #ASCII value comparison |
"abc" | less than "a" | No #ASCII value comparison |
nil | less than "2017-01-31T22:00:00.252805-07:00" | Trigger error thrown |
"2017-06-31" | less than nil | Trigger error thrown |
nil | less than 10 | Trigger error thrown |
1.5 | less than nil | Trigger error thrown |
"abc" | less than nil | Trigger error thrown |
Is true
This condition checks that the trigger data is true.
It can also be used to check that the formula provided in the trigger data input field evaluates to true. For example, you can convert string type datapills via string formulas into conditions that evaluates to a boolean.
Valid types
This condition is only valid for boolean data types. We can use this condition to check against a boolean datapill, or check against formula that evaluates to true or false.
Trigger data | Condition/value | Picked up by recipe? |
---|---|---|
pill.present? | is true | No #if pill has a nil or null value or is an empty string "" |
pill.present? | is true | Yes #if pill has a value |
"Advanced Solutions".include?("Solutions") | is true | Yes |
"Advanced Solutions".include?("solutions") | is true | No |
Is not true
This condition is the opposite of the is true condition. It checks that the trigger data IS NOT true.
It can also be used to check that the formula provided in the trigger data input field evaluates to false. For example, you can convert string type datapills via string formulas into conditions that evaluates to a boolean.
Trigger data | Condition/value | Picked up by recipe? |
---|---|---|
pill.present? | is not true | No #if pill has a nil or null value or is an empty string "" |
pill.present? | is not true | No #if pill has a value |
"Advanced Solutions".include?("Solutions") | is not true | No |
"Advanced Solutions".include?("solutions") | is not true | Yes |
Is present
This condition will check the trigger data. If there is data present, the trigger event will be picked up by the recipe. If input is null or an empty string, the trigger event will not be picked up by the Recipe.
Valid types
This condition is valid for all data types, e.g. booleans, string, integers and floats, dates, arrays.
Trigger data | Condition/value | Picked up by recipe? |
---|---|---|
"Advanced Solutions" | is present | Yes |
12345 | is present | Yes |
"" | is present | No |
nil | is present | No |
Is not present
This condition will check the trigger data. If there is data present, the trigger event WILL NOT be picked up by the recipe. If input is null or an empty string, the trigger event WILL be picked up by the Recipe.
Valid types
This condition is valid for all data types, e.g. booleans, string, integers and floats, dates, arrays.
Trigger data | Condition/value | Picked up by recipe? |
---|---|---|
"Advanced Solutions" | is not present | No |
12345 | is not present | No |
"" | is not present | Yes |
nil | is not present | Yes |