Hello everyone!
Welcome back to another post in the Kaizen series!
This week, we will discuss what are CRM Variables and variable groups, how to create, update, and delete them through an API and the UI, and a simple example in Deluge of using a CRM variable in a function.
Let's get started!
What are CRM Variables?
Often, we have the need to reuse certain data in CRM at various places. Instead of creating separate fields to hold such values in every module, we can create an org-level field and use the same value across the CRM system. This field is called a CRM Variable.
These variables can be of any of the following data types:
- Decimal
- Single line
- Multi line
- Integer
- Long integer
- Percent
- Currency
- Date
- DateTime
- Email
- Phone
- URL
- Checkbox
Where can you use CRM Variables?
You can use CRM variables in mail merge templates, email templates, functions, workflows, buttons etc,.
What are Variable Groups?
When you have multiple variables, you can group them together for easy accessibility. For example, it makes sense to group all the authentication variables such as access token, refresh token etc., under a group called "Auth parameters".
How can you create a CRM Variable?
You can create CRM Variables from the UI or through the CRM API.
1. From the UI
- Go to Setup > Developer Space > Zoho CRM Variables > Create New Variable.
- In the Create Zoho CRM Variable pop up, enter the following details:
a. The name of the variable in the Variable Name field.
b. The API name of the variable in the API name field.
c. A brief description of the variable in the Description field.
d. The data type of the variable from the Variable Type drop-down.
e. The group that the variable must belong to in the Grouped Under drop-down. - Click Save.
2. Creating a variable through an API
Request URL: {api-domain}/crm/{version}/settings/variables
Request method: POST
Scope: ZohoCRM.settings.variables.ALL or ZohoCRM.settings.variables.CREATE
Input JSON keys
{ "variables": [ { "name": "Company Address", "api_name": "Company_Address", "variable_group": { "api_name": "General", "id": "3652397000004992001" }, "type": "textarea", "value": "#24, Austin, TX", "description": "The address of the company when the state is Texas" } ] } |
where,
Key name and data type | Description |
| The name of the variable. |
api_name string, mandatory | The API name you want to set for the variable. |
variable_group JSON object, mandatory | The API name and the ID of the variable group you want to group your variable under. If you do not have a variable group, you can only group it under "General". Use the Get Variable Groups API to get the ID and name of the variable group. |
| The data type of the variable. The possible values are integer, text(for single line), percent, decimal, currency, date, datetime, email, phone, url, checkbox(for Boolean), textarea(for multi-line), and long. |
| The value of the variable. |
description string, optional | A short description of the variable.
|
Sample Response
How can you update a CRM variable?
1. From the UI
- Go to Setup > Developer Space > Zoho CRM Variables.
- Hover over the variable you want to edit.
- Click the "Edit" icon on the left-corner of the variable.
- In the Edit Zoho CRM Variable pop up, update the relevant details.

- Click Save.
Note
You cannot edit the Variable Type and Grouped Under fields.
2. Through an API
Request URL: {api-domain}/crm/{version}/settings/variables (or)
{api-domain}/crm/{version}/settings/variables/{variable_API_name or Variable_ID}
Request method: PUT
Scope: ZohoCRM.settings.variables.ALL or ZohoCRM.settings.variables.UPDATE
Input JSON keys
Note that besides "id", all the keys are optional based on what details you want to update.
{ "variables": [ { "id":"3652397000012482002"; "name": "Company_Address", "api_name": "Company_Address", "value": "#24, Austin, TX", "description": "The address of the company when the state is Texas" } ] } |
where,
Key name and data type | Description |
| The ID of the variable you want to update. You can get this ID from the Get Variables API. |
| The name of the variable. |
| The API name you want to set for the variable. |
| The value of the variable. |
| A short description of the variable.
|
Sample Response
How can you delete a CRM variable?
1. From the UI
- Go to Setup > Developer Space > Zoho CRM Variables.
- Hover over the variable you want to delete.
- Click the "Delete" icon on the left-corner of the variable.

