Plugin Manifest


The plugin-manifest.json file helps you store all the configuration information for the extension. The various keys included in this file are as follows:
 

plugin-manifest.json

Copied{
  "locale": [
    "en",
    "ta"
  ],
  "service": "DESK",
  "storage": false,
  "whiteListedDomains": [
    "https://webhook.site",
    "https://desk.zoho.com"
  ],
  "modules": {
    "widgets": [
      {
        "location": "desk.ticket.detail.rightpanel",
        "url": "/app/widget2.html",
        "name": "Desk Extension",
        "logo": "/app/img/logo.png",
        "icon": "/app/img/icon.png"
      }
    ]
  },
  "cspDomains": {
    "connect-src": []
  },
  "zohoAuthorisation": {
    "type": "connectors",
    "connectionLinkName": "zohodesk",
    "connectionName": "zohodesk",
    "serviceName": "zlabs_integration",
    "userAccess": true,
    "isUserDefinedService": false,
    "sharedBy": "1234567",
    "scope": [
      "Desk.tickets.ALL"
    ]
  },
  "connectors": [
    {
      "connectionLinkName": "woocommtest",
      "connectionName": "woocommtest",
      "serviceName": "woocommerce",
      "userAccess": true,
      "isUserDefinedService": false,
      "sharedBy": "1234567"
    }
  ],
  "config": [
    {
      "displayName": "API Key",
      "name": "apikey",
      "secure": true,
      "type": "text",
      "description": "To get the api key [visit here](https://test.requestcatcher.com)",
      "mandatory": true,
      "userdefined": true,
      "authType": "org"
    }
  ],
  "moduleSupport": false,
  "updateBefore": "2024-01-15T04:49:09.963Z",
  "secret":"mysecretkey"

}
 

Locale 

Locale is used for language support in the extension. If you wish to support multiple languages in your extension, you must store all translation files in the '{{Locale Code}}.json' (for e.g., {{en}}.json) format inside the translations folder of the extension's project app folder (/app/translations). This will return the corresponding language file based on the country locale and language selected by the user in the Personal Settings preferences.

Refer below for the list of supported languages.

LanguageLocale Code
Englishen
Japaneseja
Chinese (China)zh
Chinese (Taiwan)tw
Spanish (Spain)es
Germande
Frenchfr
Turkishtr
Russianru
Portuguese (Brazil)pt
Italianit
Dutchnl
Danishda
Polish (Poland)pl
Swedishsv
Bahasa Indonesiaid
Hindihi
Romanianro
Tamilta
Telugute
Hebrew (Beta)he
Arabic (Beta)ar

Default value of the extension locale - [ 'en' ] 

Copied"locale": [
    "en",
    "ta"
  ]
 

Service 

This key defines the ZOHO service for which this extension is created. By default, an entry "service": "DESK" is given in the plugin-manifest file.

Copied"service": "DESK"
 

Storage 

This key determines whether the extension will utilize data storage. It is of the Boolean type.

By default, it is set to False. If storage is set to True, it enables you to store data that can be utilized within your extension.

For more information on storage, click here.

Copied"storage": true
 

White Listed Domains

Access to data from Zoho Desk and third-party services is made possible through Request Method. Only domains specified under the 'whiteListedDomains' key are allowed to make API calls. Requests from domains not included in this key will not be processed. If your extension does not require requests to third-party services, you can declare this key as an empty array.

Copied"whiteListedDomains": [
    "https://webhook.site",
    "https://desk.zoho.com"
  ]


 

Dynamic White Listed Domains

You may not always be aware of the domain you need to add ahead of time. Assume you need to obtain the user input for the domain that the customer is using to make the API call. In that case, you couldn't add it to whitelistedDomains as a static value. As a solution for this, whiteListedDomains can be added dynamically.

This can be achieved by getting the domain from user as  a config param and adding it directly to the plugin manifest as the example below.

The Domain url entered in the configParam will be used in whiteListedDomains dynamically.

Copied//Config Param entry

"config": [{
  "displayName":"Domain url",
  "name": "domainurl",
  "secure": true,
  "type":"text",
  "description": "Copy your Domain Url Here  (https://{domainurl})",
  "mandatory": true,
  "userdefined": true,
  "authType" : "org"
}]

//whiteListedDomains entry

"whiteListedDomains": [
    "https://{{domainurl}}"
  ],
 

Modules 

The extension currently includes only widgets as its modules. However, in the future, buttons, menus, and tabs will also be made available as additional modules.


