The manifest.json file contains information such as the platform version used by a product, locations on the product UI where an app can be rendered (for front-end apps), dependent packages used by the app, SMI functions that can be invoked from an app’s front-end component, events and the corresponding callbacks (for serverless apps), and the Node.js and FDK versions used to build, test, validate, and pack the app. For apps built using FDK version 9.0.0 or later, if the app is expected to make third-party HTTP calls, manifest.json lists the configured request templates that the app invokes to construct and send secure HTTP requests to the third-party domains. For apps built using an FDK version prior to 9.0.0 (platform version 2.2), manifest.json whitelists all the third-party domains with which the app can interact. This section details the various attributes of the manifest.json file.
Manifest.json file
Sample
Copied Copy1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 | { "platform-version": "2.3", "product": { "freshworks_crm": { "location": { "left_nav_cti": { "url": "template.html", "icon": "logo.svg" } }, "requests": { "createContact": {}, "getContacts": {} } } }, "engines": { "node": "18.12.1", "fdk": "9.0.0" }, "dependencies": { "nodemon": "1.14.12" } } |
Sample manifest.json for serverless apps
Copied Copy1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | { "platform-version": "2.3", "product": { "freshworks_crm": { "events": { "onContactCreate": { "handler": "onContactCreateHandler" }, "onExternalEvent": { "handler": "onExternalEventHandler" } }, "requests": { "createContact": {}, "getContacts": {} } } }, "engines": { "node": "18.12.1", "fdk": "9.0.0" } } |
Sample manifest.json for serverless SMI apps
Copied Copy1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 | { "platform-version": "2.3", "product": { "freshworks_crm": { "location": { "left_nav_cti": { "url": "index.html", "icon": "styles/images/icon.svg" } }, "events": { "onContactCreate": { "handler": "onContactCreateHandler" }, "onExternalEvent": { "handler": "onExternalEventHandler" } }, "functions": { "serverMethod": { "timeout": "10" } }, "requests": { "createMessage": {}, "getMessages": {} } } }, "engines": { "node": "18.12.1", "fdk": "9.0.0" }, } |
Sample - platform version 2.2
Copied Copy1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | { "platform-version": "2.2", "product": { "freshworks_crm": { "location": { "left_nav_cti": { "url": "template.html", "icon": "logo.svg" } } } }, "engines": { "node": "12.22.6", "fdk": "7.0.0" }, "dependencies": { "nodemon": "1.14.12" }, "whitelisted-domains": [ "https://www.google.com" ] } |
Sample manifest.json for serverless apps - platform version 2.2
Copied Copy1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | { "platform-version": "2.2", "product": { "freshworks_crm": { "events": { "onContactCreate": { "handler": "onContactCreateHandler" }, "onExternalEvent": { "handler": "onExternalEventHandler" } } } }, "engines": { "node": "12.22.6", "fdk": "7.0.0" }, "whitelisted-domains": [ "https://www.google.com" ] } |
Sample manifest.json for serverless SMI apps - platform version 2.2
Copied Copy1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 | { "platform-version": "2.2", "product": { "freshworks_crm": { "location": { "left_nav_cti": { "url": "index.html", "icon": "styles/images/icon.svg" } }, "events": { "onContactCreate": { "handler": "onContactCreateHandler" }, "onExternalEvent": { "handler": "onExternalEventHandler" } }, "functions": { "serverMethod": { "timeout": 10 } } } }, "engines": { "node": "12.22.6", "fdk": "7.0.0" }, "whitelisted-domains": [ "https://www.google.com" ] } |
Attributes
Attribute Name | Date Type | Description | ||
---|---|---|---|---|
platform-version | string | Specifics the platform version used to build the app, auto-generated when the app files are created. The version information is used to ensure backward compatibility when a new platform version is released. | ||
product Mandatory |
object | Associates a Freshworks product with the information that is necessary to render the app on the specified product. (Child attribute: freshworks_crm) |
||
freshworks_crm Mandatory |
object | Specifies information that is necessary to render the app on the Freshsales Suite UI. (Child attribute: location or events (for severless apps)) |
||
location Mandatory |
object | Specifies the locations on the product(s) UI, where the app is to be rendered. For more information, see Placeholders Attributes: url, icon | ||
url Mandatory |
string | Specifies the relative path from the app project directory to the HTML file based on which the app is rendered. The contents of the HTML file are used to render the app in an IFrame at the specified location. Default value: template.html (file in the app directory) |
||
icon Mandatory |
string | Specifies the relative path from the app project directory to an image file (in SVG format). The image is used as the app’s icon when the app is rendered on the UI. Ensure that the resolution of the image is 64 x 64 pixels. Default value: icon.svg (file in the app directory) |
||
requests Valid only for apps built with platform version 2.3 |
object | Specifies the configured request templates that the app code uses, for a product, in the following format.
Copied
Copy
Notes:
|
||
events Mandatory for serverless apps |
object | Contains the various serverless events and the corresponding call-back function names, specified in the following format: Copied Copy
|
||
functions Mandatory for SMI |
object | Lists the SMI functions (server methods) defined in the exports code block of server.js, in the following format:
Copied
Copy
|
||
engines | object | Specifies the Node.js version and FDK version that are used to build the app. FDK auto-populates this value.
Creating an app: If you use FDK 7.0.0 or later versions to create an app, the engines attribute is available by default as part of the manifest.json file.
Migrating an app: If you have an existing app that is built using FDK 6.x.x or an earlier version, ensure to,
|
||
whitelisted-domains Mandatory Valid only for apps built with platform version 2.2 |
array of string | Contains the third-party domains to be whitelisted for making secure HTTP calls using the Request method.
Notes:
|