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

Parameters

Parameters provide the ability to customize JSON input by adding a collection of key-value pairs as input to a task. These values can either be static or dynamically selected from the JSON input or the context object using specific paths. 

 

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": "357",
"email": "john.doe@example.com",
"position": "Software Engineer"
},
"department": "Engineering",
"start_date": "2024-04-01",
"manager": "Jane Smith"
}

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": "$.employee_details.emp_id"
"execution_id": "$$.execution.id",
"auth_key": "ec20c6b7-e117-4551-8395-e9189b0b738d"
}
}
}

With the given parameter configuration, the following JSON will be passed:

{
      "name": "John Doe",
      "ID": "357",
      "execution_id": "<execution_id of state>",
      "auth_key": "ec20c6b7-e117-4551-8395-e9189b0b738d"
}

 




    • Related Articles

    • Context Object

      Context Object is used to access runtime information during the Circuit execution. It contains data related to the circuit, state, execution, task, and more. By understanding its structure and how to access it, you can dynamically utilize runtime ...
    • JSON Path

      Path serves to locate specific parts or components within a JSON object. These paths start with the '$' symbol and follow JSONPath syntax. It is used to access particular elements or values within JSON objects passed in the Input Path, Output Path, ...
    • Task Engine

      In Qntrl, while public APIs can be configured and executed directly through Webhooks, the client's internal APIs that are exposed only to the local network can be executed using the Task Engine module in Bridge. The Task Engine configured in Bridge ...
    • Result Selector and Result Path

      Result Path and Result Selector are employed to extract dynamic data from the state's result when the execution is successful. Result Selector Result Selector lets you retrieve and process the runtime data, enabling flexible and dynamic data ...
    • Input Path

      Input Path enables you to filter and control the actual input passed to the state. By defining an Input Path (either in Builder View or Code View), using JSONPath notation, you can select a portion of the JSON input and use it for processing within ...

    You are currently viewing the help articles of Qntrl 3.0. If you are still using our older version and require guidance with it, Click here.