Building Extensions #9: Create widgets with the JS SDK bundle in Zoho Desk - Request API

Building Extensions #9: Create widgets with the JS SDK bundle in Zoho Desk - Request API

This series aims to equip developers with all they need to build extensions for Zoho Desk in Zoho Sigma and publish them in Zoho Marketplace.

In our previous post, we introduced you to creating widgets in Zoho Desk with different APIs. We also gave a rundown on other data API sets and their functions. In this post, we'll continue this brief by showing you how to use Request APIs in the Zoho platform (Sigma) to build extensions for Zoho Desk.

Request API

While building an extension, you may be required to communicate with third-party applications through APIs. Let's say you want to request information from a third-party app and view it within your own. A request API allows you to reach the third-party app's API and obtain the information you need. It also avoids CORS-related issues and successfully runs the third-party API in your extension, meaning that you have consistent access to the information without having to run the request over and over.

Calling third-party APIs

A request API requires an object as its parameter. The request object must contain the values for the following keys.
  • url: Refers to the third-party API
  • headers: HTTP header
  • type: HTTP method type
  • data: Pass a query parameter as an object
  • postBody: Parameters to be set to API
  • connectionLinkName: Name of the connector that is configured in Sigma to contact a third party
Here is a sample code snippet of the request API's request object:
      var reqObj=
      {
            url : 'http://demo2022863.mockable.io/test',
            headers : { 'Content-Type' : 'application/json' },
            type : 'GET',
            data : { 'test' : "key" },
            postBody : {},
            connectionLinkName : "connectionLinkName specified in the connectors section in plugin-manifest file"
      }
      ZOHODESK.request( reqObj ).then(function(response){
            // Response for the url
      }).catch(function(err){
            // Error handling
      })

Scenario: Let's consider you are building an extension that needs to fetch customer data from the Contacts module in Zoho CRM and add it to the Customers module in Zoho Desk. To execute this function, you must establish a connection between Zoho Desk and Zoho CRM with the required parameters. This will allow you to make requests to these services by invoking their APIs. Check out "Building Extensions #6" to learn more about these connections.




Once the connection is established, a JSON file will be created. It then has to be added to the 'zohoAuthorisation' key of the plugin-manifest.json file.

Note: When you create a connection using Zoho OAuth, you need to add "type":"connectors" along with the other keys. Refer to the code snippet given below.

Also, under whiteListedDomains, the API domains of Zoho CRM and Zoho Desk must be added to ensure a secure data transfer between the two applications.


Note: Data transfer between Zoho Desk and any other third-party providers can also be facilitated in the same way.

Once the connection is established and the configurations are completed in the plugin-manifest.json file, you can go ahead and call the required APIs to implement the feature.

As mentioned earlier, we need to fetch a record from the Contacts module of Zoho CRM and push that data to the Customers module of Zoho Desk. So let's see how these APIs are invoked using the ZOHODESK.request JS SDK method.

The code below demonstrates how a particular record can be fetched from Zoho CRM and pushed in to Zoho Desk.
  • Use ZOHODESK.request and invoke Zoho CRM's "get record" API. In our code, we have fetched a record by its ID.
  • Construct the request object for ZOHODESK.request.
    {
          url : 'https://www.zohoapis.com/crm/v2/Contacts/39XXXXXXXXXXXXXXXX89',
          headers : {'Content-type' : 'application/json'},
          type : 'GET',
          data : {},
          connectionLinkName : 'zohocrm',
          postBody : {},contentType: "application/json",dataType: "json",service : ""
    }
  • Extract the required values from the response of the request.
  • Use ZOHODESK.request to invoke Zoho Desk's "Create Contacts" API.
  • Now use the data extracted from Zoho CRM to construct the request object for pushing the data into Zoho Desk.
    {
          url : 'https://desk.zoho.com/api/v1/contacts',
          headers : {'Content-Type' : 'application/json', 'orgId':'69XXXXX84'},
          type : 'POST',
          data : {},
          connectionLinkName : 'zohocrm',
          postBody : {"lastName" : name,
          "email" : email},
          contentType: "application/json",
          dataType: "json",
          service : ""
    }


In this code, the email and last name of a particular contact from the Contacts module in Zoho CRM is chosen to be pushed into the Customers module in Zoho Desk.

