Format JSON Input
InsightConnect uses JSON to pass step input and output to other steps. We recommend that you configure input with InsightConnect’s Input Builder. If you require more advanced customization, you can directly edit the Input field.
Saving changes in the Input Builder will overwrite any input that existed previously. This includes any custom content configured prior in the input field.. Always stay consistent with your chosen method rather than mixing input configurations from both the Builder and the field.
Configure input with the Input Builder
The Input Builder formats any function variables and step variable input you provide with no coding required. Open the Input builder by clicking on the cog to the right of the Input field. To add input variables:
- Click + Add variable.
- Name the variable.
- Choose the data type of the variable.
- Click anywhere within the value field, then click the green + sign that appears.
- Choose one of the variables generated by previous steps. For object variables, you can add single objects or extract nested variables from the object. Click on the yellow text below the new + Add variable button to toggle between these two options.
- Create additional variables as needed by repeating steps 1-5.
- Click Save.
[Advanced] Configure input with the Input field
If you want to use custom configurations, you need to manually format the JSON syntax in the Input field. Read the rules below, then add input in the correct format.
Understand JSON Syntax
JSON objects consist of keys and values. Keys are used to reference the value in the
run function and are always formatted as strings enclosed in double quotes. Values can be one of three things:
- Strings, enclosed in double quotes
- InsightConnect variables by full name, enclosed in double quotes If you include multiple key/value pairs in your JSON object, separate each pair with a comma.
Format variables with JSON
To format variables directly in the Input field:
- Click anywhere within the Input field to expand it.
- Add function variables by typing them into the field as strings.
- Add an object to each function variable. You can either choose from existing steps by clicking on the green + sign in the bottom right corner of the box, or type in objects according to the syntax rules above.
- Double-check the JSON syntax to make sure your input follows the JSON rules above.
- Exit the Input field by clicking anywhere outside of it.