Rule Conditions
Last updated
Last updated
You can seamlessly build rule conditions using the no-code Rule editor over Nected.
Conditions would have 3 components:
Click on property
dropdown to select the properties.
Nected support below attributes to be selected as property:
At Nected, we believe that systems should be configurable & flexible to adapt to any business need without a need to do anything from outside.
Hence, we have provided a Javascript (JS) editor to support any custom and specific condition(s) needed by your business and can't be built in a no-code editor. You can write any Javascript code using input attributes, global attributes, system attributes as well as dataset attributes as tokens.
Sample JS Formula:
Custom Function in conditions should return a boolean only otherwise it will throw a "syntax error" issue in the editor & will block the rule to get tested.
These are input attributes defined in Add Source and are passed as params in each Rule API. These can be referred to in any editor using token name starting with .customInput
These are attributes defined under Global Variables and can be usable across multiple rules. These can be referred to in any editor using token name starting with .globalVar
System attributes are provided by the system and are related to time and other system-related information.
These are attributes imported from Dataset columns. The type of columns too are derived from the database query directly. If you've selected a dataset as the source, you can use attributes from the dataset to form conditions within the rule. This allows you to leverage the data in your dataset for decision-making. These can be referred to in any editor using token name starting with .dataset
Nected provides various pre-configured operators that you can use with SimpleRules and DecisionTables.
The following table lists all the pre-configured operators and their available values.
Common/Generic
Any
Exists
Doesn’t Exist
Is Null
Is not Null
Number
Between
Not Between
Equals
Not Equals
Greater than
Less than
Greater than or equals
Less than or equals
Is Even
Is Odd
String
Equals
Not Equals
Contains
Does not Contains
Starts With
Does not start with
Ends with
Doesn’t Ends with
Is IN
IS NOT IN
Is Empty
is not Empty
Dates or DateTime
Between
Not Between
Equals
Not Equals
Greater than
Less than
Greater than or equals
Less than or equals
Boolean
Is False
Is True
List
Contains
Does not Contain
Is Empty
Is not Empty
Checks if the list contains a specific value.
Checks if the list does not contain a value.
Checks if the list is empty.
Checks if the list is not empty.
JSON
Has Key
Does not Have Key
Contains
Does not Contain
Checks if the JSON object contains a specific key.
Checks if the JSON object does not contain a specific key.
Checks if the JSON contains a specific value or key-value pair.
Checks if the JSON does not contain a specific value or key-value pair.
Values can mostly be constants or tokens of the same datatype as property.
In case of any issue in the condition, the Rule will show an error like mentioned below, and the Testing rule in staging will not be allowed till you fix the error. And since we don't allow rules to be published if not tested, publishing rules too would be blocked. This is to ensure that nothing wrong or bad goes into your production anyhow.