- Click Delete in the pop up that asks for confirmation.
2. Through an API
Request URL: {api-domain}/crm/{version}/settings/variables/{variable_id} (or)
{api-domain}/crm/{version}/settings/variables?ids=id1,id2..
Request method: DELETE
Scope: ZohoCRM.settings.variables.ALL or ZohoCRM.settings.variables.DELETE
Sample Response
Use cases
Here are a few use cases where you can use CRM Variables.
- Consider that you have integrated with RazorPay and want to send payment links to deals that you have won. Here, you can store the payment link in a variable and use it in the function that sends the link to the deal through an email.
- You can improvise the above function, and have a condition that checks whether the payment link is valid or has expired. If it is invalid or expired, you can send an alternate payment link that is stored in another CRM variable.
- Consider you have scheduled a function to run everyday. Now, you want to run this function except on Saturday and Sunday of a particular month. In this case, you can hard-code the Saturday and Sunday in CRM variables of the DateTime type, and check this while running your function. You case would be "if datetime =={CRM variable}, stop execution".
- Another classic example of using CRM Variables would be in the banking sector. Consider that you have multiple modules that deal with the rate of interest. This rate will differ based on the tenure, the type of loan, the age of a person etc, and used at multiple places across the org. Here, you can set up variables for the different rates of interests and use them in various places. The best part is, when the rate of interest changes, you have to just change it at one place - CRM Variable.
Let us see this example in detail.
I have a module called Loans. For home loans, the rate of interest is 10% for all, irrespective of the tenure.
So, I have created a CRM variable called Interest, whose data type is decimal, and has the value 10.
In the Loans module, I have the following fields:
- Customer Name(single line) to represent the name of the customer who has opted for the loan.
- Principal(decimal) to represent the principal they have borrowed.
- Tenure(number) that depicts the number of years they will repay the loan in.
- EMI(decimal) to represent the monthly installment.
- Total(decimal) to represent the total amount they will repay including the interest.
I have a function that calculates the EMI and the Total. Here is the code.
// In this function, we are getting principal, tenure and record id from the record and Interest from CRM Variables. //Calculate Total Total = Principal + Principal * Interest / 100 * Tenure; info Total; //Calculate EMI EMI = Total / (Tenure * 12); info EMI; //Variable with MAP type to hold the fields and values record_info = {"EMI":EMI,"Total":Total}; info record_info; info zoho.crm.getRecordById("Loans",record_id); //Updating the record zoho.crm.updateRecord("Loans",record_id,record_info); |
The following image shows the function argument mapping.
I have now set up a workflow that is triggered upon record creation. This workflow has the Calculate EMI function associated to it as shown in the following image.
As you can see, in Argument Mapping, I have chosen the CRM variable Interest.
Here is a demo of how the workflow is triggered and function execution.
As you can see, based on the value in the CRM variable, the Total and EMI is calculated through the function triggered by the workflow upon record creation.
We hope you liked this post. We will see you next week with another interesting topic.
Please let us know if you have any questions in the comment section or write to us at
support@zohocrm.com.
Cheers!
Recent Topics
Sorting columns in Zoho Projects
Hi, In project management best practice, sorting columns (ascending, descending) is an important tool. Sorting dates to see the order of tasks starting, sorting on priority or even on planned hours is a must for an efficient project control. Currently,
Business Continuity - Disaster Recovery
I know about the Zoho CRM backup .zip files, however, this doesn't include any of the infrastructure with like custom fields or custom modules. I am curious on what everyone has in place for a true backup or what your plan is if your Zoho instance were
Upload API
I'm trying to use the Upload API to upload some images and attach them to comments (https://desk.zoho.com/DeskAPIDocument#Uploads#Uploads_Uploadfile) - however I can only ever get a 401 or bad request back. I'm using an OAuth token with the Desk.tickets.ALL
Losing description after merging tickets
Hello, We merge tickets when they are about the same topic from the same client. It happens sometimes. We recently noticed that after the merger only the description from the master ticket is left in a thread. And the slave-ticket description is erased.
update linked contacts when update happens in account
Hi, I have a custom field called Licence in the Accounts module. When someone buys a licence, I’d like to update a custom field in the related Contacts. How can I achieve this? I noticed that workflows triggered on Accounts only allow me to update fields
Problem Management Module
I am looking for a Problem Management module within Zoho Desk. I saw in some training videos that this is available, and some even provided an annual price for it. I want an official confirmation on whether this is indeed available. This is not a particularly
Unable to explore desk.zoho.com
Greetings, I have an account with zoho which already has a survey subscription. I would like to explore desk.zoho.com, but when I visit it while logged in (https://desk.zoho.com/agent?action=CreatePortal) I just get a blank page. I have tried different
Offline support for mobile app
Accessing your files and folders from your mobile devices is now quicker and simpler, thanks to the power of offline support. Whether on an Android or iOS device, you can use the Offline function to save files and folders, so you can review them even
Zoho Desk KB article embedded on another site.
We embed KB articles from Zoho Desk on another site (our application). When opening the article in a new tab, there is no issue, but if we choose lightbox, we are getting an error "To protect your security, help.ourdomain.com will not allow Firefox to
Transitioning to API Credits in Zoho Desk
At Zoho Desk, we’re always looking for ways to help keep your business operations running smoothly. This includes empowering teams that rely on APIs for essential integrations, functions and extensions. We’ve reimagined how API usage is measured to give
List of packaged components and if they are upgradable
Hello, In reference to the article Components and Packaging in Zoho Vertical Studio, can you provide an overview of what these are. Can you also please provide a list of of components that are considered Packaged and also whether they are Upgradable?
Does Attari Messaging app have Bot option and APIB
Hi, Does Attari also have Bot and API as we use in WhatsApp??
How to add application logo
I'm creating an application which i do not want it to show my organization logo so i have changed the setting but i cannot find where to upload/select the logo i wish to use for my application. I have seen something online about using Deluge and writing
Introducing Keyboard Shortcuts for Zoho CRM
Dear Customers, We're happy to introduce keyboard shortcuts for Zoho CRM features! Until now, you might have been navigating to modules manually using the mouse, and at times, it could be tedious, especially when you had to search for specific modules
Empowered Custom Views: Cross-Module Criteria Now Supported in Zoho CRM
Hello everyone, We’re excited to introduce cross-module criteria support in custom views! Custom views provide personalized perspectives on your data and that you can save for future use. You can share these views with all users or specific individuals
Send Automated WhatsApp Messages and Leverage the Improved WhatsApp Templates
Greetings, I hope all of you are doing well. We're excited to announce a major upgrade to Bigin's WhatsApp integration that brings more flexibility, interactivity, and automation to your customer messaging. WhatsApp message automation You can now use
Verifying Zoho Mail Functionality After Switching DNS from Cloudflare to Hosting Provider
I initially configured my domain's (https://roblaxmod.com/) email with Zoho Mail while using Cloudflare to manage my DNS records (MX, SPF, etc.). All services were working correctly. Recently, I have removed my site from Cloudflare and switched my domain's
Zoho Analytics Regex Support
When can we expect full regex support in Zoho Analytics SQL such as REGEXP_REPLACE? Sometimes I need to clean the data and using regex functions is the easiest way to achieve this.
Change of Blog Author
Hi, I am creating the blog post on behalf of my colleague. When I publish the post, it is showing my name as author of the post which is not intended and needs to be changed to my colleague's name. How can I change the name of the author in the blogs?? Thanks, Ramanan
Show Attachments in the customer portal
Hi, is it possible to show the Attachments list in the portal for the particular module? Bests.
Zoho CRM Formula - Current Time minus Date/Time field
Hello, I am trying to prevent duplicate emails going to clients when more than 1 deal is being updated. To do this, I would like to create a formula to identify if a date/time field is >= 2 hours ago. Can someone please help me write this formula? Example:
Does Zoho Docs have a Line Number function ?
Hi, when collaborating with coding tasks, I need an online real time share document that shows line numbers. Does Zoho's docs offer this feature ? If yes, how can I show them ? Regards, Frank
Feature Request - Insert URL Links in Folders
I would love to see the ability to create simple URL links with titles in WorkDrive. or perhaps a WorkDrive extension to allow it. Example use case: A team is working on a project and there is project folder in WordDrive. The team uses LucidChart to create
Organization Emails in Email History
How can I make received Org Emails to show up here?
How to sync from Zoho Projects into an existing Sprint in Zoho Sprints?
Hi I have managed to integrate Zoho Projects with Zoho Sprints and I can see that the integration works as a project was created in Zoho Sprints. But, what I would like to do is to sync into an existing Zoho Sprints project. Is there a way to make that
how to differentiate if whatsapp comes from certain landing page?
I create a Zobot in SalesIQ to create a Whatsapp bot to capture the lead. I have 2 landing pages, one is SEO optimized and the other want is optimized for leads comes from Google Ads. I want to know from which landing page this lead came through WhatsApp
How to record company set up fees?
Hi all, We are starting out our company in Australia and would appreciate any help with setting up Books accounts. We paid an accountant to do company registration, TFN, company constitution, etc. I heard these all can be recorded as Incorporation Costs, which is an intangible asset account, and amortised over 5 years. Is this the correct way to do it under the current Australian tax regulations? How and when exactly should I record the initial entry and each year's amortasation in Books? Generally
How to create a drop down menu in Zoho Sheets
I am trying to find out, how do I create a drop down option in Zoho sheet. I tried Data--> Data Validation --> Criteria --> Text --> Contains. But that is not working, is there any other way to do it. Thanks in Advance.
Show Payment terms in Estimates
Hi, we are trying to set up that estimates automatically relates payment terms for the payment terms we introduced on Edit contact (Field Payment terms). How can it be done? Our aim is to avoid problems on payment terms introduced and do not need to introduce it manually on each client (for the moment we are introducing this information on Terms and Conditions. Kind Regards,
How can I calculate the physical stock available for sale?
Hey Zoho Team, I've tried to calculate the physical stock on hand in various ways - but always receive a mismatch between what's displayed in Zoho Inventory & analytics. Can you please let me know how the physical stock available for sale is calculated?
When dispatched to crew, assigning lead missing
Hello, For the past two or three weeks, whenever an officer assigns Service Appointment to a team, the lead person is missing from the assigned service list. Therefore, we have to reschedule the SA and then the lead person becomes visible in the assigned
open word file in zoho writer desktop version
"How can I open a Microsoft Word (.doc or .docx) file in Zoho Writer if I only have the file saved on my computer and Zoho Writer doesn't appear as an option when I try 'Open with'? Is there a way to directly open the .doc file in Zoho Writer?"
I want to transfer the project created in this account to another account
Dear Sir I want to transfer the project created in one account to another account
Inactive User Auto Response
We use Zoho One, and we have a couple employees that are no longer with us, but people are still attempting to email them. I'd like an autoresponder to let them no the person is no longer here, and how they can reach us going forward. I saw a similar
Weekly Tips : Customize your Compose for a smoother workflow
You are someone who sends a lot of emails, but half the sections in the composer just get in your way — like fields you never use or sections that clutter the space. You find yourself always hunting for the same few formatting tools, and the layout just
Zoho Slowness - Workarounds
Hi all, We've been having intermittent slowness and Zoho just asks for same stuff each time but never fix it. It usually just goes away on it's own after a couple weeks. Given that speed is a very important thing for companies to be able to keep up with
Custom Bulk Select Button
Zoho CRM offers the ability to select multiple records and invoke a Custom Button This functionality is missing from Recruit Currently we can only add buttons in the detail page and list But we cannot select Multiple Records and invoke a function with
Zoho CRM still doesn't let you manage timezones (yearly reminder)
This is something I have asked repeatedly. I'll ask once again. Suppose that you work in France. Next month you have a trip to Guatemala. You call a contact there, close a meeting, record that meeting in CRM. On the phone, your contact said: "meet me
Power of Automation :: Smart Ticket Management Between Zoho Desk and Projects
Hello Everyone, A custom function is a software code that can be used to automate a process and this allows you to automate a notification, call a webhook, or perform logic immediately after a workflow rule is triggered. This feature helps to automate
First day of trying FSM in the field.
What we found. 1. with out a network connection we were unable to start a service call? 2. if you go to an appointment and then want to add an asset it does not seem possible. 3. disappointed not to be able to actually take a payment from within the app
Next Page