An example for Function API

An example for Function API

Let us consider an example in which a new task is created in Zoho Connect whenever a ticket is added in Zoho Desk. This is implemented using an Outgoing Webhook in Zoho Desk that will make a POST request to an API endpoint in Zoho Connect. But Desk's call back request structure doesn't match the requirements of the Zoho Connect's create task API and hence it is not possible to share the data as it is.  So, a Function API is used to customize the structure of the incoming request to meet Zoho Connect's requirements.   
 
Step 1: Create a Function API configuration 
  1. Click the gear icon [] in the right menu.
  2. Select Settings from the dropdown.
  3. In the Settings page, click Function API under Developer Space.

  4. In the new page, click Create Configuration.
  5. In the configuration details page, give a name, icon, and description.
  6. Click Save & edit code.
Step 2: Since the POST request is made from Zoho Desk, write the code mentioned below in the post request handler.
  1. payloadArray = list(body);
  2. ticket = payloadArray.get(0);
  3. ticketPayload = ticket.get("payload");
  4. desc = ticketPayload.get("description");
  5. subject = ticketPayload.get("subject");
  6. response = invokeurl
  7. [
  8.  url: "https://connect.zoho.com/pulse/api/addTask"
  9.  type: POST
  10.  parameters: {"scopeID":12266000000002002,"boardId":12266000000016001,"title":subject,"desc":desc,"sectionId":1226600000031376,"position":1}
  11.  connection:"zohoconnect"
  12. ];
  13. info response;
  14. return {"statusCode":"201","response":"Task Created Successfully"};
Step 3: Generate the API endpoint URL in Zoho Connect.  
  1. Click Expand found next to API endpoint.
  2. Click Generate URL.
     
Step 4:  Configure the outgoing webhook in Zoho Desk with the generated URL from Zoho Connect network as the call back URL. 
 
Now, whenever a ticket is added in Zoho Desk, a new task is created in Zoho Connect. Similarly, a configuration to update and delete tasks can also be done. 
 
If you have any questions regarding Function API, please write to us at support@zohoconnect.com. We'll be happy to help!
 

    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 LinksWorkflow AutomationData Collection
                          Web FormsEnterpriseBegin Data Collection
                          Interactive FormsWorkplaceData Collection App
                          CRM FormsCustomer ServiceAccessible Forms
                          Digital FormsMarketingForms for Small Business
                          HTML FormsEducationForms for Enterprise
                          Contact FormsE-commerceForms for any business
                          Lead Generation FormsHealthcareForms for Startups
                          Wordpress FormsCustomer onboardingOrder Forms for Small Business
                          No Code FormsConstructionRSVP tool for holidays
                          Free FormsTravel
                          Prefill FormsNon-Profit

                          Intake FormsLegal
                          Mobile App
                          Form DesignerHR
                          Mobile Forms
                          Card FormsFoodOffline Forms
                          Assign FormsPhotography
                          Mobile Forms Features
                          Translate FormsReal EstateKiosk in Mobile Forms
                          Electronic Forms

                          Notification Emails for FormsAlternativesSecurity & Compliance
                          Holiday FormsGoogle Forms alternative GDPR
                          Form to PDFJotform alternativeHIPAA Forms
                          Email Forms
                          Encrypted Forms
                          Embeddable Forms
                          Secure Forms
                          Drag & drop form builder
                          WCAG



                                            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


                                                  • Desk Community Learning Series


                                                  • Digest


                                                  • Functions


                                                  • Meetups


                                                  • Kbase


                                                  • Resources


                                                  • Glossary


                                                  • Desk Marketplace


                                                  • MVP Corner


                                                  • Word of the Day


                                                  • Ask the Experts


                                                    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

                                                                                                              • Overview of Function API

                                                                                                                Feature Availability Overview Function API in Zoho Connect provides an authenticated API endpoint to establish a connection between two applications and automate workflows. It also includes handlers that let you format the request and response ...
                                                                                                              • Create, edit, disable and delete Function API

                                                                                                                Feature Availability Who can create a Function API? By default, only the network admins can create a Function API. However, if allowed, selected users can also create a Function API. How do I create a Function API configuration? Click the gear icon ...
                                                                                                              • Regenerating the API endpoint URL

                                                                                                                Feature Availability Overview The API endpoint is an authenticated URL that lets another service to send requests and access the data in a network. It is necessary that the URL is kept safe and not shared with others. However, in case the URL gets ...
                                                                                                              • Configuring a Scheduler

                                                                                                                Feature Availability Configuring a Scheduler A scheduler is triggered at the specified time to complete the defined action. The action to be performed is written as a custom function using Deluge scripts in the scheduler handler. The following ...
                                                                                                              • Manuals overview

                                                                                                                Use Manuals to build your team's knowledge base. Think of it in terms of an online library that your team can draw on when needed. For example, your company's policies, best practices guide related to work, API documentation, and other resources can ...
                                                                                                                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