Dynamic Workflow Execution | Circuit | Context Object | Online Help | Qntrl

Context Object

Context Object is used to access runtime information during the circuit execution. It contains data related to the circuit, state, execution, task, and more. By understanding its structure and how to access it, you can dynamically utilize runtime data within your workflows, thereby improving the efficiency and adaptability of your workflow automation.

The Context Object can be accessed from all JSON Path fields within circuit, retrieving comprehensive information about the ongoing execution directly from the server, rather than the input.

The provided examples and syntax guidelines, help you to seamlessly integrate the Circuit Context Object into your workflows for more contextual and data-driven execution.

The Context Object is structured as follows:
{
      "portal": {
            "id": "string", // unique identifier of the org
            "name": "string" // name of the org
      },
      "requestor": {
            "id": "string", // unique identifier for the requestor
            "name": "string", // name of the requestor
            "email": "string", // email of the requestor
            "first_name": "string", // first name of the requestor
            "last_name": "string", // last name of the requestor
            "timezone": "string" // timezone of the requestor
      },
      "circuit": {
            "id": "string", // unique identifier for the circuit
            "name": "string" // name of the circuit
      },
      "execution": {
            "id": "string", // unique identifier for the execution
            "name": "string", // name of the execution
            "description": "string", // description of the execution
            "parent_execution": {
                  "name": "string", // name of the execution
                  "description": "string", // description of the execution
                  "type": "string", // type of execution (e.g. api, sdk,test-run)
                  "origin": "string", // name of the service origin being executed
                  "start_time": "ISO 8601", // timestamp for when the execution started
            }
            "type": "string", // type of execution (e.g. api, sdk, test-run)
            "origin": "string", // name of the service origin being executed
            "start_time": "ISO 8601", // timestamp for when the execution started
            "meta": {} // metadata associated with the execution
      },
      "current_state": {
            "name": "string", // name of the current state in the execution
            "type": "string", // type of the current state (e.g. function, circuit, webhook, etc.)
            "start_time": "ISO 8601" // timestamp for when the current state started
       },
      "integration": {
            "id": "string", // unique identifier for the integration
            "name": "string", // name of the integration
            "service": "string", // name of the service for the integration
            "service_id": "string", // unique identifier for the service of the integration
            "visibility": "string" // visibility of the integration (e.g.public, private)
      }
      "workspace": {
            "id": "string", // unique identifier for the workspace
            "name": "string", // name of the workspace
            "visibility": "string" // visibility of the workspace (e.g.public, private)
      },
}
Here's an example of a Circuit Context Object to illustrate its structure and data. Specifics are included in the following format within the content of a running execution.
"portal": {
      "id": "OnboardXV",
      "name": "OnboardPro"
},
"requestor": {
      "id": "requestor456",
      "name": "John Doe",
      "email": "johndoe@example.com",
      "first_name": "John",
      "last_name": "Doe",
      "contact_mobile": "+1234567890",
      "timezone": "America/New York"
},
"workspace": {
      "id": "workspace789",
      "name": "My Workspace",
      "visibility": "private"
},
"circuit": {
      "id": "circuit123",
      "name": "My Circuit"
},
"execution": {
      "id": "execution456",
      "name": "My Execution",
      "description": "Sample execution",
      "parent_execution": {
            "start_time": "2023-09-19T16:13:49.357Z",
            "origin": "Orchestly",
            "name": "7",
            "id": "9bdf89f2-f7a0-4329-b63d-e2ab53f20f8d",
            "type": "test_run"
      },
      "type": "api",
      "origin": "My Service",
      "start_time": "2023-05-15T09:00:00Z",
      "meta": {}
},
"current_state": {
      "name": "State1",
      "type": "function",
      "start_time": "2023-05-15T09:05:00Z"
},
"integration": {
      "id": "integration789",
      "name": "My Integration",
      "service": "My Service",
      "service_id": "service123",
      "visibility": "public"
}
Suppose you want to access the execution ID, name, and start time in a state named "My Function State", you can achieve this using the following configuration:
{
      "My Function State": {
            "start": true,
            "type": "function",
            "function_id": "hello_world",
            "parameters": {
                  "circuit_id": "$$.circuit.id",
                  "execution_id": "$$.execution.id",
                  "execution_name": "$$.execution.name",
                  "execution_start_time": "$$.execution.start_time"
            },
            "result_path": "$.result",
            "next": "End"
      }
}


    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






                          Quick Links Workflow Automation Data Collection
                          Web Forms Enterprise Begin Data Collection
                          Interactive Forms Workplace Data Collection App
                          Offline Forms Customer Service Accessible Forms
                          Digital Forms Marketing Forms for Small Business
                          HTML Forms Education Forms for Enterprise
                          Contact Forms E-commerce Forms for any business
                          Lead Generation Forms Healthcare Forms for Startups
                          Wordpress Forms Customer onboarding Order Forms for Small Business
                          No Code Forms Construction RSVP tool for holidays
                          Free Forms Travel
                          Prefill Forms Non-Profit

                          Intake Forms Legal

                          Form Designer HR

                          Card Forms Food
                          Assign Forms Photography

                          Translate Forms Real Estate
                          Electronic Forms

                          Notification Emails for Forms Alternatives
                          Holiday Forms Google Forms alternative 
                          Form to PDF Jotform alternative





                                            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

                                                                                                              • Parameters

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

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

                                                                                                                Result Path and Result Selector are employed to extract dynamic data from the state's result when the execution is successful. Result Selector Result selector lets you retrieve and process the runtime data, enabling flexible and dynamic data ...
                                                                                                              • 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 ...
                                                                                                              • Active Directory(AD)

                                                                                                                Active Directory(AD) is a service developed by Microsoft that provides a centralized way to manage all your network machines, users, and resources in one place. Active Directory stores data as Objects, which include users, groups, applications, and ...
                                                                                                                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