Variables in Zoho Vertical Solutions platform acts as a container to store data, which can be reused across different parts of our platform. It helps in automating mundane processes, tailoring user experiences, and integrating with other applications. To learn more about Variables, refer to
this help guide.
Detailed Overview of Variables in Vertical Solutions
Unlike Zoho CRM variables, the platform variables come with added benefits as they require higher customizability, integration capabilities, and developer control. It also helps in security management, versioning, and debugging to offer greater flexibility and reliability.
Permission Categories
You can set permissions on variable usage for the end users from the developer console. Following are the four permission categories:
- Read/Write: A variable with this permission is visible in the subscriber's organization, allowing them to view and modify its value. However, any changes to the values of the variable in the developer console cannot be deployed as an upgrade and will not reflect in the subscriber’s organization. However, the changes will reflect on new sign-ups. Refer to this document to learn more about component packaging.
- Read Only: A Read Only variable is visible but cannot be modified in the subscriber’s organization, and its value does not change upon upgrades from the developer console.
- Hidden: The Hidden variable is visible in the Developer Console for developers to manage, but it remains hidden for the end users within the subscriber's organization. Any changes to the values of the variable in the developer console can not be upgraded to the subscriber's account. However, the changes will reflect on new sign-ups. Refer to this document to learn more about component packaging.
- System: A System variable is visible in the Developer Console for developers to manage and remains hidden for the end users in the subscriber's organization. Changes made to the variable value in the developer console are reflected to the subscriber's account during upgrade.
![Notes](https://static.zohocdn.com/zoho-desk-editor/static/images/file.png/)
Note
- In the subscriber's org, the value of variables can be updated via API for all the categories except for the System variable.
- Hidden and System Variables cannot be used as merge fields in other components.
Read/Write and Read-Only variables can be associated as merge fields in the following components:
- Tasks
- Webtabs
- Custom Buttons
- Custom Links
- Mail Merge Templates
- Webhooks
- Custom Funtions
- Email Templates
- Creating Record in Workflow Rules
On Change Script
In the Developer Console, we support the use of a 'Change Script' to manage developer-created processes when a variable's value is updated in a Subscriber Organization. A change script is a Deluge function that uses both the old and new variable values as parameters. This allows developers to update the relevant processes with the new variable value effortlessly without any disruptions.
To facilitate this, a pre-defined object variable called 'variableMap' is used within the 'Field Value - On Change' action. This object allows the developer to obtain the old and new values of a custom variable. To implement this, navigate to the Field Value-On Change tab in the desired variable and click on Write Script to create your change script.
Following is the syntax to retrieve the old and new values of a variable:
<oldvalue> = input.variableMap.get("oldvalue"); <newvalue> = input.variableMap.get("newvalue");
|
In the variableMap object mentioned above, the oldvalue key retrieves the value of the variable before it was changed. Whereas the newvalue key fetches the new value of the variable after the change.
Packaged Variables
Packaged Variables are the ones that are created in the Developer console and deployed in the subscriber organizations during Signup or via upgrade. Following content will explain the behavior of such Variables.
To know more about packaging, refer to our guide on
Components Packaging in Zoho Vertical Solutions Platform.
Property | Upgrade Type | Modify Access |
Variable Name | Upgradable | Developer Only |
API Name | Non-upgradable | Non-Editable |
Description | Upgradable | Developer Only |
Data Type | Non-upgradable | Non-Editable |
Permission | Upgradable | Developer Only |
Grouped Under | Non-upgradable | Non-Editable
|
Changes and Impacts
When a packaged Variable is modified, published, and pushed as an upgrade to the subscribers' accounts, the impacts to the existing processes that are associated with the variable are explained below.
1. Adding a New Variable
Introducing a new variable will not impact any existing subscribers. The new variable can be utilized in future processes without disrupting existing customizations.
2. Editing a Variable
Changes to the 'Description' and 'Variable Name' properties will not affect anything. However, changes to a variable's 'Permission' property will directly impact its visibility and the level of access users have for modifying the variable. It depends on the permission category (Read/Write, Read Only, Hidden, System) outlined above.
When a variable's value changes, it can significantly affect any processes that rely on the original value. Developer-defined processes can be updated automatically using a change script. However, end users will need to manually update their functions with the new value to ensure everything continues to work precisely.
3. Deleting a Variable
When you delete a variable, it impacts all the existing processes that rely on it. Without the variable, these processes and their associated components will no longer function properly, as they will lose the essential values for their operation.
![Warning](https://static.zohocdn.com/zoho-desk-editor/static/images/caution.png/)
Caution!
Deleting a Variable is a destructive change. It can have lasting effects on your subscriber data and configurations. Please consider the consequences carefully before proceeding, and only move forward if absolutely necessary.