How to migrate to platform version 2.2

What is the platform version?

The platform version is stored in the app manifest. It helps to track backward compatibility with respect to the framework.
It is automatically generated when creating a new app from the boilerplate templates.

Why change now?

When the platform framework changes, a new platform version is released with the breaking changes that are non-backward compatible.

To support a few changes in the app platform framework, platform version 2.2 has been released as part of FDK v6.13.0. Platform versions 2.0 and 2.1 will be deprecated due to security updates that will be part of this newer platform version.

Changes from previous platform versions

Sl. No. Platform framework change Supported platform version
1 Serverless Events registered in the manifest 2.1 or greater
2 If Omni-app, support for multi products added in the manifest 2.1 or greater
3 SMI functions are registered separately in the app manifest. Refer to the sample app manifest at the end of the article 2.2
4 Serverless events callback functions used for SMI to be registered in the manifest 2.2

What does it mean for app developers?

As the previous platform versions (2.0 and 2.1) are being deprecated with this release, please make changes in your app manually to move to platform version 2.2.

Changes for Platform version 2.0 apps

  • Change the platform version to 2.2 in the app manifest (manifest.json in the app root directory)
  • Register the Serverless events and SMI function in the app manifest and remove the events code block from server.js. Refer to the sample code at the end of this article.

Changes for Platform version 2.1 apps (Omni apps)

  • Change the platform version to 2.2 in the app manifest (manifest.json in the app root directory)
  • Register the SMI function in the app manifest and remove the events registration from server.js if any. Refer to the sample code at the end of this article.

Example app manifest

{
  "platform-version": "2.2",
  "product": {
      "freshdesk": {
          "location":{
              "ticket_sidebar": {
                  "url": "index.html",
                  "icon": "styles/images/icon.svg"
              }
          },
          "events": {
              "onAppInstall": {
                  "handler": "onAppInstallHandler"
              },
              "onAppUninstall": {
                  "handler": "onAppUninstallHandler"
              },
              "onTicketCreate": {
                  "handler": "onTicketCreateHandler"
              },
              "onScheduledEvent": {
                  "handler": "onScheduledEventHandler"
              },
              "onExternalEvent": {
                  "handler": "onExternalEventHandler"
              }
          },
          "functions": {
              "mySMIFunction": {
                  "timeout": 10
              },
              "onTicketCreateHandler": {
                  "timeout": 20
              }
          },
      }
  },
  "whitelisted-domains": ["sample.freshdesk.com"]
}
6 Likes

Is it required to register onAppInstall and onAppUninstall as well?

Hi @arunrajkumar235,

Yes, all the Serverless events are registered via app manifest file only.
I will add them as well to the example in the article.

1 Like