# Circuits -------------------------------------------------------------------------------- title: "Introduction" description: "Catalyst Circuits help you orchestrate and automate workflows and logic, and design their schematics through easy drag-and-drop." last_updated: "2026-03-18T07:41:08.637Z" source: "https://docs.catalyst.zoho.com/en/serverless/help/circuits/introduction/" service: "Serverless" -------------------------------------------------------------------------------- # Circuits ## Introduction Circuits is a Catalyst Serverless component that allows you to orchestrate tasks and automate workflows in Catalyst. A Catalyst circuit is essentially a JSON file that helps you systematically define and organize a sequence of tasks to be carried out automatically. With an execution engine powered by Catalyst, you can enable concurrent or sequential executions of Catalyst functions in a circuit, and additionally include conditions, data, and paths in the workflow to define a repeatable pattern of activities that achieves a business outcome. Circuits can be used to combine individual components of the application logic, manage multiple tasks in parallel, pass processed data between functions, or execute business actions based on a set of conditions. You can manage the coordination between the circuit components, and handle their dependencies, in accordance with the logical flow in the application. You can automate the execution of {{%link href="/en/serverless/help/functions/basic-io/" %}}Basic I/O functions{{%/link%}} in your Catalyst application using a circuit. You can either visually design the schematics of a circuit by dragging and dropping its elements, or build its JSON code in the Catalyst console. The console also enables you to test the execution of the circuit with different test cases and access detailed logs of each execution. {{%note%}}{{%bold%}}Note:{{%/bold%}} * Circuits is currently not available to Catalyst users accessing from the EU, AU, IN, JP, SA or CA data centers. * You will not be able to execute Cron, Event, or Advanced I/O functions in a Catalyst circuit. This is because Catalyst supports the input and output of a circuit in the JSON format, that is supported by the Basic I/O functions alone. {{%/note%}} To practice working with Catalyst Circuits, refer to {{%link href="/en/tutorials/museum-finder/introduction/" %}}this tutorial{{%/link%}}. ### SDK and API Documentation You can manually execute a circuit from the console, or trigger its execution using an API or through the Catalyst server SDKs. Refer to these SDK and API documentation for the code samples in Java, Node.js and Python environments, and the API details respectively. * {{%link href="/en/sdk/java/v1/serverless/circuits/execute-circuit" %}}Circuits - Java SDK{{%/link%}} * {{%link href="/en/sdk/nodejs/v2/serverless/circuits/execute-circuit" %}}Circuits - Node.js SDK{{%/link%}} * {{%link href="/en/sdk/python/v1/serverless/circuits/execute-circuit" %}}Circuits - Python SDK{{%/link%}} * {{%link href="/en/api/code-reference/serverless/circuits/execute-circuit/#ExecuteCircuit" %}}Circuits - API{{%/link%}} -------------------------------------------------------------------------------- title: "Key Concepts" description: "Catalyst Circuits help you orchestrate and automate workflows and logic, and design their schematics through easy drag-and-drop." last_updated: "2026-03-18T07:41:08.638Z" source: "https://docs.catalyst.zoho.com/en/serverless/help/circuits/key-concepts/" service: "Serverless" -------------------------------------------------------------------------------- # Key Concepts Before you learn about implementing Catalyst circuits, it is important to understand some fundamental concepts in detail. ### Components of a Circuit The workflow design of a Catalyst circuit contains various components that help you orchestrate the logic and data flow in it. #### Circuit States A state is a particular condition that the circuit is in, at a given point of time. It defines a specific task or process that is executed in that stage of the circuit. Circuit states can be broadly grouped under two categories: * {{%bold%}}Flow Controls:{{%/bold%}} The flow control states orchestrate the flow of logic and data in the circuit. The following flow control states are available in Catalyst circuits:<br /> * Pass * Branch * Parallel * Wait * Batch * Success * Failure * {{%bold%}}Functional:{{%/bold%}} The functional states define the actual operations that need to be executed in the circuit. The following functional control states are available in Catalyst circuits:<br /> * Function * Circuit We will discuss each of these states in detail in the {{%link href="#circuit-states-1" %}}next section{{%/link%}}. A circuit traverses from one state to the next during its execution in a step-by-step manner. Logic and data flow occurs between each state in the circuit. The following properties exist in the configuration of each state: * {{%bold%}}Previous state:{{%/bold%}} The state that was traversed previous to the current state * {{%bold%}}Next state:{{%/bold%}} The state that will be traversed after the current state The start of a circuit is marked by a key called {{%bold%}}Start{{%/bold%}}, and the end of the circuit is marked by a key called {{%bold%}}End{{%/bold%}}, in the {{%link href="#circuit-states-1" %}}circuit's schematic flow diagram{{%/link%}}. In the circuit's JSON code, if a state does not mention the {{%badge%}}next{{%/badge%}} key, it is the last state, and if a state is not referred as {{%badge%}}next{{%/badge%}} in any other states, it is the first state of the circuit. You can refer to {{%link href="#json-code" %}}this section{{%/link%}} for a sample JSON code snippet. #### Input, Output, and Result A Catalyst circuit, in general, accepts an input when it is initiated and provides an output after it has executed. These are called the circuit input and circuit output. * {{%bold%}}Circuit Input:{{%/bold%}} When you initiate the {{%link href="/en/serverless/help/circuits/implementation/#execute-a-circuit" %}}execution of a circuit{{%/link%}}, you will need to provide input to the circuit as key-value pairs in the JSON format. Since Basic I/O functions, which are the functional elements of a circuit, process input in the JSON format, the circuit input supports the same. This input provided during the initiation is passed to the first state in the circuit. * {{%bold%}}Circuit Output:{{%/bold%}} The input JSON is then processed and traversed through the states in the circuit, based on its workflow design and architecture. After the last state has been traversed, Catalyst generates the final output of the circuit obtained after its execution completes. You can view detailed execution logs and history of each execution from the console. You can manipulate the input JSON and provide custom input to each state for processing, or select a portion of the output from each state's processing to pass on to the next state based on your needs. You can also dynamically include the results of a processed state to the input JSON and pass it on. These are done by the following properties of a circuit state: * {{%bold%}}Input path:{{%/bold%}}<br /> The input path allows you to select a portion of the state's input, and it passes it to the state's task for processing. For example, let the input JSON of a state be: {{%code class="language-json"%}}{ name: Amelia Burrows gender: F age: 33 } {{%/code%}} If you only want to send the {{%badge%}}name{{%/badge%}} and {{%badge%}}gender{{%/badge%}} variables as the input to a state, say a function, you can configure the input path of the function as {{%badge%}}$.name,gender{{%/badge%}}. This refers to the JSON objects {{%badge%}}name{{%/badge%}} and {{%badge%}}gender{{%/badge%}} as the input path.<br /><br /> Catalyst imports the external {{%badge%}}{{%bold%}}JsonPath{{%/bold%}}{{%/badge%}} library to define the input path, output path, and the result path of a state in a circuit. Therefore, you can use all the expressions supported by {{%badge%}}JsonPath{{%/badge%}} in your path definitions. Refer to this {{%link href="https://github.com/json-path/JsonPath" %}}GitHub documentation on the {{%badge%}}JsonPath{{%/badge%}} syntax{{%/link%}}. * {{%bold%}}Output path:{{%/bold%}} The output path allows you to select a portion of the state's output, and it passes it on to the next state for processing. For example, let the output JSON of a state be: {{%code class="language-json"%}}[ 26, "John Kemper", { "streetAddress": "Sunshine Avenue", "city": "Austin", "postalCode": "630-0231" } ]{{%/code%}} You can select only the values of the {{%badge%}}age{{%/badge%}} and {{%badge%}}name{{%/badge%}} objects (26, John Kemper) from the output to pass on to the next state, by configuring the output path of the state as {{%badge%}}$.age,name{{%/badge%}}. * {{%bold%}}Result path:{{%/bold%}} The result path allows you to combine parts of the state's input and the result of the state's execution, as the output of the state. In other words, you can append the state's result to the input JSON provided to the state, and modify the JSON. You can then pass this modified JSON as the state's output to the next state for processing.<br /> For example, let a function in a circuit process an input JSON that contains two objects called {{%badge%}}presentDays{{%/badge%}} and {{%badge%}}totalWorkingDays{{%/badge%}}. The output of the function's processing generates a new value that is assigned to a variable called {{%badge%}}attendancePercentage{{%/badge%}} in its output.<br /> If you want to include the value obtained for {{%badge%}}attendancePercentage{{%/badge%}} to the original JSON, you can provide the result path as {{%badge%}}$.attendancePercentage{{%/badge%}}. The JSON will then be modified as:<br /> {{%code class="language-json"%}}[ 180, 200, 90 ]{{%/code%}} Where the value for {{%badge%}}presentDays{{%/badge%}} is 180, {{%badge%}}totalWorkingDays{{%/badge%}} is 200, and {{%badge%}}attendancePercentage{{%/badge%}} is 90. You can now pass this output to the next state for processing.<br /> {{%note%}}{{%bold%}}Note:{{%/bold%}} Not all states support all three of these properties. The next section provides details about the specific properties and configuration available for each state.{{%/note%}} ### Circuit States As discussed previously, the circuit states can be grouped as flow control states or functional states. Let's learn about each state in detail, and the configurations available for them. This is the _Builder View_ of a circuit. This section displays images of the configurations available for each state for your reference. To learn about the steps involved in creating a circuit and adding states in it, refer to the {{%link href="/en/serverless/help/circuits/implementation/" %}}Implementation section{{%/link%}}. #### Function The function state is a functional element that represents a Basic I/O function. The function states are the core elements of a circuit, where a large portion of the logic is processed. All the other flow control states help you manipulate and customize the functions processing in a circuit. You can enter names for all the states in a circuit, select their type, and select their next states while {{%link href="/en/serverless/help/circuits/implementation/#configure-a-circuit" %}}configuring the circuit{{%/link%}} in the console. You can delete a particular state by clicking {{%bold%}}Delete State{{%/bold%}} below the configuration window. When you select a function state, you can link it with a Basic I/O function configured in your Catalyst project by selecting it from the dropdown list. {{%bold%}}Error Handling:{{%/bold%}} The function state supports error handling to handle frequently occurring errors during the function execution. You can configure the actions to be taken during {{%bold%}}On TimeOut{{%/bold%}}, {{%bold%}}On Authorization Failure{{%/bold%}}, or {{%bold%}}On Execution Failure{{%/bold%}} errors. Click the checkbox of an error to enable it. All three error handlers support two default actions: Retry and Fallback. Click {{%bold%}}Retry{{%/bold%}} or {{%bold%}}Fallback{{%/bold%}} to enable them. The retry option ensures that the function execution is re-tried if that particular error occurs. You can configure the following properties in retry: * {{%bold%}}Delay:{{%/bold%}} Defines the time duration to wait before attempting the first retry * {{%bold%}}Attempt:{{%/bold%}} Defines the number of retry attempts to be made * {{%bold%}}Step Delay:{{%/bold%}} Defines the time duration to wait in between each attempt The fallback option is used to set the action to be performed when all retries fail. This allows you to choose another state in the circuit to fall back to, when the retries fail. Select a state from the drop down list to fallback to. Enter the path of the error trace under _Result_ in the {{%link href="https://github.com/json-path/JsonPath" %}}{{%badge%}}JsonPath{{%/badge%}} syntax{{%/link%}} while entering this value. If the retry attempts fail, the circuit is set to the state configured here, and the error trace is generated. Click {{%bold%}}Save{{%/bold%}} to save the handler. The error handlers of all three default errors (On TimeOut, On Authorization Failure, On Execution Failure) have the same actions and configuration. In addition to these default error handlers, you can define custom errors and handle the actions to occur upon receiving that error. You can code the function to process the custom error handler for a specific error that is met. Click {{%bold%}}Add Custom Error{{%/bold%}} under _Error Handling_ in the state's configuration. Enter a name for the custom error in the pop-up window's header. You can select either {{%bold%}}Error Code{{%/bold%}} or {{%bold%}}Error Message{{%/bold%}} as the exception type. Provide an exception value in both cases. This will be the error message or code displayed when the error occurs. You can enable and configure both Retry and Fallback for a custom error, like the default error handlers. Click {{%bold%}}Save{{%/bold%}} after configuring it. You can delete a custom error by clicking the {{%bold%}}delete icon{{%/bold%}}. Catalyst considers all HTTP status codes of the 200 series (200-299) as a successful execution for a Basic I/O function. If the function returns a status code in its response other than one of the 200 series, for example 502, Circuits will check the function's error handling configuration for a custom error handler match. If a match is found, the logic configured for it will be executed. If the error code has not been handled, the circuit execution will be considered as a failure. If you configure an error message, you can handle it however you need in the function's logic. {{%bold%}}Input/Output:{{%/bold%}} You can configure the input, output, and result paths of a function state, as discussed {{%link href="#components-of-a-circuit" %}}in this section{{%/link%}}. You can also pass configure individual parameters to be passed to a function from this section. You can select a specific set of parameters from the JSON circuit input to be passed to the function using the input path. For example, let the input JSON passed to a circuit be: {{%code class="language-json"%}}"personalDetails":{ "name":"Patricia Boyle", "age" : 26, "address":"13, Orchid Lane, NY" }, "company":"Zylker Corporation", "empDetails":{ "department":"Sales", "designation":"Sales Manager" } {{%/code%}} If you need to pass the entire input to a function that is configured in the circuit as its {{%link href="/en/serverless/help/circuits/implementation/#execution-history-of-a-circuit" %}}payload{{%/link%}}, you can {{%link href="/en/serverless/help/circuits/implementation/#configure-a-circuit" %}}pass it to the circuit{{%/link%}} in the default way, while initiating the circuit. The key-value pairs in this input will be passed as the function's parameters automatically. If you require only a certain set of parameters to be passed to the function, you can configure the key of the parameter set, in the input path. For example, to pass the {{%badge%}}company{{%/badge%}} and {{%badge%}}empDetails{{%/badge%}} parameters alone, you can provide the input path to the function as: $.company,empDetails using the {{%link href="https://github.com/json-path/JsonPath" %}}{{%badge%}}JsonPath{{%/badge%}} syntax{{%/link%}}. You can also choose individual parameters to be passed to the function using the _Parameters_ option. This option also allows you to pass additional values to the function that are not present in the JSON circuit input. Click {{%bold%}}Add Parameters{{%/bold%}} to add a parameter and value. For example, you can choose to pass only the name and designation to the function as parameters by configuring {{%badge%}}name{{%/badge%}} and {{%badge%}}designation{{%/badge%}} as the parameter keys and entering their paths in the {{%link href="https://github.com/json-path/JsonPath" %}}{{%badge%}}JsonPath{{%/badge%}} syntax{{%/link%}} as parameter values. You can remove a parameter by clicking {{%bold%}}Remove{{%/bold%}}. A {{%link href="/en/serverless/help/functions/basic-io/" %}}Catalyst Basic I/O function's response{{%/link%}} delivers the function's output using the key {{%badge%}}output{{%/badge%}}. When you configure a function in a circuit, you need not provide the {{%badge%}}output{{%/badge%}} key explicitly in the function's output path or result path. Catalyst handles it by default, and delivers the output value automatically. If the circuit is configured to pass the function's output to the next state after it, Catalyst automatically passes the output as the payload without any additional configurations. For example, this JSON output of a function, {{%code class="language-json"%}}[ 180, 90 ]{{%/code%}} is passed as the JSON input to the next state in the circuit as the payload during the circuit execution. The {{%link href="/en/serverless/help/circuits/implementation/#execution-history-of-a-circuit" %}}execution log{{%/link%}} of the circuit provides links to the function that was executed and to the {{%link href="/en/devops/help/logs/introduction/" %}}Catalyst Logs{{%/link%}} that contains the log of that specific function, for a function state. #### Circuit The circuit state is a representation of a nested circuit. You can process another circuit inside the parent circuit. When a circuit state is triggered, the child circuit is executed as configured in Catalyst Circuits. You can also have nested circuits inside a child circuit. This enables you to configure simple and independent circuits for different purposes, and nest them within each other, rather than configuring one complex circuit for a complicated workflow pattern. You can select the child circuit using its {{%link href="/en/serverless/help/circuits/implementation/#create-a-circuit" %}}reference name{{%/link%}} from the _Circuit Name_ drop down box in a circuit state. You will also be able to select the parent circuit itself for a circuit state. This executes the same circuit in a loop, whose logic you can configure. The circuit state also supports default error handlers, and custom error handlers, as the function state. However, unlike the function state, the circuit state has only one action for its default or custom error handler: Retry. Refer to the {{%link href="#function"%}}Functions section{{%/link%}} for information about retry and custom error handlers. You can write your own logic for the actions to be performed if all retry operations fail. For example, you code for the circuit to re-execute, or end it and send a notification about the issue. You can manipulate the JSON data that is passed through the circuit state by configuring its input path, output path, or the result path, as described in the {{%link href="#components-of-a-circuit" %}}previous section{{%/link%}} and in the {{%link href="#function"%}}Function state{{%/link%}}. The {{%link href="/en/serverless/help/circuits/implementation/#execution-history-of-a-circuit" %}}execution log{{%/link%}} of the circuit also provides a link to the nested circuit's log for easy reference. #### Pass The pass state is a flow control state that enables the data of a circuit to pass from one state to another. By default, it simply passes on the JSON input data from its previous state to its next state. <br /> You can manipulate the JSON data that is passed through a pass state by configuring its input path, output path, or the result path, as described in the {{%link href="#components-of-a-circuit" %}}previous section{{%/link%}}. For example, you can select a portion of the JSON data alone to be passed on to its next state by configuring its input path. The pass state also has a new property called {{%bold%}}result{{%/bold%}} in addition to the input, output, and result paths. This is not available for any other states. <br /> The result property enables you to append a new object to the JSON, and pass the modified JSON to the next state. For example, in an input JSON that contains the objects {{%badge%}}name{{%/badge%}}, {{%badge%}}age{{%/badge%}}, and {{%badge%}}gender{{%/badge%}}, you can append a new parameter called {{%badge%}}location{{%/badge%}} as {{%badge%}}$.location{{%/badge%}} in the pass state's result path. You can enter the value for location in the result box. The modified JSON will then contain the objects {{%badge%}}name{{%/badge%}}, {{%badge%}}age{{%/badge%}}, {{%badge%}}gender{{%/badge%}}, and {{%badge%}}location{{%/badge%}}. #### Branch The branch state enables you to set up conditions in the circuit's workflow, and execute tasks based on those conditions. You can create branches in the flow of the circuit if the input data meets a specific set of criteria, and execute different states in each branch. For example, assume that the output of the state prior to a branch in a circuit generates the values for a JSON object {{%badge%}}status{{%/badge%}} as {{%badge%}}complete{{%/badge%}} or {{%badge%}}incomplete{{%/badge%}}. If the {{%badge%}}status{{%/badge%}} is {{%badge%}}complete{{%/badge%}}, you require the circuit to traverse to a {{%link href="#success" %}}success state{{%/link%}}. If the {{%badge%}}status{{%/badge%}} is {{%badge%}}incomplete{{%/badge%}}, you require the circuit to traverse to a {{%link href="#failure" %}}failure state{{%/link%}}. To achieve this outcome, you can add a condition as {{%badge%}}$.status == 'complete'{{%/badge%}} and configure the 'Go To' to a success state. Similarly, you can add another condition as {{%badge%}}$.status=='incomplete'{{%/badge%}} and set it to a failure state. You can add a condition by clicking {{%bold%}}Add Condition{{%/bold%}}, then you can enter the condition and select the next state of that branch. Configure that state as the type that you require. You can remove a condition by clicking {{%bold%}}Remove{{%/bold%}}. The following operators are supported by Catalyst for the conditional statements in the branch state: <table class="content-table"> <thead> <tr> <th class="w30p"><strong>Operators</strong></th> <th class="w70p"><strong>Description</strong></th> </tr> </thead> <tbody> <tr> <td>==</td> <td>Left is equal to right (note that 1 is not equal to ‘1’)</td> </tr> <tr> <td>!=</td> <td>Left is not equal to right</td> </tr> <tr> <td>&lt;</td> <td>Left is less than right</td> </tr> <tr> <td>&lt;=</td> <td>Left is less than or equal to right</td> </tr> <tr> <td>&gt;</td> <td>Left is greater than right</td> </tr> <tr> <td>&gt;=</td> <td>Left is greater than or equal to right</td> </tr> <tr> <td>=~</td> <td>Left matches the regular expression [?(@.name =~ /foo.*?/i)]</td> </tr> <tr> <td>in</td> <td>Left exists in right [?(@.size in [‘S’, ‘M’])</td> </tr> <tr> <td>nin</td> <td>Left does not exist in right</td> </tr> <tr> <td>size</td> <td>Size of left (array or string) should match right</td> </tr> <tr> <td>empty</td> <td>Left (array or string) should be empty</td> </tr> </tbody> </table> The conditional statements also support the following built in functions: <table class="content-table"> <thead> <tr> <th class="w30p"><strong>Function</strong></th> <th class="w40p"><strong>Description</strong></th> <th class="w30p"><strong>Output</strong></th> </tr> </thead> <tbody> <tr> <td>min()</td> <td>Provides the min value of an array of numbers</td> <td>Double</td> </tr> <tr> <td>max()</td> <td>Provides the max value of an array of numbers</td> <td>Double</td> </tr> <tr> <td>avg()</td> <td>Provides the average value of an array of numbers</td> <td>Double</td> </tr> <tr> <td>stddev()</td> <td>Provides the standard deviation value of an array of numbers</td> <td>Double</td> </tr> <tr> <td>length()</td> <td>Provides the length of an array</td> <td>Integer</td> </tr> <tr> <td>sum()</td> <td>Provides the sum value of an array of numbers</td> <td>Double</td> </tr> </tbody> </table> You can also use the {{%link href="https://github.com/json-path/JsonPath" %}}{{%badge%}}JsonPath{{%/badge%}}{{%/link%}} syntax to access an object's path in the condition. The branch state has a default pathway that you can link with the next state of the entire branch state. If none of the configured conditions are met, the default branch is followed, and that state is executed. You can configure the {{%link href="#components-of-a-circuit" %}}input and output paths{{%/link%}} of a branch state as described previously. <br /> #### Parallel The parallel state enables you to process multiple states in parallel, instead of in a sequential manner. When you assign two states to be processed in parallel, both the processes are initiated at the same time, and their input, output, and results are processed and generated concurrently. The states are also exited at the same time. You can check the parallel processing from the {{%link href="/en/serverless/help/circuits/implementation/#execution-history-of-a-circuit" %}}execution logs{{%/link%}} after the circuit has been executed. For example, if you require two functions to be executed in parallel, you can add two states for them respectively, and configure them as paths in the parallel state. You can add paths in a parallel state for each state that needs to be executed in the parallel processing by clicking {{%bold%}}Add Path{{%/bold%}}. You can enter the name of the paths and configure the state types. {{%note%}}{{%bold%}}Note:{{%/bold%}} You will not be able to configure a success, failure, or another parallel state within a parallel state. This is because the success and failure states are end states and do not perform any tasks, and Catalyst does not support nested parallel states.{{%/note%}} You can configure the {{%link href="#components-of-a-circuit" %}}input, output, and result paths{{%/link%}} of a parallel state as discussed previously. #### Wait The wait state enables you to pause the execution of the circuit for a particular duration of time, before resuming it again and traversing to the next state. For example, if you require a function's execution to be triggered with a delay of three seconds after the processing of the previous state, you can use this. You can set the duration of delay in seconds in its configuration. <br /> You can configure the {{%link href="#components-of-a-circuit" %}}input and output paths{{%/link%}} of a wait state as discussed previously. <br /> #### Batch The batch state enables you to execute a function or a circuit in batches as multiple jobs in an iterative manner. Batch processing allows you to process a large volume of input or tasks in sets, so that the server is not overwhelmed with heavy loads. If the input contains an array of JSON objects, you can process each JSON object simultaneously using the batch state. This batch state enables the associated function or circuit to be triggered in parallel multiple times, based on the number of jobs configured. For example, if a Basic I/O function is configured to send an email to a large number of customers, you can process it in the batch state and set the number of jobs to 10, so that the function is executed 10 times simultaneously in a single iteration. When the 10 jobs have been executed, another 10 jobs are initiated in the next iteration. Since multiple instances of a function or a circuit are executed, this ensures that they do not face a timeout error. <br /> You can bind the batch state to a specific function or circuit, by choosing the bind type and the {{%link href="/en/serverless/help/circuits/implementation/#create-a-circuit" %}}circuit reference name{{%/link%}} or function name from the drop down lists. You can configure the following properties of a batch state: * {{%bold%}}Collection path:{{%/bold%}} The path that contains the JSON list, written in the {{%link href="https://github.com/json-path/JsonPath" %}}{{%badge%}}JsonPath{{%/badge%}} syntax{{%/link%}} * {{%bold%}}Collection variable:{{%/bold%}} The variable that is assigned to contain the JSON output For example, a JSON input contains a list of two JSON objects as an array as follows: {{%code class="language-json"%}}{ "userList":[{"name":"Paul"},{"name":"Max"}] }{{%/code%}} We pass this input to a batch that is associated with a function. We define the collection path as {{%badge%}}$.userlist{{%/badge%}}, indicating that the object containing the list array is available in that path. We enter the collection variable as {{%badge%}}user{{%/badge%}}, assigning it as the variable to hold the output. If we enter the number of jobs as 2, the associated function, which returns the {{%badge%}}name{{%/badge%}} object, is called two times parallelly and the input is passed to it. The output of the first iteration is generated as: {{%code class="language-json"%}}{ "userList": [{"name": "Paul" },{"name": "Max"}], "user":{"name": "Paul"} }{{%/code%}} The output of the second iteration contains the value of {{%badge%}}Max{{%/badge%}} assigned to the name parameter: {{%code class="language-json"%}}{ "userList": [{"name": "Paul" },{"name": "Max"}], "user":{"name": "Max"} }{{%/code%}} Both iterations happen simultaneously. If you assign {{%badge%}}$.userlist{{%/badge%}} in the result path of the batch, you can pass the output containing the JSON list to the next state. Catalyst can execute a maximum of 10 jobs in a batch state. You can define this in the batch's configuration. The batch state supports default and custom error handlers similar to the {{%link href="#circuit" %}}circuit state{{%/link%}}. It has one action for its default or custom error handler: Retry. Refer to the {{%link href="#function" %}}Function section{{%/link%}} for information about retry and custom error handlers. You can write your own logic for the actions to be performed if all retry operations fail. For example, you code for the circuit to re-execute, or end it and send a notification about the issue. You can configure the {{%link href="#components-of-a-circuit" %}}input, output, and result paths{{%/link%}} of a batch state. You can also pass parameters to the function being processed in the batch state dynamically, similar to the function state. Refer to the {{%link href="#function" %}}Function section{{%/link%}} for details. <br /> The {{%link href="/en/serverless/help/circuits/implementation/#execution-history-of-a-circuit" %}}execution log{{%/link%}} of the circuit provides links to the function or circuit that was executed, and to the {{%link href="/en/devops/help/logs/introduction" %}}Catalyst Logs{{%/link%}} that contains the log of that function, for a batch state. #### Success The success state is an end state that is used to determine the success of the previous operation or task executed in the circuit. It is used to represent a successful execution for the user's reference. For example, you could use the success state along with a failure state in a branch to mark the outcomes of two processes in it based on different conditions, or use it after a function execution to indicate the success of the execution. The success state does not have any configuration or properties, as it is the final state of that particular path in the circuit. You will not be able to set any next state after it. You will also not be able to configure an input path or output path for a success state. #### Failure The failure state is also an end state that is used to determine the failure of the previous operation or task executed in the circuit. It is used to represent a failed execution for the user's reference. You can use the failure state similar to the success state, and in other scenarios to mark the failure of a process or a task execution. You will not be able to set a next state for a failure state, as it is the final state of that particular path in the circuit. You can provide an error message and an optional reason in the state for your reference, if this state is traversed. You will not be able to configure an input path or output path for a failure state. ### JSON Code As mentioned earlier, you can also directly code a circuit in the JSON format from the console. The _Code View_ section enables you to work on the code directly. The code is automatically generated as you drag and drop states in the flow diagram. Refer to the {{%link href="/en/serverless/help/circuits/implementation/#configure-a-circuit" %}}Implementation section{{%/link%}} for more information. A state name is a JSON object and its properties are the key-value pairs of that object. Properties like {{%badge%}}type{{%/badge%}} and {{%badge%}}next{{%/badge%}} are commonly used for all states. If a state does not mention the {{%badge%}}next{{%/badge%}} key, it is the last state in the circuit. If a state is not referred as {{%badge%}}next{{%/badge%}} in any other states, it is the first state of the circuit. You must follow the standard JSON syntax while coding a circuit. A sample code snippet of circuit is shown below: ### Circuit URL When you create a circuit in your Catalyst project, a unique invocation URL will be generated for it automatically. You can trigger the circuit from this end point URL. You can implement this URL in your application's code or use it as you require. You can obtain the URL of a circuit {{%link href="/en/serverless/help/circuits/implementation/#configure-a-circuit" %}}from the console{{%/link%}}. A Circuit URL is in the following format: <p>https://project_domain_name.environment_type.zohocatalyst.com/baas/v1/project/_project_ID_/circuit/circuit_ID/execute</p> This URL must be invoked with the HTTP {{%badge%}}{{%bold%}}POST{{%/bold%}}{{%/badge%}} method. The {{%badge%}}project\_domain\_name{{%/badge%}} is the {{%link href="/en/getting-started/set-up-a-catalyst-project/environment-settings/" %}}domain name{{%/link%}} of your project. The {{%badge%}}environment\_type{{%/badge%}} is {{%badge%}}development{{%/badge%}}, if you are working in the {{%link href="/en/deployment-and-billing/environments/introduction/" %}}development environment{{%/link%}}. Otherwise, the {{%badge%}}environment\_type{{%/badge%}} is not present in the URL. -------------------------------------------------------------------------------- title: "Benefits" description: "Catalyst Circuits help you orchestrate and automate workflows and logic, and design their schematics through easy drag-and-drop." last_updated: "2026-03-18T07:41:08.653Z" source: "https://docs.catalyst.zoho.com/en/serverless/help/circuits/benefits/" service: "Serverless" -------------------------------------------------------------------------------- ### Benefits 1. {{%bold%}}Orchestrate and Automate Tasks{{%/bold%}}<br /> Catalyst circuits are highly beneficial in automating major portions of your application logic in elaborately designed workflows. The circuit triggers each configured state automatically, passes customized data to the states based on its configuration, handles the flow of application logic at every step, performs error handling and more. Your Catalyst application therefore executes in order as you orchestrate it. You can coordinate various individual components of your microservice to work together as you need, and enable collaboration between them. 2. {{%bold%}}Configure Complex Workflows Easily{{%/bold%}}<br /> The business requirements and workflows of a Catalyst application are translated into flow diagrams that are easy to comprehend and work on. The flow diagram of a circuit provides a quick glance over the application logic and helps you visualize it as a series of steps. It enables you to understand the circuit's flow without efforts, detect problem areas, modify its elements, arrange states or easily remove them without even writing code. Catalyst Circuits enhances your application design and evolves it as well-structured and organized. 3. {{%bold%}}Diagnose Errors and View Detailed Logs{{%/bold%}}<br /> The error handling functionality in a circuit, combined with compilation errors feature and detailed logs, enable you to easily diagnose and debug problems in the workflow. You can define custom actions to be taken during errors in the function, batch, and circuit states. This enables Catalyst to manage errors like execution timeouts and failure, and authorization failure automatically. Catalyst also displays compilation errors in a circuit's configuration before you even execute it. The detailed logs of each execution also provide the status of each state's task execution, the payload and parameters passed, and the responses and exceptions generated. You can also refer to {{%link href="/en/devops/help/logs/introduction/" %}}Catalyst Logs{{%/link%}} for individual function logs. 4. {{%bold%}}Write Less Code{{%/bold%}}<br /> Catalyst offloads responsibilities from Catalyst Basic I/O functions by implementing functionalities like conditional branching, delays, passing custom input, parallel execution, batch processing separately in circuits. This ensures that you build multi-step, feature-rich applications easily, by preventing you from writing extra or repeated code. You can assign repeatable actions and patterns in a circuit, orchestrate it according to your needs, and automate the execution of the circuit and all its task processes with less code. 5. {{%bold%}}Execute Circuits from the Console{{%/bold%}}<br /> You can execute circuits from the console to test its flow and verify the generated output. This feature allows you to provide different input JSON data for different test cases, view the circuit's processing in the flow diagram, and check reports of each state's execution and response, and more. Based on the results generated, you can easily reorganize or swap states, rearrange the steps, provide different inputs, and perform tests for different conditions to achieve desired outcomes. You can then implement the circuit in your application after you finalize its workflow design. -------------------------------------------------------------------------------- title: "Use Cases" description: "Catalyst Circuits help you orchestrate and automate workflows and logic, and design their schematics through easy drag-and-drop." last_updated: "2026-03-18T07:41:08.653Z" source: "https://docs.catalyst.zoho.com/en/serverless/help/circuits/use-cases/" service: "Serverless" -------------------------------------------------------------------------------- ### Use Cases Catalyst Circuits can be used for a variety of purposes in your Catalyst application. The following are some use cases of Catalyst circuits: * A data processing application implements Catalyst circuits to execute jobs involving a large volume of input data and heavy computations, and generates a large volume of output data. It uses the batch processing feature in the circuits to perform a robust and effective execution of the Basic I/O functions. The complex workflow is also broken down into multiple circuits that are nested within each other for a better organization of the application's logic. * An application that performs routine backups, installations, and upgrades periodically uses Catalyst circuits to automate the tasks to be executed in the background. The scheduling is handled by {{%link href="/en/cloud-scale/help/cron/introduction/" %}}Catalyst Cron{{%/link%}} and cron functions, and they are coded to trigger the circuit's API. The circuit handles all the recurring tasks like data synchronization and patch management automatically. It also responds to timeouts and errors, and retries failed tasks. * An event-driven application that sends custom emails to clients, and performs tasks based on the occurrence of specific events or conditions implements Catalyst circuits. It uses the branch functionality to execute different actions based on the conditions, and processes functions in parallel to achieve multiple outcomes simultaneously. Catalyst Circuits can also be implemented in the following scenarios: * Applications that contain distributed microservices for performing independent operations requiring occasional collaboration * Tools that consolidate and refine datasets from multiple data sources and perform detailed analytics * Applications that train and generate machine learning models * DevOps and IT automation tools that perform continuous integration and continuous deployment * Automating tasks such as report generation, inventory tracking, order fulfilment and tracking, receipt generation in e-commerce applications * Automating tasks such as user management, sending custom push notifications based on specific conditions, and user-generated file management in applications <br /> -------------------------------------------------------------------------------- title: "Implementation" description: "Catalyst Circuits help you orchestrate and automate workflows and logic, and design their schematics through easy drag-and-drop." last_updated: "2026-03-18T07:41:08.653Z" source: "https://docs.catalyst.zoho.com/en/serverless/help/circuits/implementation/" service: "Serverless" -------------------------------------------------------------------------------- # Implementation The implementation section covers configuring and testing a Catalyst circuit from the console. To implement circuits in your Catalyst application, refer to the {{%link href="/en/sdk/java/v1/serverless/circuits/execute-circuit/" %}}Java SDK{{%/link%}}, {{%link href="/en/sdk/nodejs/v2/serverless/circuits/execute-circuit/" %}}Node.js SDK{{%/link%}}, {{%link href="/en/sdk/python/v1/serverless/circuits/execute-circuit/" %}}Python SDK{{%/link%}} and {{%link href="/en/api/code-reference/serverless/circuits/execute-circuit/#ExecuteCircuit" %}}API documentation{{%/link%}}. ### Create a Circuit {{%note%}}{{%bold%}}Note:{{%/bold%}} Catalyst allows you to create upto 50 circuits in a project in the {{%link href="/en/deployment-and-billing/environments/introduction" %}}development environment{{%/link%}}. There are no upper limits for rule creation in the production environment.{{%/note%}} To create your first circuit in your project from the Catalyst console: 1. Navigate to {{%bold%}}Circuits{{%/bold%}} under *Orchestration* in the Catalyst Serverless console and click {{%bold%}}Create your first circuit{{%/bold%}}.<br /> <br /> 2. Enter a name for the circuit and click {{%bold%}}Create{{%/bold%}}.<br /> <br /> The circuit will be created and the _Builder View_ will open. <br /> You can click the arrow mark near the circuit's name to navigate to the _Circuits_ page. A unique {{%bold%}}Circuit ID{{%/bold%}} and a unique {{%bold%}}Circuit Reference Name{{%/bold%}} will be created for the circuit. This is the reference name that is used when you nest a circuit using the {{%link href="/en/serverless/help/circuits/key-concepts/#circuit" %}}circuit state{{%/link%}}, or when you associate a {{%link href="/en/serverless/help/circuits/key-concepts/#batch" %}}batch state{{%/link%}} to a circuit. The circuit ID is used to refer to the circuit when working with the SDKs and API. <br /> ### Configure a Circuit Let us now configure the circuit that we created. Click the circuit's name from the Circuits page to open the _Builder View_. You can now drag and drop states from the left panel to the circuit. <br /> When you drag and drop a state, a pop-up window will open. You can enter the details of the state, such as the state name, previous state, and next state in it. Click {{%bold%}}Create{{%/bold%}} to create the state. <br /> The state will be displayed in the flow diagram. You can now configure the state, provide input and output paths, remove parameters, delete states, and more. <br /> Refer to this {{%link href="/en/serverless/help/circuits/key-concepts/#circuit-states-1"%}}Key Concepts section on states{{%/link%}} for details about the configuration and properties available for each state. You can also change the view to horizontal, auto arrange the states in the flow diagram, zoom in, or zoom out using the icons on the right side. <br /> You can also click {{%bold%}}Code View{{%/bold%}} to view the auto-generated JSON code of the circuit. Any changes that you make in the code or in the diagram, will be reflected in the other automatically. You can click the {{%bold%}}refresh icon{{%/bold%}} if the live reflection is delayed. <br /> You can access the Circuit URL by clicking {{%bold%}}Get Invocation URL{{%/bold%}} from the bottom left corner. <br /> Once you have configured the circuit, click {{%bold%}}Save{{%/bold%}}. <br /> ### Circuit Compilation Errors Before you execute a circuit, Catalyst performs a compilation error check in the circuit's configuration or structure. When you click {{%bold%}}Save{{%/bold%}} or {{%bold%}}Save and Execute{{%/bold%}} after configuring a circuit, Catalyst will immediately run a compilation check on the circuit, and list out the errors in its state configurations, design, and logic flow. These are non-dependant and possible errors that Catalyst identifies before running the circuit with the input you provide. This will enable you to verify and perform fixes in your circuit's design and configuration even before you execute it. For example, in the circuit shown below, the parameters of two branch states have not been defined. Additionally, the states are configured in a cyclical loop without defining any conditions to end the loop. When you click {{%bold%}}Save{{%/bold%}} or {{%bold%}}Save and Execute{{%/bold%}} here, Catalyst will immediately display these errors as shown below. <br /> After you initiate a circuit's execution, Catalyst will be able to detect dynamic errors related to the test condition, data flow, and other run time issues, and provide you detailed logs of each event. This will be explained in the next section. ### Execute a Circuit You can execute a circuit with different test conditions and inputs, and view the generated results. To execute a circuit: 1. Click {{%bold%}}Save and Execute{{%/bold%}} from the bottom-right corner of the circuit's page. 2. Provide the {{%link href="/en/serverless/help/circuits/key-concepts/#input-output-and-result" %}}input for the circuit{{%/link%}} in the JSON format as key-value pairs and click {{%bold%}}Next{{%/bold%}}.<br /> <br /> 3. Provide a name for the test case and click {{%bold%}}Run{{%/bold%}}.<br /> <br /> You can view the live execution of the circuit from the {{%bold%}}View Graph{{%/bold%}} section. <br /> Once the circuit has been executed, you can view the execution details, such as the input, output, and the duration of the execution, from the right panel. You can click {{%bold%}}Stop Execution{{%/bold%}} to stop it at any time. <br /> You can view the paths that were traversed in the circuit, the status of each state represented by a color code mentioned at the top, and the overall status of the circuit execution as well. The _View Graph_ is a part of the execution history of the circuit. The next section covers details about it. <br /> ### Execution History of a Circuit You can access the execution history of a circuit any time by clicking {{%bold%}}View Execution History{{%/bold%}} on the top right corner from the circuit's page. This opens a list of all the executions of the circuit, along with their unique Execution ID and other details. <br /> You can open a particular execution to check its execution graph, the circuit's code, and the execution's logs. Click {{%bold%}}View Logs{{%/bold%}} to view the logs of the execution. <br /> The logs provide details of the task execution in each state. They display the following details: * {{%bold%}}Timeline:{{%/bold%}} Displays the date and time of a particular event in a state, along with icons to indicate the event type * {{%bold%}}State:{{%/bold%}} Refers to the {{%link href="/en/serverless/help/circuits/key-concepts/#circuit-states-1" %}}state{{%/link%}} in which a particular event is executed * {{%bold%}}Event:{{%/bold%}} Refers to the specific event that occurred in the state. The common events of all states include: _State Entered_, _Input Processing_, _Result Processing_, _State Exited_. Some states have additional custom events. For example, the wait state has a _State Time Waiting_ event that lasts until the wait time ends. The function state has _Function Triggered_ and _Function Executed_ events after the _Input Processing_ event. <br /><br /> The success and failure states only have _Success State Reached_ and _Failure State Reached_ events, since they are end states. The beginning and the end of the circuit executions are marked by _State Machine Triggered_ and _State Machine Executed_ events. * {{%bold%}}Payload:{{%/bold%}} Refers to the input JSON that is transmitted from one state to the next in the circuit. The payload of a state is its input which will be processed by it. * {{%bold%}}Parameter:{{%/bold%}} Refers to the additional parameters that are provided by the user. Parameters can be provided in the function and batch states. * {{%bold%}}Response:{{%/bold%}} Refers to the output generated by the state after its processing. If any values are given in the output path or the result path of the state, the output is modified accordingly. * {{%bold%}}Exception:{{%/bold%}} Refers to any exceptions that might be generated by the state. If the state's processing fails, you can view the exception details from here. The detailed log enables you to effectively assess failures and detect bugs in each state's execution in a circuit. As mentioned earlier, the logs of the function, circuit, and batch states contain links to the function's page, {{%link href="/en/devops/help/logs/introduction/" %}}Catalyst Logs{{%/link%}}, or to the nested circuit's logs for easy access. The {{%bold%}}View Code{{%/bold%}} section displays the circuit's code, along with the execution details. <br /> <br /> ### Rename a Circuit To rename a circuit from the Catalyst console: 1. Click the {{%bold%}}ellipsis icon{{%/bold%}} for the circuit in the _Circuits_ page, and click {{%bold%}}Rename{{%/bold%}}.<br /> <br /> 2. Enter a new name for the circuit and press {{%bold%}}Enter{{%/bold%}}.<br /> <br /> {{%note%}}{{%bold%}}Note:{{%/bold%}} You will not be able to modify the {{%link href="#create-a-circuit" %}}reference name{{%/link%}} of the circuit. You can only modify the circuit's name. {{%/note%}} <br /> ### Delete a Circuit To delete a circuit from the Catalyst console: 1. Click the {{%bold%}}ellipsis icon{{%/bold%}} for the circuit in the _Circuits_ page, and click {{%bold%}}Delete{{%/bold%}}.<br /> <br /> 2. Click {{%bold%}}Yes, Proceed{{%/bold%}} in the confirmation window.<br /> <br /> --- ## API Reference — Circuits -------------------------------------------------------------------------------- title: "Execute Circuit" description: "This API enables you to execute a Catalyst circuit configured in the remote console." last_updated: "2026-03-18T07:41:08.657Z" source: "https://docs.catalyst.zoho.com/en/api/code-reference/serverless/circuits/execute-circuit/" service: "Serverless" -------------------------------------------------------------------------------- {{% section path="/en/api/code-reference/serverless/circuits/execute-circuit/" id="ExecuteCircuit" %}} {{%divtag class="LeftContent"%}} # Circuits {{%link href="/en/serverless/help/circuits/introduction/"%}}Catalyst Circuits{{%/link%}} enable you to systematically define and organize a sequence of tasks to be carried out automatically in Catalyst. You can orchestrate tasks and automate workflows, and additionally include conditions, data, and paths in the workflow, to define a repeatable pattern of activities that achieves a business outcome using Circuits. Catalyst offers support for automating the execution of Basic I/O functions of your application using a circuit. {{%note%}} {{%bold class="bold-primary"%}}Note:{{%/bold%}} Circuits is currently not available to Catalyst users accessing from the EU, AU, IN, JP, SA or CA data centers.{{%/note%}} # Execute a Circuit ### Description This API enables you to execute a Catalyst circuit configured in the console by referring to its unique Circuit ID. You can pass the input to the circuit in the request JSON as described below. {{%note%}} {{%bold class="bold-primary"%}}Note:{{%/bold%}} You can {{%link href="/en/serverless/help/circuits/implementation/#create-a-circuit"%}}create, configure, and test a circuit{{%/link%}} from the Catalyst console.{{%/note%}} ### Request Details #### Request URL {{%request class="apiyellow" req="POST" %}}<p>{api-domain}/baas/v1/project/{project_id}/circuit/{circuit_id}/execute</p>{{%/request%}} {{%request_id id="api-domain" data="URL" %}}The DC-specific domain to access Catalyst API{{%/request_id%}} {{%request_id id="project_id" data="Numerical" %}}The {{%link href="/en/getting-started/set-up-a-catalyst-project/general-settings/"%}}unique ID{{%/link%}} of the project{{%/request_id%}} {{%request_id id="circuit_id" data="Numerical" %}}The {{%link href="/en/serverless/help/circuits/implementation/#create-a-circuit"%}}unique ID{{%/link%}} of the circuit{{%/request_id%}} #### Request Headers {{%scope%}} **Authorization:** Zoho-oauthtoken {oauth_token} {{%/scope%}} **Optional Headers** <br> {{%scope%}} **CATALYST-ORG:** {org_id} {{%/scope%}} {{%scope%}} **Environment:** Development {{%/scope%}} #### Scope {{%scope%}} ZohoCatalyst.circuits.EXECUTE {{%/scope%}} #### Request JSON Format You must send the input to the circuit as key-value pairs in the JSON format like this: {{%code class="language-json line-numbers"%}} { "key_1": "value_1", "key_2": "value_2", "key_3": "value_3", . . } {{%/code%}} {{%note%}} {{%bold class="bold-primary"%}}Note:{{%/bold%}} The circuit input is not mandatory. You can skip the input or pass it based on your circuit's purpose and logic.{{%/note%}} ### Response Details The response contains the result and the details of the executed circuit, such as the {{%badge%}}circuit_name{{%/badge%}}, the {{%badge%}}start_time{{%/badge%}} and {{%badge%}}end_time{{%/badge%}} of the execution, the {{%badge%}}instance_id{{%/badge%}}, along with the details of the input that was passed to the circuit and the output generated from the circuit's execution. {{%/divtag%}} {{%divtag class="RightContent"%}} {{% panel_without_adjustment header="Sample Request" class="language-bash" %}}curl -X POST \ https://api.catalyst.zoho.com/baas/v1/project/4000000006007/circuit/105000000180234/execute \ -H "Authorization: Zoho-oauthtoken 1000.910*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*16.2f*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*57" \ -d '[ { "email":"j.parker@zylker.com", "count":"20", "traveller_type":"Single", "rating":"5", "location":"New York", "suite":"Executive" } ]' {{% /panel_without_adjustment %}} {{% panel_without_adjustment header="Sample Response" class="language-json line-numbers"%}} { "status": "success", "data": { "id": "b3c91799-5c18-4626-9983-a2d6af237e20", "name": "Case 1", "start_time": "Aug 24, 2020 02:24 PM", "end_time": "Aug 24, 2020 02:24 PM", "status": "success", "status_code": 6, "execution_meta": {}, "circuit_details": { "name": "StayFinder", "ref_name": "StayFinder", "description": "", "instance_id": "ef9644a5-123a-438c-94d9-01b1bade8817" }, "input": { "email":"j.parker@zylker.com", "count":"20", "traveller_type":"Single", "rating":"5", "location":"New York", "suite":"Executive" }, "output": { "result": { "stay_list":{ "message":"Email has been sent successfully to j.parker@zylker.com", "status":"success" } } } } }{{% /panel_without_adjustment %}} {{% expand-container %}} {{% expand id="sdk_docs" header="SDK Documentation"%}} {{%link href="/en/sdk/java/v1/serverless/circuits/execute-circuit"%}}Execute a Circuit- Java SDK{{%/link%}}</br></br> {{%link href="/en/sdk/nodejs/v2/serverless/circuits/execute-circuit"%}}Execute a Circuit- Node.js SDK{{%/link%}}<br><br> {{%link href="/en/sdk/python/v1/serverless/circuits/execute-circuit"%}}Execute a Circuit- Python SDK{{%/link%}} {{%/expand%}} {{%/expand-container%}} {{%/divtag%}} {{%/section%}} --- ## SDK — Java — Circuits -------------------------------------------------------------------------------- title: "Execute Circuit" description: "This page describes the method to make use of circuits to organize and orchestrate tasks in your Java application with sample code snippets." last_updated: "2026-03-18T07:41:08.662Z" source: "https://docs.catalyst.zoho.com/en/sdk/java/v1/serverless/circuits/execute-circuit/" service: "Serverless" related: - Execute Circuit - API (/en/api/code-reference/serverless/circuits/execute-circuit/#ExecuteCircuit) - Circuits (/en/serverless/help/circuits/introduction) -------------------------------------------------------------------------------- # Execute a Circuit {{%link href="/en/serverless/help/circuits/introduction" %}}Catalyst Circuits{{%/link%}} allow you to define, organize, and orchestrate a sequence of tasks to be carried out automatically. You can enable concurrent or sequential executions of Catalyst functions in a circuit, and additionally include conditions, data, and paths in it and automate the workflow. {{%note%}}{{%bold%}}Note:{{%/bold%}} Circuits is currently not available to Catalyst users accessing from the EU, AU, IN, JP, SA or CA data centers.{{%/note%}} The sample code below illustrates executing a circuit by referring to its unique Circuit ID and passing key-value pairs as the input JSON to the circuit. It also illustrates obtaining the circuit's execution details by referring to its unique {{%badge%}}Execution ID{{%/badge%}} saved in the execution history of the circuit. {{%badge%}}ZCCircuitDetails{{%/badge%}} is used to refer to the circuit, and {{%badge%}}ZCCircuitExecutionDetails{{%/badge%}} returns the circuit execution details. #### Sample Code Snippet <br> {{% panel_without_adjustment header="Package Imports" class="language-java line-numbers" %}}import org.json.simple.JSONObject; import com.zc.component.circuits.ZCCircuit; import com.zc.component.circuits.ZCCircuitDetails; import com.zc.component.circuits.ZCCircuitExecutionDetails; import com.zc.component.circuits.ZCCircuitExecutionStatus;{{% /panel_without_adjustment %}} {{%code class="language-java" scroll="set-scroll" %}}//Executes the circuit by referring to its Circuit ID and passes the input JSON ZCCircuitDetails userBackupCircuit = ZCCircuit.getInstance().getCircuitInstance(1239000000L); JSONObject execInputJson = new JSONObject(); execInputJson.put("key", "value"); ZCCircuitExecutionDetails circuitExecution = userBackupCircuit.execute("Case 1",execInputJson); String executionId = circuitExecution.getExecutionId(); //Returns the Execution ID //Returns the circuit's execution details by referring to the Execution ID of the circuit. //You can write your own success logic here. ZCCircuitDetails userBackupCircuit = ZCCircuit.getInstance().getCircuitInstance(1239000000L); ZCCircuitExecutionDetails circuitExecution = userBackupCircuit.getExecutionDetails(executionId); if(circuitExecution.getStatus().equals(ZCCircuitExecutionStatus.SUCCESS)) { //Success logic } //Aborts the circuit execution by referring to the Execution ID of the circuit ZCCircuitDetails userBackupCircuit = ZCCircuit.getInstance().getCircuitInstance(1239000000L); userBackupCircuit.abortExecution(executionId); {{%/code%}} --- ## SDK — Node JS — Circuits -------------------------------------------------------------------------------- title: "Execute Circuit" description: "This page describes the method to make use of circuits to organize and orchestrate tasks in your Java application with sample code snippets." last_updated: "2026-03-18T07:41:08.663Z" source: "https://docs.catalyst.zoho.com/en/sdk/nodejs/v2/serverless/circuits/execute-circuit/" service: "Serverless" related: - Execute Circuit - API (/en/api/code-reference/serverless/circuits/execute-circuit/#ExecuteCircuit) - Circuits (/en/serverless/help/circuits/introduction) -------------------------------------------------------------------------------- # Execute a Circuit {{%link href="/en/serverless/help/circuits/introduction/" %}}Catalyst Circuits{{%/link%}} allow you to define, organize, and orchestrate a sequence of tasks to be carried out automatically. You can enable concurrent or sequential executions of Catalyst functions in a circuit, and additionally include conditions, data, and paths in it and automate the workflow. {{%note%}}{{%bold class="bold-primary" %}}Note:{{%/bold%}} Circuits is currently not available to Catalyst users accessing from the EU, AU, IN, JP, SA or CA data centers.{{%/note%}} The sample code below illustrates executing a circuit by referring to its unique Circuit ID and passing key-value pairs as the input JSON to the circuit. It also illustrates obtaining the circuit's execution details by referring to its unique {{%badge%}}Execution ID{{%/badge%}} saved in the execution history of the circuit. The {{%badge%}}circuit{{%/badge%}} reference used below is defined in the {{%link href="/en/sdk/nodejs/v2/serverless/circuits/get-a-component-instance/" %}}component instance page{{%/link%}}. {{%code class="language-javascript line-numbers" scroll="set-scroll" %}}//Executes the circuit by referring to its Circuit ID and passes the input JSON circuit.execute('195000000041001', 'sampleName', { name: 'Aaron Jones'}).then((result) => { console.log(result); }).catch((err) => console.log(err.toString())); //Written to Catalyst logs //Returns the circuit's execution details by referring to the Circuit ID and Execution ID circuit.status('195000000041001', '195000000043002').then((result) => { console.log(result); }).catch((err) => console.log(err.toString())); //Written to Catalyst Logs //Aborts the circuit execution by referring to the Circuit ID and Execution ID circuit.abort('195000000041001', '195000000043002').then((result) => { console.log(result); }).catch((err) => console.log(err.toString())); //Written to Catalyst Logs {{% /code%}} A sample response that you will receive is shown below. The response is the same for both versions of Node.js. #### Node.js {{%code class="language-javascript line-numbers" scroll="set-scroll" %}}{ id: "b3e2f61e-4795-428e-8365-3609bf2b5606", name: "Name", start_time: "Aug 18, 2021 07:35 PM", status: "running", status_code: 1, execution_meta: {}, circuit_details: { name: "NewCircuit", ref_name: "newcircuit", description: "", instance_id: "70454fc5-3bf6-45af-81ca-2742cc049698" }, input: { name: "Aaron Jones" } }{{% /code%}} -------------------------------------------------------------------------------- title: "Get Circuit Instance" description: "This page describes the method to make use of circuits to organize and orchestrate tasks in your NodeJS application with sample code snippets." last_updated: "2026-03-18T07:41:08.663Z" source: "https://docs.catalyst.zoho.com/en/sdk/nodejs/v2/serverless/circuits/get-a-component-instance/" service: "Serverless" related: - Circuits (/en/serverless/help/circuits/introduction) -------------------------------------------------------------------------------- # Circuits ### Get component instance The {{%badge%}}circuit{{%/badge%}} reference can be created in the following way. This does not fire a server-side call. {{%note%}}{{%bold class="bold-primary" %}}{{%/bold%}} Circuits is currently not available to Catalyst users accessing from the EU, AU, IN, JP, SA or CA data centers.{{%/note%}} {{%code class="language-javascript" scroll="set-scroll" %}}//Get a circuit instance let circuit = app.circuit();{{%/code%}} --- ## SDK — Python — Circuits -------------------------------------------------------------------------------- title: "Get Component Instance" description: "This page describes the method to make use of circuits to organize and orchestrate tasks in your Python application with sample code snippets." last_updated: "2026-03-18T07:41:08.664Z" source: "https://docs.catalyst.zoho.com/en/sdk/python/v1/serverless/circuits/get-a-component-instance/" service: "Serverless" related: - Circuits Help (/en/serverless/help/circuits/introduction) -------------------------------------------------------------------------------- # Circuits {{%link href="/en/serverless/help/circuits/introduction" %}}Catalyst Serverless Circuits{{%/link%}} is a component that is a part of the Catalyst development platform that helps to orchestrate tasks and automate workflows. You can enable concurrent or sequential executions of Catalyst functions in a circuit, and additionally include conditions, data, and paths in the workflow, to define a repeatable pattern of activities that achieves a business outcome. This section covers the various SDK methods that can be used to implement the circuits component in your Catalyst application. {{%note%}}{{%bold class="bold-primary" %}}Note:{{%/bold%}} Circuits is currently not available to Catalyst users accessing from the EU, AU, IN, JP, SA or CA data centers.{{%/note%}} #### Get a component instance A component instance is an object that can be used to access the pre-defined configurations specific to a particular component. This process will not fire a server-side call. The {{%badge%}}app{{%/badge%}} reference used in the code below is the {{%link href="/en/sdk/python/v1/setup/#initializing-the-sdk" %}}Python object{{%/link%}} returned as a response during SDK initialization. You can create a new {{%badge%}}circuit{{%/badge%}}instance as shown below. Also note that this component instance will be used in multiple scenarios while implementing the circuit component in your application. {{%code class="language-python" scroll="set-scroll" %}}#Get a circuit component instance circuit = app.circuit() {{%/code%}} -------------------------------------------------------------------------------- title: "Execute Circuit" description: "This page describes the method to make use of circuits to organize and orchestrate tasks in your Python application with sample code snippets." last_updated: "2026-03-18T07:41:08.664Z" source: "https://docs.catalyst.zoho.com/en/sdk/python/v1/serverless/circuits/execute-circuit/" service: "Serverless" related: - Execute Circuit - API (/en/api/code-reference/serverless/circuits/execute-circuit/#ExecuteCircuit) - Circuits Help (/en/serverless/help/circuits/introduction) - SDK Scopes (/en/sdk/python/v1/sdk-scopes) -------------------------------------------------------------------------------- ### Execute a Circuit The sample code below illustrates executing a circuit by referring to its unique circuit ID and passing key-value pairs as the input to the circuit in the form of a dictionary. To know more about the component instance {{%badge%}}circuit_service{{%/badge%}} used below, please refer to {{%link href="/en/sdk/python/v1/serverless/circuits/get-component-instance/" %}}this help section{{%/link%}}. **Parameters Used** <table class="content-table"> <thead> <tr> <th class="w20p">Parameter Name</th> <th class="w20p">Data Type</th> <th class="w60p">Definition</th> </tr> </thead> <tbody> <tr> <td>{{%badge%}}circuit ID{{%/badge%}}</td> <td>Numeric</td> <td>A {{%bold%}}Mandatory{{%/bold%}} parameter. Will store the unique ID the circuit to be executed.</td> </tr> <tr> <td>{{%badge%}}circuit input{{%/badge%}}</td> <td>Object</td> <td>A {{%bold%}}Mandatory{{%/bold%}} parameter. Will store the dictionary that contains the input to the cricut.</td> </tr> </tbody> </table> {{%code class="language-python" scroll="set-scroll" %}}#Execute a circuit circuit = app.circuit() result = circuit.execute(5249000000108030, name="Test_Circuit") {{% /code%}} A sample response is shown below : {{%code class="language-json line-numbers" scroll="set-scroll" %}}{ "id":"5249000000108030", "name":"Test_Circuit", "start_time":"Aug 18, 2021 07:35 PM", "status":"running", "status_code":1, "execution_meta":{ }, "circuit_details":{ "name":"Test_Circuit", "ref_name":"testcircuit", "description":"", "instance_id":"70454fc5-3bf6-45af-81ca-2742cc049698" }, "input":{ "name":"Aaron Jones" } } {{% /code%}} {{%note%}}{{%bold%}}Info :{{%/bold%}} Refer to the {{%link href="/en/sdk/python/v1/sdk-scopes" %}}SDK Scopes table{{%/link%}} to determine the required permission level for performing the above operation.{{%/note%}}