Create Widget Using Zet-CLI Tool

Create Widget Using Zet-CLI Tool

The Zoho Extension Toolkit (ZET) is a command-line interface designed to assist developers in creating and packaging widgets for integration with Zoho People.

Prerequisites 

  • Use the following command to verify the installation:

node -v
npm -v

Install CLI

  1. Run the following command to install the zapps cli node package
npm install -g zoho-extension-toolkit

      2. Run the following command to ensure that the installation is successful:
zet
Help information about 'zet' command will be shown. 

Create a project

      1. Run the following command to specify your project directory:
cd {directory} 
           Eg: cd desktop

      2. Run the following command to create a new project:
zet init 
           The list of Zoho Services for which the project template to be created will appear. 

       3. Select Zoho People from the list, and provide the Project Name.    
           A sample project with the basic necessary files and folder structure will appear on the specified directory.



A default plugin-manifest file is generated as part of the project template directory. This file is crucial, as it's where the JSON parameters of your extension must be configured before hosting. It contains metadata about the extension, such as widget details, locations, and connectors. For more information about plugin-manifest file, Click here.

Develop a project

  1. Navigate to the project folder you have created. You can find the HTML file for the widget in the app folder, named "widget.html" by default.
  2. The widget.html file contains the structure, design and components of the widget. You can create your widget from the HTML file.
  3. You can enhance the widget by adding additional designs and functionality through the creation of necessary java script files and stylesheets. (optional)
  4.  To use the Zoho People APIs in the widget, you can utilize the API helpers provided in the JS SDK Library.
  5. Once you have developed your widget, from your project folder, open the plugin-manifest.json file with your text editor and specify your widget's location.
Widgets
Location identifiers
Dashboard
people.dashboard
Custom Button
people.custombutton
Related List
people.form.relatedlist



      6. Add the domains that are to be whitelisted.
Internal Widgets are restricted to access within Zoho People servers, with all other URLs being blocked by default. To grant widgets permission to retrieve data from designated sources, whitelist specific URLs.
      7. Save plugin-manifest.json file

Test widget

  1. Navigate to the project directory using the following command:
cd {project directory}
  1. Run the following command to start a local HTTP server that allows you to run your widget locally to test it in your sandbox instance:
zet run
      


      3. This command starts a local server and runs the extension locally.
            Your extension will run on the port 5000. Ensure it is available before you execute this command.
      4. To verify the server, enable developer mode while testing your extension.


Validate and pack

  1. Navigate to the project directory using the following command:
cd {project directory}
  1. Run the following command to validate your application:
zet validate
This will validate your app package and identify any violations, which should be corrected before updating the zip file in the developer console.



      3. Run the following command to generate a zip of your widget that can be uploaded:
zet pack


     
A zip file of the widget will be created in the "dist" folder of your project directory. Use this file to upload into your Zoho People application.
Once you have created an internal widget you can upload them to Zoho People in Zip format and use them as widgets in applicable interfaces. To upload widget, refer to Using Widgets in Zoho People.

Points to remember

  1. The widget ZIP folder contains the widget.html file inside the App folder by default. This is the index file, which will be incorporated as the widget in your page.
  2. If you've created another folder inside the App folder and moved the widget.html file inside the new folder, then you need to specify the index file name in the following format when adding widgets to your Zoho People account.
/<folder-name>/<filename>.html
  1. The widget ZIP folder must be packed only using the zet pack command to be considered a valid ZIP file. Uploading the widget file using other commands will result in failure.
zet pack



    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

                                                                                                              • Custom Widget

                                                                                                                Custom widgets are embeddable user interface components that you can create and add to your Zoho People application. Widgets can be used to extend the application's front-end capabilities according to your requirements. Use widgets to perform ...
                                                                                                              • Using Widgets in Zoho People

                                                                                                                Upload your widget in Zoho People To upload your custom widget in Zoho People, do the following steps: 1. Click Settings > View all > Developer Space > Widgets. 2. Click Create New Widget. 3. Enter the name and description of your widget. 4. Select ...
                                                                                                              • Custom Widget - Introduction

                                                                                                                What is a custom widget? Customize your Zoho People application user interface with custom widgets, which are embeddable user interface components that you can create and add to your Zoho People application. You can build widgets for Zoho People ...
                                                                                                              • Create Engagement Survey Using Survey Templates

                                                                                                                Engagement surveys can be conducted using survey templates. You can use a pre-defined survey template provided by Zoho People or a custom survey template created by your organization. For more information about survey templates, refer to Survey ...
                                                                                                              • Create Engagement Survey

                                                                                                                An extensive survey to measure employee engagement and satisfaction that can contain up to 200 questions. The survey aims to gather comprehensive feedback from employees regarding various aspects of their work environment, job satisfaction, and ...
                                                                                                                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