Global Variables - Extension

Global Variables - Extension

Variables

Variables in Zoho People Extension are used to create key-value pairs that can be accessed across components, scripts, workflows, templates, and other areas of the platform. They act as reusable data holders, allowing you to store information once and use it wherever needed within the system. Learn more about Variables and the Usage of Varibles in an organization.

Detailed Overview of Variables in Zoho People Extension

Unlike Zoho People variables the platform variables come with added benefits as they require higher customizability, integration capabilities, and developer control. When a variable value changes, you can run custom logic automatically (For example: Notify, adjust related settings, recall values in other modules).

Permission Categories

You can set permission on variable usage for the end users from the extension platform.
Following are the four types of permission categories:
  1. Read/Write: This permission makes the variable visible in the users organization, where they can view and update its value. However, if you change the value in the developer console, those updates cannot be pushed through an upgrade and won’t reflect in the users organization. Such changes apply only to new sign-ups. During future extension upgrades, you can update all other details of the variable except its value.

  2. Read Only: A Read Only variable is visible but cannot be modified in the users organization, and its value does not change upon upgrades from the developer console. However, except the variable value of the other variable data can be updated during the extension in the next version upgrade. 

  3. Hidden: The Hidden variable is visible in the Developer Console for developers to manage, but it remains hidden for the end users within the user's organization. Any changes to the values of the variable in the developer console can not be upgraded to the users account. However, the changes will reflect on new sign-ups and except the variable value the other data of the variable can be updated during the extension in the next version upgrade. 

  4. System: A System variable is visible in the Developer Console for developers to manage and remains hidden for the end users in the user's organization. Any changes to the values of the variable in the user's organization is restricted for this permission type. Changes made to the variable value in the developer console are reflected to the users account during upgrade. 
Permission type
Visibility
(In Developer organization)
Visibility
(In Customer organization)
Value updated during extension upgrade
READ/WRITE
 Yes Yes No
 READ_ONLYYes Yes No
 HIDDEN YesNo No
 SYSTEM Yes NoYes

Notes
  1. In the users organization the value of the variables can be updated via API for all the categories except the SYSTEM Permission variable.
  2. HIDDEN and SYSTEM permission variables cannot be used as merge fields in other components.
  3. Except the SYSTEM permission variable all other permission variables can have its own On Change Script function.

Variables can be used in the following contexts

  1. Custom Functions - Dynamically access values in code logic and calculations.
  2. Email Templates - Personalize messages using pre-defined variable values.
  3. Record Templates - Inject data dynamically when creating or displaying records.
  4. Mail Merge Templates - Use variables in document generation for seamless data population.
  5. API Integrations - Access variable values through APIs for external systems or integrations.
  6. On Change Script Functions - A separate custom function support. Each variable can have its own On Change script function which will be triggered when the variable value is updated.

Variables Property Packaging

Packaged Variables are the ones that are created in the Developer Console and deployed in the users organization during signup or via upgrade. The following table will explain the behaviour of such variables. 

Property
Upgrade Type
Modify Access
Variable Name
Upgradable
 Developer Only
API Name
 Non - Upgradable
Non - Editable
Description
 Upgradable
Developer Only
Variable Type
 Non - Upgradable
Non - Editable
Permission
 Upgradable
Developer Only
Grouped Under
 Non - Upgradable
Non - Editable

On Change Script Function

In the Zoho People Extension Developer Console, developers can define Change Scripts to handle logic that should be executed whenever a global variable’s value is updated in the user's organization.

How It Works

When a variable is modified, the system invokes the associated Change Script and provides both the previous and updated values to the script. This ensures that you have full context to determine what should happen as a result after the change. To support this, a predefined input object named variableMap is passed to your script. This object contains the old and new values of the variable.

Script Setup

To add a Change Script:
  1. Go to the Field Value - On Change tab in your desired variable configuration.
  2. Click Create Script.
  3. In the editor, use the variableMap object to access the previous and current values.

Sample Syntax

  1. oldValue - The value of the variable before the change.
  2. newValue - The value after the update.
Info
You can use these values to build your own logic.

For example:
if (oldVal != newVal)
{
   // Run custom logic here
   info "Variable updated from " + oldVal + " to " + newVal;
}

Use Case:
Some examples of how you might use a Change Script:
  1. Recalculate dependent fields whenever a configured variable is updated.
  2. Notify users or admins when important settings are changed.
  3. Reset values or workflows when thresholds are modified.
  4. Update API calls or integrations that rely on global settings.

Installation Setup

  1. When the user installs the extension and if the extension contains any variables, the Authorize Variables tab will be displayed on the installation page.



  2. In this tab, variables with Read/Write and Read-Only permission types are visible. The Read-Only variables are not editable, while the user can configure the Read/Write variables directly on the installation page.
  3. If the user skips this step during installation, they can later edit the variable values either through the extension configuration slider or from the Variables tab inside the Developer Space.