Widgets:

This key is an array of objects, wherein each object includes details of the widgets created for the extension. An extension can have more than one widget with a set of properties. To know more about widgets, click here.

Copied//Normal Widget

"modules": {
    "widgets": [
      {
        "location": "desk.ticket.detail.rightpanel",
        "url": "/app/widget2.html",
        "name": "Desk Extension",
        "logo": "/app/img/logo.png",
        "icon": "/app/img/icon.png"
      }
    ]
  },
//Multi DC Widget

"modules": {
  "widgets": [
    {
      "name": "Desk Extension",
      "icon": "/app/img/icon.png",
      "logo": "/app/img/logo.png",
      "location": "desk.ticket.detail.rightpanel",
      "url": "https://desk.zoho.com/",
      "other_dc_urls": {
	        "EU": "https://european-union.europa.eu/index_en",
	        "IN": "https://www.india.gov.in/",
	        "AU": "https://www.australia.gov.au/",
	        "CN": "https://www.gov.cn/english/"
      }
    },
  ]
}
 

CSP Domains

This 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 (Other than ZOHO), you need to add them to the 'connect-src' list.

Copied"cspDomains": {
    "connect-src": [""]
  },
 

Connectors 

Connectors are arrays of objects that facilitate the seamless integration of extensions with third-party services. In these integrations, Zoho Desk typically handles the authorization of the third-party services. As a developer, you simply need to add the necessary functionalities for the integration by following the provided guidelines. Zoho Desk handles the authorization of third-party services listed in the connectors page. For detailed instructions on how to configure connectors, please refer to the 'Configuring Connectors' section.

Copied"connectors": [
    {
      "connectionLinkName": "wcconnection",
      "connectionName": "wcconnection",
      "serviceName": "woocommerce",
      "userAccess": true,
      "isUserDefinedService": false,
      "sharedBy": "1234567"
      "scope": " "
    }
  ]
 

Zoho Authorisation

ZohoAuthorization helps seamlessly integrate extensions with Zoho services. 'zohoAuthorization' is a JSON object that facilitates the integration of extensions with Zoho services. In these integrations, Zoho Desk typically handles the authorization of Zoho services.

You only need to add the required functionalities for the integration by following the provided guidelines.

➤ First, configure zohoAuthorisation by Creating a Zoho service connection by following the steps in the Sigma Connections Guide.

➤ On the Connection Summary page, under the JSON tab, copy the JSON data of the connection and use it in the zohoAuthorisation key.

Note: Since zohoAuthorisation is handled under Sigma connections, you must add an extra key called type with the value connectors inside the zohoAuthorisation key.

 

Copied"zohoAuthorisation": {
    "type": "connectors",
    "connectionLinkName": "zohodesk",
    "connectionName": "zohodesk",
    "serviceName": "zlabs_integration",
    "userAccess": true,
    "isUserDefinedService": false,
    "sharedBy": "1234567",
    "scope": [
      "Desk.tickets.ALL"
    ]
 

Config

The 'configParams' key defines the installation parameters, also known as config params, to be configured during the installation of the extension. For more information on config params, please refer to the 'Config Params' section.

Copied"config": [{
   "displayName":"API Key",
   "name": "apikey",
  "secure": true,
  "type":"text",
  "description": "To get the api key [visit here](https://test.requestcatcher.com)",
  "mandatory": true,
   "userdefined": true,
   "authType" : "org" 
    }]
 

Module Support

When moduleSupport is enabled, the CLI will generate a basic React app template for you. Additionally, JavaScript module support will be included and enabled. Since the code is organized into different modules, we will use webpack to bundle the extension."

By using webpack as a module bundler, it allows you to combine and package the various modules of your extension into a single bundle file. Also, helps you optimize the loading and execution of your extension code, ensuring that all the required modules are included and available for the extension to function properly.

Copied"moduleSupport": true
 

Update Before

This key defines a timeframe for updating an extension. It will display a message that the extension will be deprecated (even though it will not actually be deprecated) in the extension list view. Additionally, it sends an email to the installed users, covering both the content of the email (update availability and deprecation notice).The purpose of this key is to force the user to update the extension to the latest version.

The date must be provided in the ISO format, which follows a specific pattern for representing dates and times, as given in example.

Copied"updateBefore": "2024-01-15T04:49:09.963Z"
 

Secret

The secret is a passphrase that helps generate a hash for the invoke API.

Copied"secret":"mysecretkey"