Input and Output Processing

Input and Output Processing

 
Understanding how Zoho Circuit processes input and output as the data flows through the circuit helps to design and implement effective workflows. A circuit execution receives input as a JSON, then passes that input to the first state. Each state receives JSON as input and passes output mostly in the JSON format. Input and output data can be filtered and manipulated to create finer circuits.
 
The following fields filter and control the data flow from one state to another:
  1. Input Path
  2. Output Path
  3. Result Path
  4. Parameters 
Input Path selects parts of the input JSON to pass to the state. After the input is processed by the state, Result Path selects what combination of the state result and the actual state input has to be passed to the output. Output Path further filters the data from the Result Path to pass it as state output.
             

Paths

In Zoho Circuit, Paths are strings beginning with $ that identify the components within JSON text. Specific parts of a JSON can be accessed by denoting their attributes in Input Path, Result Path, and Output Path.
 

Input Path & Parameters

Both Input Path and Parameters provide a way to control the actual input passed to the state. Input Path filters the JSON input received by using Path notation. Parameters enable you to insert a collection of key-value pairs to the input. The values of Parameters can either be static or parts of the input JSON selected as a Path.
 
For example, let the following JSON be the state input:
  1. {
  2.       "Entry1": {
  3.             "Name" : "John",
  4.             "Id" :"97",
  5.       "DOB" :"29Jan86"
  6.       },
  7.       "Entry2": {
  8.             "Name" : "Tia",
  9.             "Id" :"103",
  10.             "DOB" :"02Dec93"
  11.       },
  12. }
 
You can apply the Input Path as $.Entry2 within the state definition.
  1. "inputPath": "$.Entry2"
 
Then the input JSON passed to the state after applying Input Path will be:
  1. "Entry2": {
  2. "Name" : "Tia",
  3. "Id" :"103",
  4. "DOB" :"02Dec93"
  5. }
 

Result Path

Result Path enables you to manipulate the output of a state. Using Result Path, you can set the state output as a copy of the state input, the state result, or a combination of both.
The following state types can generate an output and include 'Result Path' in their definition:
  1. Pass
  2. Parallel
  3. Batch
  4. Function
  5. Webhook
  6. Circuit
By default, if Result Path is not defined, the state input will be completely replaced by the state result, and the result will be passed to the output. You can set the output as a combination of the state input and state result by defining the Result Path.
 
For example, suppose the input to your state includes the following:
  1. {
  2.       "TicketName" : "AddNameFailure",
  3.       "TicketId" : "12",
  4.       "Priority" : 2
  5. }
Let the state result received be the following:
  1. "Resolve within 24 hours"
 
To keep the state input intact and to append the state result to it, set 'ResultPath' to $.TimeLimit:
  1. "resultPath" : "$.TimeLimit"
 
This includes the state result with the actual input:
  1. {
  2. "TicketName" : "AddNameFailure",
  3. "TicketId" : "12",
  4. "Priority" : 2,
  5. "TimeLimit" : "Resolve within 24 hours"
  6. }
 

Output Path

Output Path enables you to select a portion of the state output and remove the unwanted information from output JSON. If Output Path is not specified, then the entire JSON node (determined by the state input, state result and Result Path)  will be sent as the state output.
 
For example, let the JSON below be the state output received from Result Path:
  1. {
  2.       "Info": {
  3.             "Name" : "John",
  4.             "Id" :"97",
  5.             "DOB" :"29Jan86"
  6.       },
  7.       "AddedInfo": {
  8.             "DOJ" : "06June2020",
  9.             "Place" :"J03A",
  10.       }, 
  11. }

You can apply the Output Path as $.Info within the state definition:
  1. "outputPath": "$.Info"
 
Then the output JSON of the state will be:
  1. "Info": {
  2.       "Name" : "John",
  3.       "Id" :"97",
  4.       "DOB" :"29Jan86"
  5. }

    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







                                                                                            You are currently viewing the help articles of Sprints 1.0. If you are a user of 2.0, please refer here.

                                                                                            You are currently viewing the help articles of Sprints 2.0. If you are a user of 1.0, please refer here.



                                                                                                  • Related Articles

                                                                                                  • Executions

                                                                                                    Execution occurs when you Test Run a circuit. Each circuit can have multiple simultaneous executions. A copy of all the executions is maintained in Zoho Circuit. This means you can select and re-run a specific execution at any time.   Execution Page ...
                                                                                                  • Circuits

                                                                                                    The main purpose of Zoho Circuit is to build efficient circuits in the form of workflows to coordinate multiple microservices. Circuits are state machines that can trigger and track each step automatically, and retry when there are errors.  Setting ...
                                                                                                  • States in Zoho Circuit

                                                                                                    In Zoho Circuit, states are building blocks of a circuit that can perform tasks, make decisions, or simply pass the output from one state to another. You can build circuits with states using the drag and drop functionality in Builder View, or with ...
                                                                                                  • Functions

                                                                                                      Function is a program script that performs a set of operations whenever invoked within an application. Set up functions in Zoho Circuit to actualize your business routines. Circuit's functions are serverless, where the cloud provider dynamically ...
                                                                                                  • Webhook

                                                                                                    Webhook enables communication between third-party applications and Zoho Circuit. With webhooks, you can make API calls and notify the applications whenever an action takes place in Zoho Circuit.   Set up webhooks in the following three steps: Create ...
                                                                                                    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