Changes and Impacts

When global variables are added or updated in your Zoho People extension and pushed as part of a package upgrade to users organization, it's important to understand how these changes affect existing implementations.

Below is a detailed breakdown of the impact based on the type of change made to a variable.

Adding a new variable

  1. Introducing a new global variable through an upgrade will not interfere with any existing configurations in users organization.
  2. The variable becomes available for use in new workflows, scripts, or field configurations.
  3. Existing features and user-defined processes will continue to function the same.
  4. You can treat it as a clean addition, no retroactive effect on current setups.

Updating an existing variable 

Changes to an existing variable may have varied levels of impact, depending on what’s modified:

Safe Modifications:
  1. Updating the description or name of a variable has no impact on existing references or functionality.
  2. These are purely cosmetic or informational changes.
Impactful Modifications:
Permission Changes - Adjusting the access level (e.g. Read/Write → Read Only, or Read/Write → Hidden) will immediately affect how that variable behaves in an user's organization.
  1. Hidden/System variables may no longer appear in configuration UIs.
  2. End users may lose the ability to edit values.
Value Changes - If the default value of a variable is changed in the package:
  1. Any script, workflow, or process depending on the old value may behave differently.
  2. Developers can use Change Scripts to programmatically handle these transitions.
  3. However, end users must manually update their custom logic to adapt to the new value.
Notes
Even a small value change could affect thresholds, conditions, or calculations relying on the old setting.

Deleting a variable

Warning
Deleting a variable is a destructive change. It can have lasting effects on your users data and configurations. Please consider the consequences carefully before proceeding, and only move forward if absolutely necessary.
Deleting a global variable is a high-impact, irreversible operation that must be done with extreme caution.
  1. Any process, field, script, or workflow that references the deleted variable will break.
  2. This may cause runtime errors, missing values, or logic failures across the extension.
  3. There is no automatic fallback or replacement unless explicitly coded.
Notes
Removing a variable can disrupt live user environments. Only delete variables that are obsolete, unused, and have no downstream dependencies and preferably during a major version upgrade with clear release notes.

Use case: IDfy Integration for Zoho People Extension

Consider an extension that will integrate your Zoho People extension with IDFy to perform background verifications of employees. Employee details (like Aadhaar Number, PAN, Name, DOB) are captured in employee forms. By submitting the form, the extension triggers a background verification request to IDfy via APIs. Verification results (pass/fail, status, details) are saved back to the employee record. The extension supports a custom UI widget or Web Tab where HR admins can view verification status, trigger checks, and configure integration settings.

Variables Setup 

You will package variables in your extension for customers to configure and secure sensitive info.

Variable NameDescriptionPermission
 idfy_api_key Secret API key for IDfyRead/Write
 idfy_client_id Client ID issued by IDfyRead/Write
 idfy_access_token Sandbox or productionHidden
 idfy_refresh_token IDfy labelHidden
 Dev_Contact Developer use system variableSystem

