Rule Conditions

You can seamlessly build rule conditions using the no-code Rule editor over Nected.

Conditions would have 3 components:

1. Property

Click on propertydropdown to select the properties.

Nected support below attributes to be selected as property:

1. Custom Function

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:

{{.customInput.attributeName}} > {{.dataSet.attributeName}}

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.

2. Input Attributes

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

3. Global Attributes

These are attributes defined under remote config and can be usable across multiple rules. These can be referred to in any editor using token name starting with .globalVar

4. System Attributes

System attributes are provided by the system and are related to time and other system-related information.

5. DataSet Attributes

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

2. Operators

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.

DataTypeAvailable OperatorsDesc

Common/Generic

  1. Any

  2. Exists

  3. Doesn’t Exist

  4. Is Null

  5. Is not Null

Number

  1. Between

  2. Not Between

  3. Equals

  4. Not Equals

  5. Greater than

  6. Less than

  7. Greater than or equals

  8. Less than or equals

  9. Is Even

  10. Is Odd

String

  1. Equals

  2. Not Equals

  3. Contains

  4. Does not Contains

  5. Starts With

  6. Does not start with

  7. Ends with

  8. Doesn’t Ends with

  9. Is IN

  10. IS NOT IN

  11. Is Empty

  12. is not Empty

Dates or DateTime

  1. Between

  2. Not Between

  3. Equals

  4. Not Equals

  5. Greater than

  6. Less than

  7. Greater than or equals

  8. Less than or equals

Boolean

  1. Is False

  2. Is True

3. Values

Values can mostly be constants or tokens of the same datatype as property.

Error Handling

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.

Last updated