Customizing JSON Input with Parameters | Online Help | Circuit | Input and Output Processing

Parameters

Parameters provide the ability to customize JSON input passed into a state by adding key–value pairs. These values can be static or dynamically derived from multiple sources such as Circuit Input, Config Store variables, the Context Object, or even generated dynamically using Faker.
Context Object is a unique JSON entity containing details about the state's execution. For further insights, refer to the Context Object section.

 

Parameters are available for the following states:

  • Function

  • Webhook

  • Task Engine

For better understanding, let's consider the following standard JSON input as an example:
{
"employee_details": {
"emp_name": "John Doe",
"emp_id": "357AEZ",
"email": "john.doe@example.com",
},
"department": "Engineering",
"start_date": "2024-04-01",
}

To extract specific information, you can define these parameters as given below in the code view:
{
"get_employee_details": {
"type": "function",
"next": "End",
"start": true,
"function_id": "<function_name>",
"parameters": {
"name": "$.employee_details.emp_name",
"ID": "357AEZ"
"execution_id": "$$.execution.id",
"auth_key": "${config_linkname}",
"dummy_city":  "${#random.address.city}"
}
}
}
With the given parameter configuration, the following JSON will be passed:
{
      "name": "John Doe",
      "ID": "357AEZ",
      "execution_id": "<runtime execution_id>",
      "auth_key": "<config_linkname>",
      "dummy_city": "North Carolina"
}

 



Next: Result Selector and Result Path