We hope that the example code above has given you a clear picture on how to use the JS SDK method ZOHODESK.request. Stay tuned for our next post where we will discuss another SDK method.

See Also


<<Previous                                                                                                                                         Next >>

    Access your files securely from anywhere


            Zoho Developer Community




                                      Zoho Desk Resources

                                      • Desk Community Learning Series


                                      • Digest


                                      • Functions


                                      • Meetups


                                      • Kbase


                                      • Resources


                                      • Glossary


                                      • Desk Marketplace


                                      • MVP Corner


                                      • Word of the Day



                                          Zoho Marketing Automation


                                                  Manage your brands on social media



                                                        Zoho TeamInbox Resources

                                                          Zoho DataPrep Resources



                                                            Zoho CRM Plus Resources

                                                              Zoho Books Resources


                                                                Zoho Subscriptions Resources

                                                                  Zoho Projects Resources


                                                                    Zoho Sprints Resources


                                                                      Qntrl Resources


                                                                        Zoho Creator Resources



                                                                            Zoho CRM Resources

                                                                            • CRM Community Learning Series

                                                                              CRM Community Learning Series


                                                                            • Kaizen

                                                                              Kaizen

                                                                            • Functions

                                                                              Functions

                                                                            • Meetups

                                                                              Meetups

                                                                            • Kbase

                                                                              Kbase

                                                                            • Resources

                                                                              Resources

                                                                            • Digest

                                                                              Digest

                                                                            • CRM Marketplace

                                                                              CRM Marketplace

                                                                            • MVP Corner

                                                                              MVP Corner





                                                                                Design. Discuss. Deliver.

                                                                                Create visually engaging stories with Zoho Show.

                                                                                Get Started Now


                                                                                  Zoho Show Resources


                                                                                    Zoho Writer Writer

                                                                                    Get Started. Write Away!

                                                                                    Writer is a powerful online word processor, designed for collaborative work.

                                                                                      Zoho CRM コンテンツ






                                                                                        Nederlandse Hulpbronnen


                                                                                            ご検討中の方





                                                                                                  • Recent Topics

                                                                                                  • What's New in Zoho Analytics Mobile BI App - January 2025

                                                                                                    Elevate your on-the-go analytics experience with the latest enhancements in the Zoho Analytics - Mobile BI App. These updates ensure a seamless, visually consistent, and feature-rich experience across mobile devices. Here’s what’s new: Enhanced Chart
                                                                                                  • Directly Edit, Filter, and Sort Subforms on the Details Page

                                                                                                    Hello everyone, As you know, subforms allow you to associate multiple line items with a single record, greatly enhancing your data organization. For example, a sales order subform neatly lists all products, their quantities, amounts, and other relevant
                                                                                                  • Zoho One Backup of entire account

                                                                                                    Hello, When using Zoho one is there a way to backup your entire account of all apps that you are using \ activively using in a single step or do you have to backup each applications data individually? Thanks,
                                                                                                  • Custom Fonts in Zoho CRM Template Builder

                                                                                                    Hi, I am currently creating a new template for our quotes using the Zoho CRM template builder. However, I noticed that there is no option to add custom fonts to the template builder. It would greatly enhance the flexibility and branding capabilities if
                                                                                                  • Lookup filed, odd issue

                                                                                                    So I tried creating and app that has the names of engineers so I can use that for a lookup in the other apps that are being created . I add the look up in a new app, launch the app and when I try to fill out the form its just blank in the drop down menu
                                                                                                  • Unable to send message;Reason:550 5.4.6 Unusual sending activity detected. Please try after sometime

                                                                                                    Hello i'm unable to send any email because i keep getting this error Unable to send message;Reason:550 5.4.6 Unusual sending activity detected. Please try after sometime i have literally sent less than 10 emails today i'm not sure why i'm getting this
                                                                                                  • Cannot unblock IMAP for my account

                                                                                                    IMAP got block on my account for suspicious activity because I was testing different VPN servers in different locations. When I try to unblock it I get an error that says Sorry , we are unable to process your request, please contact support@zohomail.com.
                                                                                                  • Zoho Team Inbox down for several hours

                                                                                                    Error while processing the request! javax.mail.MessagingException: java.io.IOException: Problem communicating with the recipient server
                                                                                                  • ZOho Vault access denied

                                                                                                    Hello Community, I have suddenly got restricted by accessing Zoho vault . How can I get access back ?
                                                                                                  • Migration meines Accounts auf einen europäischen Server

                                                                                                    Hallo, wie kann ich meine Daten auf einen europäischen Server migrieren lassen? Ich habe hauptsächlich mit Kunden in Deutschland zu tun, die einen entsprechenden Datenschutz erfordern. VG, Kai
                                                                                                  • Restrict Payment Methods

                                                                                                    Allow us to restrict certain payment methods specific for each customer.
                                                                                                  • CHange timeformat in Tasks from 12 to 24 notation. Is that possible?

                                                                                                    Hi, I'm in the middel of the proces to possible migrate from Office365 tot ZOho. There are still some questions. One of them: How can I change the timeformat from 12 hour to 24 hour format? I can change it in my calendar settings, but it doesn't change
                                                                                                  • Power of Automation :: Trigger Automatic reminders to the task owners five days before the due date.

                                                                                                    Hello Everyone, A Custom Function is a user-written set of code to achieve a specific requirement. Set the required conditions needed as to when to trigger using the Workflow rules (be it Tasks / Project) and associate the custom function to it. Requirement:-
                                                                                                  • Ability to use Rules to automatically "Exclude" transactions from Credit Card/Bank Statements

                                                                                                    Currently there is only the option to Categorize transactions based on rules, this request is to add "Exclude" to the rules so they could be automatically ignored based on the criteria.
                                                                                                  • Simplify Zoho API integration with Deluge’s invokeAPI task

                                                                                                    Hello all! Happy New Year! As we kick off 2025, we’re excited to share some of the latest updates to enhance your Deluge experience. While Deluge already offered robust API integration capabilities, we’ve taken it to the next level with the introduction
                                                                                                  • Support answers every 2 days

                                                                                                    I've tried to contact support via email, but they don't answer unless I call and complain. They still haven't solved my problem. Please reply.
                                                                                                  • How to authenticate my domain on ovh

                                                                                                    I don't succeed in adding an domain authentification on ovh. Should i first create a subdomain? But this doesn't work either, ti gi ves te same screen and the next button is greyed out when adding the info received from zoho
                                                                                                  • domain authentification on ovh and zoho

                                                                                                    I don't succeed in adding an domain authentification on ovh. Should i first create a subdomain? But this doesn't work either, ti gi ves te same screen and the next button is greyed out when adding the info received from zoho
                                                                                                  • How to Authenticate Heartland Footwear Email Domain

                                                                                                    Hi Zoho team! Can you give me a quick step(s) needed to Authenticate Heartland's email domain with Zoho? Thanks! :)
                                                                                                  • DKIM failed

                                                                                                    My zoho mail account couldn't be contacted.
                                                                                                  • Is there a list of Zoho Icons?

                                                                                                    Is there a list of Zoho Icons you can reference: i.e. business-gold is <image marginRight='7px' color='#2A70E7' bgColor='#FFFFFF' width='52px' height='52px' type='icon' value='business-gold' size='24px' cornerRadius='26px' iconType='solid' /> Thanks!
                                                                                                  • Unable to add organization consultants and contractors in Zoho People

                                                                                                    Hello Team: I am unable to add my few consultants and contractors in Zoho People. How to add these people as Users?
                                                                                                  • Bank Feeds Breaking Constantly

                                                                                                    Hey Everyone, I have already reached out to support about this issue but I am wondering if anyone else is having the same issue. My bank feeds keep breaking within days of me fixing them by updating the credentials. Its been happening for a while and
                                                                                                  • Custom module - change from autonumber to name

                                                                                                    I fear I know the answer to this already, but thought I'd ask the question. I created a custom module and instead of having a name as being the primary field, I changed it to an auto-number. I didn't realise that all searches would only show this reference.
                                                                                                  • Regarding Zoho flow trigger when zoho table record update

                                                                                                    So I'm setting up automation to sync between Zoho CRM and Tables using zoho flow now I setup trigger when I update record in zoho tables and test it and in payload I got object of ids like key is id of each colum and that's fine but main problem is I'm
                                                                                                  • Justworks

                                                                                                    We are in the process of moving from QB Online to Zoho Books. Our PEO service Justworks.com had an integrations with Quickbooks but, not Zoho Books which means we will have to manually enter payroll. Anyway to integrate?
                                                                                                  • Create custom rollup summary fields in Zoho CRM

                                                                                                    Hello everyone, In Zoho CRM, rollup summary fields have been essential tools for summarizing data across related records and enabling users to gain quick insights without having to jump across modules. Previously, only predefined summary functions were
                                                                                                  • How to apply customized Zoho Crm Home Page to all users?

                                                                                                    I have tried to study manuals and play with Zoho CRM but haven't found a way how to apply customized Zoho CRM Home Page as a (default) home page for other CRM users.. How that can be done, if possible? - kipi
                                                                                                  • Add option "Avoid custom home pages" to profiles

                                                                                                    We need our sales agents and members on each department in general to keep the same Home designed by their Managers. Let all users to create custom home pages is a huge mistake. The homepage creation must be limited by profile so only Managers are allowed to build the right home page for their subordinates.
                                                                                                  • Is it possible to set a value to a field based on certain conditions

                                                                                                    Greetings Say i have a field that i want to set its value based on the value of another field.. for example if "number" field has value greater than 10, i want to set my field's value to X. Or if radio group had option 1 selected, then i want to set my
                                                                                                  • Marketer's Space: Leveraging CRM Data for Dynamic Content and Personalized Campaigns

                                                                                                    Hello Marketers! Welcome back to another post in Marketer’s Space! We’re excited to continue our series on the many advantages of integrating Zoho CRM with Zoho Marketing Automation (ZMA). This series is designed to help you unlock the full potential
                                                                                                  • How can I understand in the search results which collection a note is in and how to immediately go to this collection?

                                                                                                    How can I understand in the search results which collection a note is in and how to immediately go to this collection? You can call the note properties window, but only the notepad is listed there. This is very inconvenient, especially when there are
                                                                                                  • restrict access to user to create invoice

                                                                                                    hi team we need to restrict particular users from accounts dept to create invoice directly from invoice module in zoho books . Rather , they can only able to create invoice is by using "convert to invoice" from "Sales Order" module . pls help us to solve
                                                                                                  • 各種書類のデータダウンロードについて(Excel形式)

                                                                                                    ZOHO CRM で見積書/受注書/請求書など、作成した書類データを1レコード分だけExcel(or csv)形式でダウンロードする方法はあるでしょうか? 設定→データ管理→エクスポートで抽出できるのは基本的にタブ単位で、任意のレコードのみを抽出できません。
                                                                                                  • Round-Robin with Load Based Assignment, can you limit which Status are considered?

                                                                                                    Hello, We are currently using Round-Robin with Load Base Assignment. Is there a way to exclude tickets of a certain Status from being considered by the Round-Robin Assignment rules? For example... I have the following statuses. Escalation Review (meaning
                                                                                                  • Introducing Zia LLM: Zoho’s in-house Generative AI solution for CRM's AI capabilities

                                                                                                    Hello everyone, We're excited to announce the launch of our in-house Large Language Model (LLM) by Zia to power our AI offerings. What is LLM? LLM stands for Large Language Model, a powerful AI technology that processes and generates human-like text based
                                                                                                  • CRM - Copy data from Single Line to Lookup Field

                                                                                                    Hello, I need help to create a workflow with a custom function in order to copy value from a single value field to a Lookup Field. Module : Shipment Single value field API name : Customer_ID Lookup field API name : Account_ID WOuld be great to have some
                                                                                                  • Notify on new comment

                                                                                                    I would like to notify users when a new comment is added to ticket/request?  So if someone is following request they would get email or text saying that comment has been added to this request. Or request/ticket owner get notified. Thanks Luis
                                                                                                  • How to customize the task reminder notification email

                                                                                                    HI guys,  I hope someone can help with this enquiry: We have included an additional/new field of information when an activity is assigned/created, however this new field is not part of body of the task reminder notification e-mail that is generated by
                                                                                                  • Using Zia in Zoho Sheet data to research the internet and return answer to a cell in Zoho Sheet

                                                                                                    I'm trying to see if Zia (connected with OpenAI key) can take data parameters stored in a Zoho Sheet to conduct research out on the internet then return an answer into the same Sheet. I'm trying to do the equivalent of using something like the =AI() function
                                                                                                  • Next Page