Functions

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 allocates the machine resources. Zoho Circuit enables you to write your code in Python, Node.js, Java, Go, or Zoho Deluge and run it seamlessly without caring about server management.
Set up functions in three steps:
  1. Create a function
  2. Integrate function to a circuit
  3. Test function integration

Create a Function 

To create a function:
  1. Log in to the Zoho Circuit console.
  2. Select Functions from the top menu, then click +New Function on the left. Alternatively, you can also select +Create New in the top-right corner of the homepage, then select Function.
  3. Specify a function Name. This name serves as an identifier that can be used to call the function. Enter a meaningful name without any spaces.
  4. In the dropdown beside Name, select the programming language you will use to write the function. 'Python' is selected by default. Zoho Circuit supports
    1. Python
    2. Java
    3. Node.js
    4. Go
    5. Zoho Deluge. 
  5. Add a Description for the function. Click Create. 

  6. Write your function script in the cloud IDE or editor displayed for the selected language. To learn more about writing functions, click here.

    A sample function for sending mass emails is displayed below. 

  7. Click Save in the top-left corner. 
  8. Select Execute, then specify the test input for executing your code. Click Execute again. 
  9. Click the Deploy button in the top-left corner. Functions must be deployed before integrating them to a Circuit.

Integrate a Function

To associate function with a Circuit:
  1. Log in to Zoho Circuits console
  2. Select Circuits from the top menu bar.
  3. Select the circuit you'd like to modify. Click the Edit icon [].
  4. In the displayed circuit, drag and drop the Function state from the Functional States pane on the left.

     
  5. Enter a unique name for the function state.
  6. Select the Previous State and Next State between which the new function state has to be added. Click Create.                                                
  7. Under Configuration on the right pane,  you can edit the state Name optionally.
  8. Type 'Function' is selected by default. Select the Function Name to be added to the circuit from the drop-down.
  9. The Next State selected during state creation will be displayed. If you'd like to change it, select a state from the dropdown.
  10. Specify the Error Handling options for the state. To learn more about Error Handling, click here.                                            


  11. Under Input / Output on the right, enter the Input Path, Output Path, and Result Path. To learn more about I/O paths, click here.
  12. In addition to the input JSON sent through the circuit to the function, you can define additional input parameters by clicking Add Parameters that will be specific to this circuit. Enter the parameter name and parameter value. These inputs will be passed to the function during execution.
  13. Click Save

Test your integration

To test your integration:
  1. After saving your circuit, click Test Run at the top.
  2. Specify the test data as Input JSON for your test run, then click Next.
  3. Name your test run for this execution.
  4. Click Run. To learn more about Executions, click here.
  5. Check for the data received from the function.
  6. Modify your function settings if failure or data mismatch is encountered.
  7. Repeat this test until you get the required result using your function.
 

    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

                                                                                                              • Introduction to Zoho Circuit

                                                                                                                What is Zoho Circuit? Zoho circuit is a platform for integrating microservices to create automated workflows. With sophisticated flow controls, you can create custom applications or processes as workflows, without writing any code. Workflows created ...
                                                                                                              • 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 ...
                                                                                                                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