Develop Custom Widget Package

Develop Custom Widget Package

Command Line Interface (CLI) is used to create and package custom widgets.  ZET command is the CLI used to package custom widgets for ServiceDesk Plus MSP Cloud.

Pre-requisites: In order to create your own custom widgets for ServiceDesk Plus MSP Cloud, you are required to download the node.js (versions below 7 are not supported).


You can verify the node by running the following commands from the command prompt:
$ node -v (verifies the version of the node)
$ npm -v (verifies the version of the npm)

An illustration on verifying node installation on macOS terminal

Install ZET CLI   

You can also install the ZET (Zoho Extension Kit) CLI using the below command:
$ npm install -g zoho-extension-toolkit

Alternatively, you can click here for more details on how to install ZET (Zoho Extension Toolkit).

An illustration on installing ZET on macOS terminal

Run the following ZET command to verify the installation. On executing this command, help content for various support commands will be displayed:
$ zet

An illustration on viewing the help commands for ZET on macOS terminal

Create Custom Widget Package

Create a package with the following command:
$ zet init

Navigate through the list of Zoho services displayed using your up/down arrow keys to select ServiceDesk Plus Cloud and press Enter on your keyboard.

You will be prompted to provide a package name. Type the preferred package name and press Enter.

Info
Package name can contain only alphanumeric characters separated by underscore. 

Include Resources   

Once you enter the package name, a directory will be created with the same name on your system. This directory contains all the required folders, files, and packages required to configure your own custom widget.
By default, the initial directory contains pre-packed folders and files that are key to setting up the custom widget.
An illustration of the initial package directory.
Navigate to the package directory and open the app folder. Include the resources of your custom widget into the relevant sub-folders.

You can add resources to your custom widget by specifying the widget specifications.

    • Related Articles

    • Add Custom Widget

      Add Custom Widget to ServiceDesk Plus MSP Cloud Role Required: SDAdmin Go to Setup > Developer Space > Custom Widgets and click New Custom Widget. Follow the steps mentioned below to configure your own custom widget. Provide a name and description to ...
    • Custom Widget Specifications

      The package directory of your custom widget includes a plugin-manifest.json file. This file contains the configuration details of your custom widget. While some keys included in this file are optional, others are mandatory. Use the following pointers ...
    • Fetch Custom Widget/User Details

      SDP.getCurrentInstance(); Fetches the details of the instance where the custom widget is loaded. Returns: Object – Returns instance details object. Syntax: var instanceDetails = SDP.getCurrentInstance(); Sample Response: { appdisplayname: "IT Desk" ...
    • Validate and Pack Widget

      Execute the following command to validate your custom widget: $ zet validate Your custom widget needs to follow the widget specifications. Running the 'zet validate' command will identify violations of the specifications if any. An illustration on ...
    • Connections for Custom Services

      Write new connections for custom services and expand the third-party support of ServiceDesk Plus MSP Cloud. Important Terminologies Before you set up connections with custom services, familiarize yourself with the following terms: Client: The ...