Extension Flow

  1. Installation and initial setup
    1. User's organization installs the extension.
    2. On the installation page, user enters:
      - idfy_client_id (read/write)
      - idfy_client_secret (read/write)
    3. Once idfy_client_secret is entered and saved, it triggers the On Change script tied to this variable.

  2. On Change Script for idfy_client_secret
    1. This script changes the permission of idfy_client_secret from Read/Write to Hidden via Variables API. This locks the secret, so users can no longer see or modify it. 
    2. Then, the script triggers the OAuth token generation flow to request access and refresh tokens from IDfy using the client ID and secret.
    3. The received access_token and refresh_token are stored as new hidden variables (idfy_access_token, idfy_refresh_token) created/updated dynamically via the Variables API.

  3. Employee verification flow (Triggered by webtab UI)
    1. User's organization employees open a webtab UI to enter an employee’s details (e.g., Aadhaar number) for IDfy verification.
    2. When they submit, the following standalone functions are triggered. 
      - Reads the hidden OAuth tokens (idfy_access_token, idfy_refresh_token) variables.
      - Calls the IDfy verification API using the access token.
      - Processes the verification response and updates employee records
    3. If the access token has expired, the function can use the refresh token to obtain a new access token and update the hidden variable.

      Create. Review. Publish.

      Write, edit, collaborate on, and publish documents to different content management platforms.

      Get Started Now


        Access your files securely from anywhere

          Zoho CRM Training Programs

          Learn how to use the best tools for sales force automation and better customer engagement from Zoho's implementation specialists.

          Zoho CRM Training
            Redefine the way you work
            with Zoho Workplace

              Zoho DataPrep Personalized Demo

              If you'd like a personalized walk-through of our data preparation tool, please request a demo and we'll be happy to show you how to get the best out of Zoho DataPrep.

              Zoho CRM Training

                Create, share, and deliver

                beautiful slides from anywhere.

                Get Started Now


                  Zoho Sign now offers specialized one-on-one training for both administrators and developers.

                  BOOK A SESSION







                              Quick LinksWorkflow AutomationData Collection
                              Web FormsEnterpriseOnline Data Collection Tool
                              Embeddable FormsBankingBegin Data Collection
                              Interactive FormsWorkplaceData Collection App
                              CRM FormsCustomer ServiceAccessible Forms
                              Digital FormsMarketingForms for Small Business
                              HTML FormsEducationForms for Enterprise
                              Contact FormsE-commerceForms for any business
                              Lead Generation FormsHealthcareForms for Startups
                              Wordpress FormsCustomer onboardingForms for Small Business
                              No Code FormsConstructionRSVP tool for holidays
                              Free FormsTravelFeatures for Order Forms
                              Prefill FormsNon-Profit

                              Intake FormsLegal
                              Mobile App
                              Form DesignerHR
                              Mobile Forms
                              Card FormsFoodOffline Forms
                              Assign FormsPhotographyMobile Forms Features
                              Translate FormsReal EstateKiosk in Mobile Forms
                              Electronic Forms
                              Drag & drop form builder

                              Notification Emails for FormsAlternativesSecurity & Compliance
                              Holiday FormsGoogle Forms alternative GDPR
                              Form to PDFJotform alternativeHIPAA Forms
                              Email FormsFormstack alternativeEncrypted Forms

                              Wufoo alternativeSecure Forms

                              TypeformWCAG


                                          Create. Review. Publish.

                                          Write, edit, collaborate on, and publish documents to different content management platforms.

                                          Get Started Now




                                                            You are currently viewing the help pages of Qntrl’s earlier version. Click here to view our latest version—Qntrl 3.0's help articles.




                                                                Manage your brands on social media


                                                                  • Desk Community Learning Series


                                                                  • Digest


                                                                  • Functions


                                                                  • Meetups


                                                                  • Kbase


                                                                  • Resources


                                                                  • Glossary


                                                                  • Desk Marketplace


                                                                  • MVP Corner


                                                                  • Word of the Day


                                                                  • Ask the Experts


                                                                    Zoho Sheet Resources

                                                                     

                                                                        Zoho Forms Resources


                                                                          Secure your business
                                                                          communication with Zoho Mail


                                                                          Mail on the move with
                                                                          Zoho Mail mobile application

                                                                            Stay on top of your schedule
                                                                            at all times


                                                                            Carry your calendar with you
                                                                            Anytime, anywhere




                                                                                  Zoho Sign Resources

                                                                                    Sign, Paperless!

                                                                                    Sign and send business documents on the go!

                                                                                    Get Started Now




                                                                                            Zoho TeamInbox Resources





                                                                                                      Zoho DataPrep Demo

                                                                                                      Get a personalized demo or POC

                                                                                                      REGISTER NOW


                                                                                                        Design. Discuss. Deliver.

                                                                                                        Create visually engaging stories with Zoho Show.

                                                                                                        Get Started Now








                                                                                                                            • Related Articles

                                                                                                                            • Global Variables

                                                                                                                              What is Zoho People Variables? Zoho People variables are pseudo-module fields that are used to store static and reusable information in your Zoho People account. A Zoho People Variable can have a unique set of values and can be widely used as merge ...
                                                                                                                            • Global Variables - Usage Guide

                                                                                                                              Using Variables in Zoho People With Zoho People, you can use variables to add dynamic content to emails, letters, mail merge templates, and custom functions. Variables store commonly used values, such as company-specific details, and can be applied ...
                                                                                                                            • Extensions

                                                                                                                              What is meant by extensions in Zoho People? An extension is a software add-on that enhances the functionality of your service. You can build extensions using various languages, including HTML, JavaScript, and CSS. Sigma also offers functions for ...
                                                                                                                            • Employee Onboarding Flow

                                                                                                                              The Employee Onboarding Flow is designed for the new hires who have joined your organization. This flow can be initiated on their date of joining to provide them with a comprehensive introduction to the company. It includes forms to fill in required ...
                                                                                                                            • Testing Your Extensions

                                                                                                                              Introduction Before you deploy and publish your Extensions, and to ensure your extension works well, it's important to test it. Testing helps you find and fix any issues early. Zoho Developer Console provides a sandbox environment where you can test ...
                                                                                                                              Wherever you are is as good as
                                                                                                                              your workplace

                                                                                                                                Resources

                                                                                                                                Videos

                                                                                                                                Watch comprehensive videos on features and other important topics that will help you master Zoho CRM.



                                                                                                                                eBooks

                                                                                                                                Download free eBooks and access a range of topics to get deeper insight on successfully using Zoho CRM.



                                                                                                                                Webinars

                                                                                                                                Sign up for our webinars and learn the Zoho CRM basics, from customization to sales force automation and more.



                                                                                                                                CRM Tips

                                                                                                                                Make the most of Zoho CRM with these useful tips.



                                                                                                                                  Zoho Show Resources