The Upgrade Function is a startup action in Zoho Vertical Studio that automatically triggers when a subscriber is upgraded to a new version. This function allows developers to execute custom logic during the upgrade process. This functionality is similar to the Sign-Up Function, but the key difference lies in the trigger point—it is executed during a version upgrade rather than during the initial Sign Up process.
To create an Upgrade Function:
Log in to the Zoho Developer Console.
Click on Vertical Studio.
Select the application you want to modify.
Click Edit.
In the left panel, click on Startup Actions.
Select Functions > Upgrade Function.
Enter the required code in the Deluge Script Editor.
Click Save & Execute to test the code, or simply Save.

To delete the Upgrade Function, remove all the contents from the Deluge Script Editor and click Save.
Variable | Description & Usage Syntax |
organizationId | A unique identifier for the subscriber's organization. <variable_name> = input.upgradeMap.get("organizationId"); |
previousVersion | The version of the application the subscriber was using before the upgrade. <variable_name> = input.upgradeMap.get("previousVersion"); |
currentVersion | The new version of the application to which the subscriber is being upgraded. <variable_name> = input.upgradeMap.get("currentVersion"); |