Skip to main content

Configuring Widget JSON File

The Avaya Workspaces Widget Manager allows you to import external custom widgets. You can import a widget uploading a widget JSON file with the relevant properties. The structure of a widget JSON file is independent of the framework that you choose to create your widget. A widget JSON file contains several keys. The following table shows a type of value, a description and possible limitations for each key:

PropertyType of valueDescriptionLimitations
namestringThe widget nameNo limit on characters. If long name is used, UX uses ellipsis to show more text
descriptionstringThe widget descriptionNo limit on characters. If long name is used, UX uses ellipsis to show more text
tagsstring[]Tags for the widget by which it can be foundLimited to 10. Otherwise, admin fails to import and shows an error message
versionstringThe widget versionNo limit
elementstringThe custom element rendered in Avaya Workspaces
iconstringThe NEO icon
filesstring[]A directory with the web component build file that contains dependencies and relevant files to render the web componentOnly one file location is supported
override_urlstringThe URL of a remote server. You can use it if you want to have multiple widgets hosted at different locations. Alternatively, you can leave out this property and use the Widget Library URL, which you can set on a Profile in the Administration app.

The keys name, description, icon, element, and version are mandatory. If your JSON is missing any of these keys, it is rejected with an error message.

note

The id key is no longer used. Every widget is given an id by backend on save.

A correct example of a widget JSON file looks as follows:

{
"name": "My Angular Web Component",
"description": "Basic web component",
"tags": ["widget", "demo", "api"],
"version": "1.0.0",
"id": "2cf3b631-437b-481c-83ba-e2d1ae4ac84e",
"element": "<app-my-web-component></app-my-web-component>", //matching the name of the custom element created earlier
"icon": "neo-icon-sort",
"files": ["/demo-web-component.js"],
"override_url": "http://135.123.64.180:8443"
}

If you upload a correct widget JSON file, your can see your widget appeared in the Widget Manager. If the import failed, ensure that:

  • The widget is not missing mandatory fields.
  • The widget has a unique name.
  • The widget has a unique element property.
  • The widget has less than 11 tags.
  • The JSON file is valid.