About 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"]
}
7 Likes

Is it required to register onAppInstall and onAppUninstall as well?

1 Like

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.

2 Likes

Hi, Do these changes mean that older apps with version 2.0 should also be updated? These are apps that are already installed as a custom app or uploaded in the marketplace.

Or are the changes only applicable for new apps that are stil in development?

With kind regards,

Martijn

Hi @LylMartijn,

Eventually, all the application has to be updated to platform version 2.2 from 2.0 and 2.1. The deprecation plan for the previous version of the existing apps is not announced yet.

After the previous platform versions are deprecated, all the existing published apps have to be updated to platform version 2.2. So, it will be better to make these changes for all the existing apps as well.

The deprecation plan for platform version 2.0 and 2.1 will be announced in advance and hopefully, enough time will be provided to make the transition.

A post was split to a new topic: OAuth redirect URL appends additional callback query parameter