Custom Widgets

Custom Widgets bring external services inside ServiceDesk Plus to extend the application's capabilities. They enable you to access third-party applications and web pages from within ServiceDesk Plus. Widgets are embeddable UI components that you can create by using a custom widget package.

Custom Widgets are available only for the Enterprise edition of ServiceDesk Plus.
Currently, you can create 10 widgets and 4 widget items per widget.

You can configure custom widgets to be accessible from the following location:

Create Custom Widget Package 

A custom widget package is a bundle of configuration files and resource files such as html, png, js, or css files that are required to create a custom widget. This helps in embedding third-party applications and extending the functionality of ServiceDesk Plus.

To create a custom widget package,

The following document explains the procedure to create an app package and a plugin-manifest.json file.

Develop App Package 

Create a resource file for a widget in the app folder. Generate a URL directing to the landing page of the widget item. Enter this URL while configuring the path URL in the plugin-manifest.json file.

You can use Util functions to establish connection between ServiceDesk Plus and the custom widget. Using Util functions, you can add data to the application server from the custom widget or fetch widget data such as URLs or any data from the custom widget.

Create Plugin-Manifest.JSON File 

The plugin-manifest.json file contains configuration details of the custom widget. Some keys included in this file are optional, while others are mandatory.

Use the following pointers to provide values for the keys:

 

 

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 a widget, click New > New Widget on the 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.

Request Details Page

"request.detail.tab"

Added as a tab in the request details page.

"request.detail.rightpanel"

Added to the right panel in the request details page.

Change Details Page

"change.detail.tab"

Added as a tab in the change details page.

"change.detail.rightpanel"

Added to the right panel in the change details page.

Release Details Page

"release.detail.tab"

Added as a tab on the release details page.

"release.detail.rightpanel"

Added to the right panel in the release details page.

Asset Details Page

"asset.detail.tab"

Added as a tab on the asset details page.

"asset.detail.rightpanel"

Added to the right panel in the asset details page.

Custom Module Details Page

"cm_{modulename}.detail.tab"

Added as a tab on the custom module details page.

"cm_{modulename}.detail.rightpanel"

Added to the right panel in the custom module details page

 

Additional Configurations 

Additional configurations such as Connections or Modules enhance the capabilities of custom widgets. The scope of additional configurations is either limited to the widget item level or applicable globally for all widget items.

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 connections in the widget package. You can add up to four 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.

 

 An illustration of connections configured in the plugin-manifest file:

"connections": [{
"connectionLinkName":"twitter",
"connectionName":"twitter",
"serviceName":"twitter",
"userAccess":false,
"isUserDefinedService":false
}           
],

 

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.

Configure Modules: 

Modules allow you to collect and store additional data. Data can be populated and managed in the custom module widgets using JS APIs, APIs, or from the application. Custom module details can be updated/deleted only via the custom widget.

The display name, display plural name, and API name of the custom module are unique in the application. Add unique values to the respective fields in the plugin-manifest file.

 

An illustration of modules configured in the plugin-manifest file:

Modules
"modules":[ {
  "display_name": "zoom details1", //module name
  "display_plural_name": "zoom_c3ustom_1widget",
  "api_plural_name": "zoom_custom_3wi2dget",
  "name": "zoom1_custo33m_widget",
"permission": { //persions for the module
"all": [
  {
    "field": "type",
    "values": [
      "user",
      "technician"
    ],
    "condition": "is",
    "logical_operator": "and"
  }
],
"allowed_users": "All"
},
"fields": [{
  "additional_attributes":{"nullable":false}, //denotes its a mandory field
  "display_name": "request_id",
  "name": "request_id",
  "field_type": "Single Line",
  "only_numeric": false
},
{
  "display_name": "meeting_id",
  "name": "meeting_id",
  "field_type": "Single Line",
  "only_numeric": true
},
{
  "display_name": "ticket_name",
  "name": "ticket_name",
  "field_type": "Single Line",
  "only_numeric": false
},
{
  "display_name": "start_time",
  "name": "start_time",
  "field_type": "Single Line",
  "only_numeric": false
},
{
  "display_name": "duration",
  "name": "duration",
  "field_type": "Single Line",
  "only_numeric": false
},
{
  "display_name": "cur_tech_name",
  "name": "cur_tech_name",
  "field_type": "Single Line",
  "only_numeric": false
}],
}]

 

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.

Sample plugin-manifest.json file

{
  "name": "Meeting Apps",
  "widgets": [
      {
          "name": "Zoom Apps",
          "description": "A widget that allows technicians to gain remote access to devices across different platforms.",
          "locations": [
              {
                  "name": "request.detail.rightpanel",
                  "is_enabled": true
              }
          ],
          "property_json": {
            "icons":{
              "dark":"/app/img/TV_icon.png"
            },
            "white_list": [
                "api.zoom.us"
            ],
            "visible_to": ["SDAdmin"],
        },
          "url": "/app/zoom.html"
      }
  ],
  "connections": [{
  "connectionLinkName": "adminzoom",
  "connectionName": "adminzoom",
  "serviceName": "zoom",
  "userAccess": false,
  "isUserDefinedService": true,
  "sharedBy": 5
}],
"modules":[ {
  "display_name": "zoom details",
  "display_plural_name": "zoom_custom_widget",
  "description": "zoom custom widget details",
  "is_attachment_supported": true,
  "api_plural_name": "zoom_custom_widget",
  "name": "zoom1_custom_widget",
"permission": {
"all": [
  {
    "field": "type",
    "values": [
      "user",
      "technician"
    ],
    "condition": "is",
    "logical_operator": "and"
  }
],
"allowed_users": "All"
},
"fields": [{
  "additional_attributes":{"nullable":false},
  "display_name": "request_id",
  "name": "request_id",
  "field_type": "Single Line",
  "only_numeric": false
},
{
  "display_name": "meeting_id",
  "name": "meeting_id",
  "field_type": "Single Line",
  "only_numeric": true
},
{
  "display_name": "ticket_name",
  "name": "ticket_name",
  "field_type": "Single Line",
},
{
  "display_name": "start_time",
  "name": "start_time",
  "field_type": "Single Line",
},
{
  "display_name": "duration",
  "name": "duration",
  "field_type": "Single Line",
},
{
  "display_name": "cur_tech_name",
  "name": "cur_tech_name",
  "field_type": "Single Line",
}],
}]
}