Online Help | Circuit | Qntrl | Exploring Input/Output Processing in Circuit Building: A Practical Example

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 onboarding:

{
      "employee_details": {
            "emp_name": "John Doe",
            "emp_id": "357",
            "department": "Engineering",
            "role": "Software Engineer"
      },
      "onboarding": {
            "phase": "Employee Onboarding",
            "start_date": "2023-08-01",
            "manager": "Jane Smith",
            "location": "NewYork"
      }
}
Now, let's define Input & Output processing fields (in Code view) for the above process:
{
      "onboard_employee": {
            "type": "function",
            "next": "End",
            "start": true,
            "function_id": "function_emp_onboard_1",
            "parameters": {
                  "name": "$.employee_details.emp_name",
                  "ID": "$.employee_details.emp_id",
                  "department": "$.employee_details.department"
            },
            "input_path": "$.employee_details",
            "result_selector": {
                  "task_status": "$.SdkResponseMetadata.HttpStatusCode"
            },
            "result_path": "$.onboarding_result",
            "on_error": [
            {
                  "error_type": "timeout_error",
                  "fallback": {
                        "next": "End",
                        "error_path": "$.error",
                        "error_selector": {
                              "error_code": "EXC_TME_EXC",
                              "error_message": "Execution Time Limit Exceeded"
                        }
                  }
            }
            ],
            "output_path": "$.employee_details"
      }
}

 

The below images illustrate how the I/O processing fields are configured for the above example in both builder view and code view.

Builder View

Code View

 

In this setup:

  1. Input Path: Initially filters the JSON to retain only the $.employee_info object, focusing on employee details.

  1. Parameters: Passes specific employee-related data (employee_id, employee_name, department, role) to the onboarding function.

  1. Result Selector: Extracts the HTTP status code from the response of the Function state, providing insights into the success or failure of the onboarding process.

  1. Result Path: Appends the onboarding result as a child of the employee_info node in the original input JSON ($.onboarding_result).

  1. Error Selector and Error Path: Capture and store error details in case of any issues during the onboarding process.

  1. Output Path: Specifies that the final result passed to the next state is $.employee_info, ensuring only relevant employee information is carried forward.

After processing, the resulting JSON output for the next state would look like this:
{
      "role": "Software Engineer",
      "emp_name": "John Doe",
      "department": "Engineering",
      "emp_id": "357"
}

In case of a timeout error during execution, the output JSON would be:

{
      "error_code": "EXC_TME_EXC",
      "error_message": "Execution Time Limit Exceeded"
}
This demonstrates how the Input Path, Result Selector, Result Path, and Output Path can be effectively utilized in the context of employee onboarding, ensuring that only relevant data progresses to subsequent states in the circuit.


    Access your files securely from anywhere

      Zoho CRM Training Programs

      Learn how to use the best tools for sales force automation and better customer engagement from Zoho's implementation specialists.

      Zoho CRM Training
        Redefine the way you work
        with Zoho Workplace

          Zoho DataPrep Personalized Demo

          If you'd like a personalized walk-through of our data preparation tool, please request a demo and we'll be happy to show you how to get the best out of Zoho DataPrep.

          Zoho CRM Training

            Create, share, and deliver

            beautiful slides from anywhere.

            Get Started Now


              Zoho Sign now offers specialized one-on-one training for both administrators and developers.

              BOOK A SESSION









                                            You are currently viewing the help pages of Qntrl’s earlier version. Click here to view our latest version—Qntrl 3.0's help articles.




                                                Manage your brands on social media

                                                  Zoho Desk Resources

                                                  • Desk Community Learning Series


                                                  • Digest


                                                  • Functions


                                                  • Meetups


                                                  • Kbase


                                                  • Resources


                                                  • Glossary


                                                  • Desk Marketplace


                                                  • MVP Corner


                                                  • Word of the Day


                                                    Zoho Marketing Automation

                                                      Zoho Sheet Resources

                                                       

                                                          Zoho Forms Resources


                                                            Secure your business
                                                            communication with Zoho Mail


                                                            Mail on the move with
                                                            Zoho Mail mobile application

                                                              Stay on top of your schedule
                                                              at all times


                                                              Carry your calendar with you
                                                              Anytime, anywhere




                                                                    Zoho Sign Resources

                                                                      Sign, Paperless!

                                                                      Sign and send business documents on the go!

                                                                      Get Started Now




                                                                              Zoho TeamInbox Resources



                                                                                      Zoho DataPrep Resources



                                                                                        Zoho DataPrep Demo

                                                                                        Get a personalized demo or POC

                                                                                        REGISTER NOW


                                                                                          Design. Discuss. Deliver.

                                                                                          Create visually engaging stories with Zoho Show.

                                                                                          Get Started Now









                                                                                                              • Related Articles

                                                                                                              • Circuit

                                                                                                                Circuit enables you to create automated workflows for IT and business by organizing a sequence of tasks.. In certain cases, a process might include complex sub-processes that can be constructed as separate standalone circuits. These circuits can be ...
                                                                                                              • Create and configure a Circuit

                                                                                                                Create a Circuit Log in to Qntrl. Navigate to (settings) >> Automation >> select Circuit. Click Add New Circuit. Alternatively, you can also select New Circuit at the top-right corner of the home page. Specify a unique Name and add a Description for ...
                                                                                                              • Business case 2: Use client scripts to auto-populate fields based on user input

                                                                                                                While designing forms, we would sometimes require to display different sets of fields for different user responses. Such automatic field population can be handled using client scripts.   Business Scenario Helen creates a sign-up form for her product ...
                                                                                                              • Use case for Bridge: Connect with remote databases using Bridge

                                                                                                                Most organizations secure their remote databases using firewalls. If you are looking for a way to navigate these firewalls to access remote databases, Bridge can be of help. Let us try to solve a real-time business case where bridge is used to access ...
                                                                                                              • Business case 6: Delete associated cards from third-party applications (After Delete)

                                                                                                                Automate deleting records in third party applications, such as Zoho Desk or SAP, once they are deleted in Qntrl using the 'After Delete' server script.   Business Scenario Zylker uses Jira to track issues in their products and every bug filed in ...
                                                                                                                Wherever you are is as good as
                                                                                                                your workplace

                                                                                                                  Resources

                                                                                                                  Videos

                                                                                                                  Watch comprehensive videos on features and other important topics that will help you master Zoho CRM.



                                                                                                                  eBooks

                                                                                                                  Download free eBooks and access a range of topics to get deeper insight on successfully using Zoho CRM.



                                                                                                                  Webinars

                                                                                                                  Sign up for our webinars and learn the Zoho CRM basics, from customization to sales force automation and more.



                                                                                                                  CRM Tips

                                                                                                                  Make the most of Zoho CRM with these useful tips.



                                                                                                                    Zoho Show Resources