JSON Input Attributes

In addition to the existing data types options, Nected now supports a new Json data type, providing enhanced flexibility in defining custom input parameters for your rules.

With the new Json data type, you can now include Json objects as custom input parameters tailored to your rule.

Steps to get Started :

  1. Click on the "Add Input Attributes" button, and “1. Input Attributes” will be shown

  2. Click on “+Add Field” and type in Name. Choose "Json" as the Data Type.

  3. After selecting JSON as the Data Type, a JSON Editor will be shown. If it is not visible, it can be accessed by clicking on the JSON Editor button.

  4. The JSON Editor provides two modes for adding input data:

    1. Raw Mode: This mode allows you to input raw JSON data directly. It's useful when you need precise control over the JSON structure.

    2. Pretty Mode: This mode provides a more user-friendly interface, formatting the JSON data for easier readability and editing.

    Inside the JSON editor, you can add various data types, including:

    1. String: For alphanumeric data, such as names or addresses.

    2. Numeric: For numbers, including integers and decimals.

    3. Date: For date values without a time component, in the format YYYY/MM/DD (e.g., 2024/07/16).

    4. DateTime: For date and time values, in the RFC3339 format (e.g., 2024-07-26T00:00:00+05:30).

    5. Boolean: For true/false values.

    6. JSON: To input raw JSON data.

    7. List: To input a list of items, which could be numbers, JSON objects, or any other type.

  5. After adding the inputs, you can test them using the Test button. This allows you to validate the JSON structure and data types. Save your inputs once you are satisfied with the data.

  6. After saving click on "Save & Close"


Using JSON attribute in the rule

  1. After saving it, go to the Property tab and under Input Attributes. Json structure will be populated in a nested tree form with their data types mentioned on the right side along with the key names. The rule's conditions will be applied to the input data, generating a JSON output.

  2. Once you've defined your rule, the next step is to input specific Json parameters for testing. These parameters should be tailored to various scenarios, ensuring comprehensive evaluation. Upon providing the Json dataset, execute the test by clicking on the “Test Now” button .

The output reflects how the rule processed the provided parameters based on the defined conditions.

Note: This iterative testing process ensures the rule's reliability and robustness under different scenarios.

By following this process, you can define custom JSON input attributes efficiently within Nected, allowing you to focus on your rule's logic and conditions rather than manual data mapping

Last updated