Upgrade Function in Zoho Vertical Studio | Vertical Studio Help Guide

Upgrade Function

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:

  1. Log in to the Zoho Developer Console.

  2. Click on Vertical Studio.

  3. Select the application you want to modify.

  4. Click Edit.

  5. In the left panel, click on Startup Actions.

  6. Select Functions > Upgrade Function.

  7. Enter the required code in the Deluge Script Editor.

  8. Click Save & Execute to test the code, or simply Save.

Notes
Note
You can modify or delete the Upgrade Function at any time. 

 

Modifying or Deleting an Upgrade Function  

  • To modify the Upgrade Function, update the code in the Deluge Script Editor and click Save.
  • To delete the Upgrade Function, remove all the contents from the Deluge Script Editor and click Save.

upgradeMap

The upgradeMap is a key-value pair object provided as an argument to the Upgrade Function in Zoho Vertical Studio. It contains essential details about the organization being upgraded and the versions involved in the upgrade process. This map allows developers to access critical information needed to handle custom logic when a subscriber is upgraded to the next version.

Variables in upgradeMap 

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");

When the Upgrade Function is triggered, the upgradeMap is passed to the function as a parameter. You can use it to get the corresponding variable values, and define actions based on the upgrade context.