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 to provide values for the keys:

(* indicates mandatory parameters)

Service*: The Zoho product for which your custom widget is created. While creating a custom widget for ServiceDesk Plus Cloud, the service key will be auto-populated in the manifest as "service": "SDP".

Type*: Type is set as Personal by default. It indicates that the widget details are uploaded to an instance via API. Users are advised not to modify Type in any circumstances.

Widgets*: An JSON array of the details for your custom widget item. You must add at least 1 widget item in a custom widget package. You can add a maximum of 3 widget items. Each widget item is required to have the following set of properties.

When themed icons are in use, only light icon will be rendered in widget locations other than web tabs. If no light icon is found, only the text will be rendered.
Note that only PNG, JPG, or JPEG file formats are supported.  

(hover over the JSON keys to preview the custom widget's display location in the application. Note that the images are placeholders used for illustrative purposes only.)

 

Location 

JSON Key Format

Description

Web Tab

"webtab"

The custom widget is added as a web tab in the navigation pane.

Home

"dashboard" 

(for Technicians and Requesters)

Custom widgets are embedded on the dashboard. Dashboard widgets can only be enabled. To add the widget, edit the dashboard and click Customize to select the custom widget from the list of available widgets.

Click here to learn how to edit a dashboard.

If the custom widget is enabled for requesters, the dashboard widget can be embedded on the requester portal Home page. To add a widget to the Requester Portal, customize the Requester Home Page and add the widget from the list of canned widgets.

Click here to learn how to customize Requester Portal.

Request Details page

"request.detail.menu"

Added as a custom menu option in the toolbar of the request details page. Custom menu widgets are only enabled. To add the custom widget to custom menu, select the widget as the custom menu action.

"request.detail.subtab"

Added as a sub-tab in request details page.

"request.detail.rightpanel"

Added to the right panel in the request details page.

Add/Edit Request Form

"request.form.rightpanel"

Added as a dynamic widget to the right panel in the request form. By default, this custom widget is displayed only if specified by the user.

You can configure the widget visibility using JS APIs.

Change Details page

"change.detail.menu"

Added as a custom menu option in the toolbar of the change details page. Custom menu widgets are only enabled. To add the custom widget to the custom menu, select the widget as the custom menu action.

"change.detail.subtab"

Added as a sub-tab in change details page

"change.detail.rightpanel"

Added to the right panel in the change details page.

"change.stage.detail.subtab"

Added as a sub-tab to any change stage in the change details page. You can select the change stages where the widget must be displayed from Admin > Developer Space > Custom Widgets after installing the widget package.

Add/Edit Change Form change.form.rightpanel Added as a dynamic widget to the right panel in the change form. By default, this custom widget is displayed only if specified by the user.
Problem details page "problem.detail.menu" Added as a custom menu in the toolbar of the problem details page. Custom menu widgets are only enabled. To add the custom widget to the custom menu, select the widget as the custom menu action.
  "problem.detail.rightpanel" Added to the right panel on the problem details page.
  "problem.detail.subtab" Added as a sub-tab on the problem details page.
Add/Edit Problem Form "problem.form.rightpanel" Added as a dynamic widget to the right panel in the problem form. By default, this custom widget is displayed only if specified by the user.
Release details page

"release.detail.menu"

Added as a custom menu in the toolbar of the release details page. Custom menu widgets are only enabled. To add the custom widget to the custom menu, select the widget as the custom menu action.

"release.detail.subtab" Added as a sub-tab on the release details page.
"release.detail.rightpanel" Added to the right panel on the release details page.  
  "release.stage.detail.subtab" Added as a sub-tab to any release stage in the release details page. You can select the release stages where the widget must be displayed from Setup > Developer Space > Custom Widgets after installing the widget package.
Add/Edit Release Form "release.form.rightpanel" Added as a dynamic widget to the right panel in the release form. By default, this custom widget is displayed only if specified by the user.
CMDB details page "cmdb.detail.menu" Added as a custom menu in the toolbar of the CI details page. Custom menu widgets are only enabled. To add the custom widget to the custom menu, select the widget as the custom menu action.
  "cmdb.detail.subtab" Added as a sub-tab on the CI details page.
  "cmdb.detail.rightpanel" Added to the right panel of the CI details page.

Asset details page

"asset.detail.menu"

Added as a custom menu in the toolbar of the asset details page. Custom menu widgets are only enabled. To add the custom widget to custom menu, select the widget as the custom menu action.

"asset.detail.subtab"

Added as a sub-tab on the asset details page. You can select the product types for which the widget must be displayed from Admin > Developer Space > Custom Widgets after installing the widget package.

"asset.detail.rightpanel"

Added to the right panel on the asset details page.  You can select the product types for which the widget must be displayed from Admin > Developer Space > Custom Widgets after installing the widget package.

Setup

"configuration"

Configuration widgets are crude widgets that are not published to users and are accessible only to Administrators. Configuration widgets mainly serve as an alternative to the default UI configurations. Users can use configuration widgets to fetch the widget configurations in their own UI.

To access the widget,

  • Go to Setup > Developer Space > Custom Widgets.
  • Click the configuration widget name. The configuration widget opens in a pop-up window.
 The widget or widget item must be specified in at least one other location to enable the configuration widget. 

Additional Configurations:

Apart from the above-mentioned specifications, you can also configure optional configurations such as probe, connections, or variables to your custom widget to enhance its capabilities in the plugin-manifest file. The scope of the additional configurations is either limited to the widget item level or applicable globally for all widget items.

Refer to the sample file for more details.

 

Configuration Pop-Up:

Use config_popup_required key to specify if you want to display the configurations on a pop-up screen to the user after the widget package is saved. This is a one-time action.

Enter the key values as:

The details displayed on the pop-up depend on the presence of configuration widgets. If no configuration widget is enabled, the default widget configuration pop-up will be displayed where you can update the probe, connection, or variable details instantly from this popup.

The widget configuration pop-up will be opened only if a probe, connection, or variables are present and enabled in the manifest. 

 

Default Widget Configuration pop-up.

 

If a configuration widget is enabled, the widget will be displayed on the pop-up menu instead of the default configuration page. If multiple configuration widgets are added from one widget package, the config_popup_required key value will be ignored even if its value is set as 'true'.

Scope: This configuration is globally scoped.

 

CSP Domains:

This following key defines the list of sites from which you want to load third-party assets such as JavaScript, CSS, and so on. If you need to load any third-party scripts, CSS, or other files, you need to add them to the 'connect-src' list.

"cspDomains": {
    "connect-src": [""]
  },
This configuration is globally scoped.

 

Permissions:

The following permissions are allowed by default:

"permissions":[
"allow-forms",
"allow-scripts",
"allow-same-origin",
"allow-popups",
]

Refer here to learn more about sandbox permissions.

This configuration is globally scoped.

 

Display Widget Header:

Use show_widget_header_in_dashboard key to specify if you want to display the widget item name as the widget header on the Dashboard. This key can be used only if the widget location is configured as Dashboard. Provide a key value by using the below pointers:

Scope: This configuration is specific to each widget item. If a custom widget package has multiple widget items, you can set this key unique to each widget item.

 

Configure Probe:

Probe is an application used to integrate custom widgets with On-Premise applications. Install the probe in the same network as the On-Premise products and the corresponding probe should be configured/associated with the custom widget. A custom widget can be configured or associated with only one probe.

Use probe_config_required key to specify if probe configuration is required for the custom widget. The probe_config_required key is only used to enable probe configuration from the UI. Even if the key is disabled, you can still configure probes using JS APIs.

Provide the key value as follows:

After you upload the widget package to ServiceDesk Plus Cloud, you can configure the probe values from the custom widgets list view.

Scope: This configuration is globally scoped. Probes are configured for all custom widget items.
You cannot configure probes for configuration widgets from the application UI.

Click here to know more about probes.

 

Configure Connections:

Connections allow you to integrate custom widgets with third-party APIs. You can access third-party applications from a custom widget by configuring the connection in the widget package. Note that you can add up to 5 connections to a custom widget.

To configure connections in the plug-in manifest file, you can copy the connection details as a JSON string directly after the connection is created. Go to Admin > Developer Space > Connections and copy the JSON code snippet from the connection details page.

You can set the "userAccess" as "true" to allow users to authorize connections individually in the plugin-manifest file. To restrict authorization only to the SDAdmin who installed the custom widget, set "userAcess" as "false"

"connections": [
{
"connectionLinkName": "zohotest",
"connectionName": "Zoho",
"serviceName": "zlabs_integration",
"userAccess": true,
"isUserDefinedService": false,
"sharedBy": "709641411",
"scope": [
"SDPOnDemand.requests.ALL"
]
}
]

An illustration of connections configured in the plugin-manifest file

 

Scope: This configuration is globally scoped. Connections are configured for all custom widget items.
When a custom widget is deleted, the associated connections will also be deleted. 

Click here to know more about connections.

 

Configure Variables:

Variables are entities that store key values and are scoped to a particular component, in this case - custom widgets. You can create up to 5 variables for a custom widget to hold user-specific values. Variables can hold only string values.

You can convert JSON array or JSON objects as strings and save them as variables.  

Variables contain 3 parameters:

Variables can be used as dollar variables ${variable_key} while making API calls to third-party applications. Dollar variables are automatically parsed by the server. If the user has stored a JSON object to a variable key, each stored JSON property value can be directly used in API calls using dollar variables in the syntax of ${variable_key.property)

For better understanding, refer to the illustration below:

"variables": 
[
	{
	{
	"key" : "url",
	"secure" : false
	},
	{
	"key" : "configuration",
	"secure" : false
	"value": {"domain":ADManager Plus","probeid":"#45","token":"25","probe":true"}
	}
]

 In this illustration, you can fetch the variables in JS APIs in a function as follows:

SDP.invokeURL({
	url: "${url}/RestAPI/SearchUser",
	method: "post",
	params : {AuthToken:"${configuration.token}"},
	is_probe_connection : true
})

The url variable is fetched directly as ${url}.

The configuration variable has several JSON objects stored as keys - domain, probeid, token, and probe. The key value of token is fetched using ${configuration.token}.

Scope: This configuration is globally scoped. Variables are configured for all custom widget items.
When a custom widget is deleted, the associated variables will also be deleted. 

 

Configure Modules: 

Users can create custom modules along with custom widgets in ServiceDesk Plus Cloud.

The admin configurations are dependent on the custom widget and so the custom module details can be updated/deleted only via the custom widget. However, data can be populated and managed in the custom module widgets using JS API, API, or from the application.

The display name, display name plural, and API name of the custom module are unique in the application. Therefore, ensure you add unique values to the respective fields in the plugin-manifest file as well.

While configuring custom modules in the plugin-manifest file, ensure that the custom module name and field names are prefixed with the right API prefix names as shown below:

 

Prefix

Example

Custom module name

cm_

"cm_webtab"

Text fields

txt_

"txt_employee_name"

Numeric fields

num_

"num_ID"

Date fields

date_

"date_created_date"

Lookup fields

ref_

"ref_vendor"

Decimal/Currency/Percent fields

dbl_

"dbl_cost"

Decision Boxes

bool_

"bool_resources"

 

You can configure the following keys for custom modules in plugin manifest file:

 Web tabs and custom configurations are already functional in ServiceDesk Plus for all users. However, hidden modules are unique to custom widgets and cannot be created by users otherwise. 
 If display_type is not specified, the custom module will be hidden by default. 

 

For hidden modules, import_enabled key will be set as "false". This cannot be modified.

  

 

 

"modules":[{
	"display_name": "TechVsAuthtokenMap",
	"display_name_plural": "TechVsAuthtokenMap",
	"name": "cm_techvsauthtokenmap",
	"fields": [
	{
	"field_type": "Single Line",
	"field_key": "txt_idone",
	"name": "ID",
	"constraints": {
	"unique": "true"
	}
	},
	{
	"field_type": "Single Line",
	"field_key": "txt_authtoken",
	"encrypted": true,
	"name": "AuthToken"
	},
	{
	"field_type": "Single Line",
	"field_key": "txt_usernameadmp",
	"name": "ADManager Plus User Name"
	},
	{
	"field_type": "Single Line",
	"field_key": "txt_useridadmp",
	"name": "ADManager Plus User Id"
	},
	{
	"field_type": "Single Line",
	"field_key": "txt_usernamesdp",
	"name": "SDP-OD User Name"
	},
	{
	"field_type": "Single Line",
	"field_key": "txt_domain",
	"name": "Domain"
	}
	],
	"configurations": {
	"display_type": "hidden",
	"import_enabled": "false",
	"report_enabled": "true",
	"allow_all_technicians": "true"
	}
}]

An illustration of modules configured in the plugin-manifest file

 

Custom modules created by custom widgets are indicated with icon under Setup > Developer Space > Custom Modules.

 

 

Scope: This configuration is specific to each widget item. If a custom widget package has multiple widget items, the user can configure custom modules uniquely for each widget item.
When a custom widget is deleted, the associated custom modules will also be deleted. 

Click here to learn more about custom modules.

 

What is the purpose of extra configurations in custom widgets when the same are available in ServiceDesk Plus Cloud already?

ServiceDesk Plus Cloud offers functionalities such as probes, connections,  global variables, and custom modules by itself. The same features are also packaged in Custom Widgets to allow easy accessibility to users. Administrators can pack all the features in one page within the application so users can avoid navigating through several pages and access all functionalities from a single widget.

 

Sample plugin-manifest.json file  

{
    "service": "SDP",
    "type": "personal",
    "modules": [
        {
            "display_name": "TeamViewer_session",
            "display_name_plural": "TeamViewer_sessions",
            "name": "cm_teamviewerSession",
            "fields": [
                {
                    "field_type": "Single Line",
                    "field_key": "txt_request_id",
                    "name": "request_id"
                },
                {
                    "field_type": "Single Line",
                    "field_key": "txt_technician_id",
                    "name": "technician_id"
                },
                {
                    "field_type": "Single Line",
                    "field_key": "txt_session_code",
                    "name": "session_code",
                    "constraints": {
                        "unique": "true"
                    }
                },
                {
                    "field_type": "Single Line",
                    "field_key": "txt_requester_name",
                    "name": "requester_name"
                },
                {
                    "field_type": "Single Line",
                    "field_key": "txt_requester_id",
                    "name": "requester_id"
                },
                {
                    "field_type": "Date/Time Field",
                    "field_key": "date_created_at",
                    "name": "created_at"
                },
                {
                    "field_type": "Date/Time Field",
                    "field_key": "date_valid_till",
                    "name": "valid_till"
                },
                {
                    "field_type": "Single Line",
                    "field_key": "txt_session_type",
                    "name": "session_type"
                },
                {
                    "field_type": "Single Line",
                    "field_key": "txt_is_report_enabled",
                    "name": "is_report_enabled",
                    "default_value": "true"
                },
                {
                    "field_type": "Single Line",
                    "field_key": "txt_state",
                    "name": "state",
                    "default_value": "Open"
                }
            ],
            "configurations": {
                "display_type": "hidden"
            }
        },
        {
            "display_name": "TeamViewer_connection",
            "display_name_plural": "TeamViewer_connections",
            "name": "cm_teamviewerConnection",
            "fields": [
                {
                    "field_type": "Single Line",
                    "field_key": "txt_session_code",
                    "name": "session_code"
                },
                {
                    "field_type": "Single Line",
                    "field_key": "txt_supporter_name",
                    "name": "supporter_name"
                },
                {
                    "field_type": "Date/Time Field",
                    "field_key": "date_start_date",
                    "name": "start_date"
                },
                {
                    "field_type": "Date/Time Field",
                    "field_key": "date_end_date",
                    "name": "end_date"
                },
                {
                    "field_type": "Multi Line",
                    "field_key": "txt_connection_notes",
                    "name": "connection_notes"
                }
            ],
            "configurations": {
                "display_type": "hidden"
            }
        }
    ],
    "widgets": [
        {
            "name": "TeamViewer",
            "description": "A widget that allows technicians to gain remote access to devices across different platforms.",
            "path_url": "/app/tv_widget.html",
            "icons": {
                "30x30": "/app/img/TV_icon.png"
            },
            "locations": [
                "request.detail.rightpanel"
            ]
        }
    ],
    "connections": [
        {
            "connectionLinkName": "Teamviewer",
            "connectionName": "Teamviewer",
            "serviceName": "teamviewer",
            "userAccess": true,
            "isUserDefinedService": false,
            "sharedBy": "709641411"
        }
    ],
    "config_popup_required": false
}