Custom Variables

Custom Variables

Custom variables are global variables that store static information in your CRM. This allows you to replace certain key values- such as username or brand- in various elements of CRM, allowing customers to easily make system-wide changes and personalizations.

Custom variables can also be used to update important organization-specific integration data such as auth tokens, usernames, and passwords, enabling users to add or update their security information in a single step. These account-specific values vary from user to user, so they cannot be entered by the developer during the design process. Custom variables make it easy for the end user enter this information themselves then populate it throughout the system automatically. This delivers a seamless integration experience and eliminates unnecessary system maintenance.

 Create a custom variable

To set up a custom organization variable

  1. Log in to Zoho Developer Console and click Extensions for Zoho CRM.
  2. In Extensions for Zoho CRM page, select the extension in which you'd like to add the custom variable.
  3. Click Extension Settings in the left pane, then click Create.
  4. In the Extension Settings page, provide the following details:
    • Provide a suitable Field Name.
    • Provide an API Name.
    • Enter a Value for the variable.
      This is not mandatory, but you may be prompted to fill in a value when an extension is installed.
  5. Click Save.


The API Name and Field Name must be the same. The system will append an appropriate prefix to make it unique. For example: If the Extension Name is Leads Score,Field Name is Authtoken, and API Name is Authtoken, when the variable is saved, the API name will be set as leadsscore.Authtoken.


Consider an extension that will integrate your Zoho CRM account with Zillow- an online real estate database company. This integration will help users track property information and update it in Zoho CRM automatically using a Zillow-specific ID called zwid. This zwid must be provided as a custom variable to facilitate this integration. This custom variable can then be invoked using a custom function to help us extract the data from Zillow and display it as related list.

To integrate Zillow with Zoho CRM

  1. Create an extension named Zillow using Zoho Developer Console.
  2. Create a custom variable with the following parameter values:
    • Field Name is zws-id.
    • API Name is zws-id.
      The API Name will automatically be modified as zillow.zws-id.
    • Provide a random Value in the space provided.
    • Click Save.
  3. Click the Write Script in the Field Value-On Change option to write the code snippets.The variable action scripts are small snippets of codes or commands that are to be executed immediately after the custom variable change.

    The Variable VariableMap

    The variableMap variable can be used only in the Field Value - On change action to obtain the old and new values of a custom variable from Zoho CRM.

    The syntax for getting the old value of the custom variable is

    <oldvalue> = input.variableMap.get("oldvalue");

    The syntax for getting the new value of the custom variable is

    <newvalue> = input.variableMap.get("newvalue");

    The sample script to be written in the editor is

    oldzwsid = input.variableMap.get("oldvalue");
    newzwsid = input.variableMap.get("newvalue");

  4. Once the integration is authorized, the data will be pulled from Zillow and stored in your CRM as a related list.

Share this post : FacebookTwitter

Still can't find what you're looking for?

Write to us: