Create Circuit in Qntrl | Qntrl | Circuit | Online Help | Create workflows with drag and drop interface

Create and Configure a Circuit

Circuits are visual workflows that help automate tasks across various modules in Qntrl. You can create circuits by using pre-built templates or by building them from scratch using Builder View or Code View.

Info

Common Circuit Functionalities  

  • Maximum of 500 Circuits can be created per organization.

  • A Circuit can contain 1 to 50 states.

  • Each circuit has a unique circuit ID, used in SDKs, APIs, and when nesting or batching circuits.

  • Circuits can be configured using:
    • Builder View (visual)
    • Code View (JSON)
  • Changes made in one view are automatically reflected in the other


Access Circuits

  1. Login to Qntrl.
  2. Navigate to Circuits (triangle node icon) in the left panel.
  3. Click:
    • New Circuit (available only when creating your first circuit), or
    • The + icon next to My Circuits (for creating additional circuits)
  4. Choose how you want to create the circuit:
    1. Choose from templates – Use pre-built templates with predefined states and logic
    2. Start from scratch – Create a circuit by defining states and logic manually
      

Create a Circuit Using Templates  

Pre-built templates help you launch automation flows quickly with minimal setup.

  1. Click Explore under the Choose from template option.

  2. Browse the list of available templates under Circuit Templates.

  3. Use the left pane to filter templates by category, if needed.

  1. Select a template that suits your requirement and preview its components.

  2. Click Use this Template button at the top right to install.

The installed Template will appear under My Circuits in the left pane.

Create a Circuit from Scratch  

This option lets you build a Circuit by manually defining states and logic.
  1. Click Create under the Start from scratch option.

  2. Specify a unique Name and add a Description for the Circuit.

  3. Click Save


A sample circuit with the Pass state and name as 'State1' will be created by default, and displayed as a visual workflow in Builder View

When you create the first state, the previous state and next state will be 'Start' and 'End' by default. You can click on the default state and configure in the builder view.



Similarly, in Code View, an equivalent JSON will be generated automatically. Using the icons at the top of the editor, you can view either the workflow graph alone or both the graph and code view simultaneously.


Once a circuit is created, a Circuit ID will be created for the Circuit. 

This ID is used to:
  • Reference the circuit in SDKs and APIs
  • Nest circuits using the Circuit state
  • Associate a Batch state with a circuit

Configure a Circuit

You can configure the Circuit in two different ways.

  • Builder View

  • Code View

Circuits are built with states using the drag-and-drop functionality in Builder View or with simple JSON construction in Code View. For every change made in Builder View, the equivalent JSON text is updated automatically in Code View, and vice versa. This can be observed by changing one view and then checking out the Circuit in the other.

 

In addition to defining the workflow structure, you can enforce JSON Schema–based validation for circuit and state data. See  Schema-Driven Data Validation and Protection  for details.
  

Configuring a Circuit in Builder View  

In Builder View, you can construct a circuit using the available states in the left pane. States are the building blocks of a circuit that perform actions, make decisions, or or simply pass the output from one state to another.

Circuit states are categorized into the following groups:

  • Flow Control
  • Functional
  • Notification
  • IT Orchestration
  • Data Transformation

To learn more about each state, refer to States of the Circuit.

Constructing a circuit in Builder View involves two steps:

  1. Add a State

  2. Define a State


Step 1: Add a State in Builder View

  1. In the right pane, click a category to display the states under it. Then, select a state and drag and drop it onto the visual workflow.
    This action prompts a pop-up window.
  2. Enter a unique name for the state.
  3. Select the Previous State and Next State between which the new state must be placed. 
    • Click CreateThe state will be displayed in the flow diagram.

          


    Step 2 : Define a State      

    1. Click a state in the visual workflow to configure it.
    2. In the right pane, perform the following configurations:
      • Edit the state name at the top, if required.
      • Under Configuration:
        • By default, the Type field displays the state type based on the selected state
        • You can retain the type or change it using the dropdown
        • If the state type is changed, any previously saved configurations will be reset
        • Based on the selected state type, the corresponding configuration fields are displayed.
        • The Next State field lists the available states to choose from
        • For supported states, configure error-handling options as required.
        • Refer to States of the Circuit to learn more about state-level configurations

      • Under Input / Output:

        • Configure the paths and parameters required for input and output processing

        • Refer to Input and Output Processing section for more details

    1. Click Save.

      Info
      Points to Ponder
      • Some state types include additional parameters:
        • Wait state → Duration
        • Batch  state → Collection Path, Collection Variable
        • Parallel state → Add Path
        • Branch state → Add Condition
      • All states, except Success and Failure, must have a Next State
      • The final state in a circuit is defined by setting the next state as End
      • Dynamic input parameters can be added:
        • For Function → using Add Parameter
        • For Webhook → using Add Parameter and Add Header                                                                                     


      Configuring a Circuit in Code View   

      In Code View, you can define the circuit using a structured JSON format. Switch to Code View using the code view icon in the builder. 

      When a circuit is created, a sample workflow with a Pass state (State1) is generated by default. 

      Understanding States in Code View

      • Each state is represented as a JSON object
      • The properties of the state are defined as key-value pairs

      Common properties include:

      • type – Defines the functionality of the state
      • next – Specifies the next state to execute
      Additional behavior:
      • If a state does not include the next field, it is considered the last state
      • If a state is not referenced as next by any other state, it is treated as the first state

      Ensure that the circuit follows standard JSON syntax.


      Constructing a circuit in code view involves the following steps:

      1. States are made up of attributes. Enter a state name.
      2. Define the attributes for the state as key-value pairs.
      3. Define the below common fields of the state
        1. name: All states must have a unique name to identify them within the Circuit. In the above displayed circuit
        2. type: The actual functionality of the state is referred to by its type
        3. next: The name of the next state to execute after the completion of the current state
      1. Configure additional attributes based on the state type. Refer to the States of the Circuit for details on each state.
      2. Configure error handling using the onError attribute.
      3. Specify the inputPath, outputPath, and resultPath for Input and Output processing
      4. Click Save.
      In the event of an error in JSON definition, a red cross mark [] will be displayed beside the error line. Upon hovering on the mark, the reason for the error will be displayed.

      Info
      Points to Ponder
      • Every Circuit must have one state with the field value start: true to represent the beginning state.
      • All States except Success and Failure must have a next state. The terminal state must have the next state value as End.
      • You can define the states in any sequence. The order of execution solely depends on the start and next fields.
      • All fields and their values are case-sensitive. Once you define a value, you must provide the exact value throughout the Circuit.
      • All the standard attribute names of the state (name keys represented in black in Code View) like type, next, duration, functionName, and collectionPath are expected in camel case.

      Types of Values You Can Use in Circuit Configuration   

      Whenever you configure a Circuit, whether defining Parameters, Input Path, Result Selector, or Output Path, you can supply values in any of the following ways:

      Static Values

      A fixed value provided directly in the configuration field.

      Example:

      Use static values for constants such as URLs, string literals, flags, or tokens.

      Config Store Values

      Retrieve centrally managed configuration values stored in Qntrl’s Config Store using variable references.

      Example:

      "base_url": "${<config_linkname>}"

      Refer to Config Store to learn how to create and use these variables.

      State Input Values

      Extract values directly from the state input using JSONPath.

      Example Input JSON:

      {
        "employee_details": {
            "emp_name": "John Doe",
            "emp_id": "357"
        }
      }

      Parameter usage:

      "name": "$.employee_details.emp_name",
      "ID": "$.employee_details.emp_id"
      Context Object

      Retrieve dynamic execution metadata such as circuit ID, execution ID, timestamps, origin, or requestor details.

      Example

       "execution_id": "$$.execution.id",
       "requested_by": "$$.requestor.email"

      These values reflect live execution context and allow building highly dynamic automations.

      Refer to Context Object for full structure.

      Faker  Values

      Generate randomized test values during execution, useful for test runs, demos, or simulating data.

      Faker method names must be in lower underscore case.

      "phone_number": "${#random.phone_number.cell_phone}",
      "city_name": "${#random.address.city}"

      Refer to the Faker Methods guide for the complete list of supported generators.




        • Related Articles

        • Introduction to States of Circuit

          States are the building blocks of a circuit that can perform tasks, make decisions, or simply pass the output from one state to another. The state defines a specific task or process that has to be executed in that segment of the circuit. Circuit ...
        • Features of Circuit

          Configure with or without code Circuit provides a platform to build workflow orchestrations with or without code. You can either visually design the Circuit schematics by dragging and dropping its elements in Builder View, or build its JSON code in ...
        • Error Handling

          In Qntrl Circuit, you can configure error handling while building a circuit. State definition errors are detected even before saving the circuit. When you save the circuit, a compilation check runs and lists out errors related to its state ...
        • Manage Circuits and States

          Dashboard The Dashboard provides a centralized view to monitor and track all Circuit executions across the system. It offers a consolidated snapshot of all workflow executions and their current statuses. To access the dashboard, Navigate to Circuits ...
        • Sample Use Case - Configuring Input and Output Processing in Circuit console

          Let's explore Input/Output Processing further by building a Circuit using the example of an Employee Onboarding Process. We initiate the process with the following state Input which contains information about the employee details for employee ...

        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.