Configure Branch state in Circuit | Qntrl | Circuit | Online Help

Branch

The Branch state allows you to add conditions to the circuit's workflow, and execute tasks based on those conditions. It decides the path of the execution based on input to this Branch state. This is similar to having an 'If else' or 'switch' case.
A Branch state may have more than one 'Next' state, but only one of the branch states will be executed. A branch state cannot use the 'End' state.

Use Case Example: In the case of employee onboarding, after the employee details are provided, the submitted documents undergo verification. To handle appropriate action after verification, the Branch state can be employed based on the input received. If the verification status is determined as 'success', the circuit will proceed to the next pre-configured state. On the other hand, if the verification status is identified as 'failure', the circuit will follow a different path to the configured state.

 

Let us see how to configure the Branch state in Builder View and Code View.

Builder view

To configure a Branch state to your circuit:

  1. In Builder View, drag and drop the Branch state from the left pane into your circuit or click the required Branch state in your Circuit.
  2. Under the Configuration tab, update the common state field attributes.
  3. You can add branches to this state by selecting Add Condition. Add Condition allows you to configure the conditions for the respective branch and select the next state when the condition is met.
  4. In the Condition field, add $.verification == 'success'  and set the next state as Verified and Approved in Go To.
  5. Similarly, you can add another condition as $.verification == 'failure' and set it to a Verified and Rejected state in Go To.
  6. You can configure the Input and Output Paths of the Branch state as described in Input and Output Processing.
      

The following 'Condition' operators are supported:

               Operator

                Description

&&

And

==

Boolean Equals

!=

Not

==

Numeric Equals

>

Numeric Greater Than

>=

Numeric Greater Than Or Equals

<

Numeric Less Than

<=

Numeric Less Than Or Equals

||

Or

==

String Equals


Branch state has a default pathway that you can link with the next state of the circuit. If none of the conditions is followed, the state will be executed with the default branch.

Code View

In Code View for Branch, each branch must have Condition and Next fields.
The JSON to configure Branch state for the above example is given below:
"Action - Approve or Reject": {
      "type": "branch",
      "next": "Verified and  Approved",
      "branches": [
      {
            "condition": "$.verification == 'success'",
            "next": "Verified and  Approved"
      },
      {
            "condition": "$.verification == 'failure'",
            "next": "Verified and Rejected"
      }
      ]
}






    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

                                                                                                              • Sample Use Cases

                                                                                                                Payment process In a typical payment process, for every purchase made, a payment link with the invoice will be shared with the purchaser. Upon successful payment, a receipt will be generated, and in the event of failure, the entire process will have ...
                                                                                                              • Wait

                                                                                                                The Wait state introduces a pause or delay within your circuit, temporarily halting the execution for a specified duration before resuming and progressing to the next state. The delay duration can be configured in seconds. For instance, if you set a ...
                                                                                                              • Success

                                                                                                                A Success state can be used to terminate an execution. It is used to represent a successful execution for the user's reference. As Success states are end states, they don't have any configuration or properties, such as Next state or End fields. So ...
                                                                                                              • Pass

                                                                                                                The Pass state in the circuit merely forwards the data to the next defined state. It allows you to pass the input data as-is or include supplementary information if needed during the process. To put it differently, with this state, you can insert new ...
                                                                                                              • 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 ...
                                                                                                                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