JSON Input Attributes
Last updated
Last updated
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.
Click on the "Add Input Attributes" button, and “1. Input Attributes” will be shown
Click on “+Add Field” and type in Name. Choose "Json" as the Data Type.
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.
The JSON Editor provides two modes for adding input data:
Raw Mode: This mode allows you to input raw JSON data directly. It's useful when you need precise control over the JSON structure.
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:
String: For alphanumeric data, such as names or addresses.
Numeric: For numbers, including integers and decimals.
Date: For date values without a time component, in the format YYYY/MM/DD (e.g., 2024/07/16).
DateTime: For date and time values, in the RFC3339 format (e.g., 2024-07-26T00:00:00+05:30).
Boolean: For true/false values.
JSON: To input raw JSON data.
List: To input a list of items, which could be numbers, JSON objects, or any other type.
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.
After saving click on "Save & Close"
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.
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