Zoho
Deluge Scripting Basics: A Practical Guide for Zoho Admins
A practical introduction to Deluge, the scripting language behind custom logic in Zoho CRM, Creator, Books and Desk, with beginner use cases and best practices.
Xevort Team
Zoho & technology experts

Deluge scripting is how Zoho admins go beyond point-and-click workflows: validating data, updating related records, calling external APIs and building logic that standard rules can't express. This guide explains what Deluge is, where scripts run across Zoho apps, the core concepts you need, five beginner use cases, how to write your first function, and how to connect to other systems safely.
It's written for Zoho admins and technically minded operations managers who are comfortable with workflow rules and want to take the next step. No programming background is required. Code is described in plain words, with function names shown in bold.
Quick Answer
What is Deluge scripting in Zoho?
Deluge scripting is Zoho's own low-code language for adding custom logic to Zoho apps. Scripts run inside products like Zoho CRM, Creator, Books and Desk, triggered by workflow rules, buttons, schedules or form events. They can read and update records, call other Zoho apps through built-in integration tasks, and connect to external APIs, without managing any servers.
Key Takeaways
- Deluge runs inside more than forty Zoho products, triggered by workflows, buttons, schedules and form events.
- Maps and lists are the heart of most scripts, because Zoho records and API responses use them.
- Built-in integration tasks and connections handle authentication, so scripts stay short and secure.
- Small, well-named, tested functions are easier to maintain than one large script.
What Is Deluge and Where Does It Run?
Deluge stands for Data Enriched Language for the Universal Grid Environment. It's a proprietary scripting language built by Zoho, and according to Zoho's documentation more than forty Zoho products support it. You write scripts in a browser-based editor inside the app, so there's nothing to install or host.
The key idea is that a script runs when something happens in a Zoho app: a record is created, a field changes, a button is clicked or a schedule fires. Where you attach scripts depends on the app:
- Zoho CRM
- Where scripts runFunctions in workflow rules, buttons, schedules, Blueprint transitions, validation rules and related listsTypical usesUpdate related records, sync to other systems, custom validation
- Zoho Creator
- Where scripts runForm and report workflows, schedules and reusable functionsTypical usesField logic, validation, approvals, custom app behavior
- Zoho Books
- Where scripts runCustom functions in workflow rules, custom buttons and schedulesTypical usesLate fees, discounts, copying custom fields to transactions
- Zoho Desk
- Where scripts runCustom functions in workflow rules, Blueprint transitions and schedulesTypical usesTicket routing, priority rules, syncing contacts to CRM
- Zoho Cliq
- Where scripts runBots, commands, message actions and schedulersTypical usesTeam notifications and chat-based tools
| Zoho app | Where scripts run | Typical uses |
|---|---|---|
| Zoho CRM | Functions in workflow rules, buttons, schedules, Blueprint transitions, validation rules and related lists | Update related records, sync to other systems, custom validation |
| Zoho Creator | Form and report workflows, schedules and reusable functions | Field logic, validation, approvals, custom app behavior |
| Zoho Books | Custom functions in workflow rules, custom buttons and schedules | Late fees, discounts, copying custom fields to transactions |
| Zoho Desk | Custom functions in workflow rules, Blueprint transitions and schedules | Ticket routing, priority rules, syncing contacts to CRM |
| Zoho Cliq | Bots, commands, message actions and schedulers | Team notifications and chat-based tools |
If you're building full custom applications rather than extending an existing app, Zoho Creator is where Deluge does the most work. See our guide to building custom apps with Zoho Creator.
Core Deluge Scripting Concepts
Variables and Data Types
Deluge is dynamically typed, so you don't declare types up front. The main data types are text, number, decimal, boolean, date-time, time, list, key-value (map) and file. Values arriving from workflow merge fields are often text, so converting them matters. For example, toLong() turns a record ID into a number and toDecimal() does the same for amounts.
Maps and Lists
Almost every script works with these two structures:
- Map() creates a key-value collection; put adds a value and get reads one, such as a field's API name and its value.
- List() creates an ordered collection; add appends an item and for each loops through it.
- Zoho record fetches return a map, and searches return a list of maps, so reading and building maps is most of the job.
Integration Tasks
Integration tasks are built-in shortcuts for working with Zoho apps. In Zoho CRM, zoho.crm.getRecordById fetches a record, zoho.crm.createRecord creates one, zoho.crm.searchRecords finds records by criteria and zoho.crm.updateRecord updates a record by its ID using a map of field API names and values. Similar tasks exist for Books, Desk, Creator and other apps.
Logging and Error Handling
The info statement prints values to the execution log, which is your main debugging tool. Wrap risky steps, especially external API calls, in a try and catch block so a failure is handled gracefully instead of stopping the whole script.
Five Beginner Deluge Use Cases
These are small, high-value scripts that make good first projects. Each takes minutes to run but saves real time every week.
- Copy data to related records: when a deal is won, update the linked account with the latest purchase date and value.
- Clean data on save: standardize phone formats, capitalize names or derive a region from the country field.
- Smart assignment: route leads or tickets to an owner based on territory, product or workload rules that standard assignment can't express.
- Notify the right people: send a formatted email with sendmail or a chat message when a high-value deal changes stage.
- Sync to another app: create a Zoho Books contact or a project task automatically when a CRM deal closes.
Messaging is another popular area. Our Zoho CRM WhatsApp integration guide shows where scripted notifications fit alongside ready-made extensions.
How to Write Your First Deluge Function
- Define the trigger
- Map the arguments
- Write small steps
- Test with real IDs
- Attach to a rule
- Monitor the logs
Step 1: Define the Trigger and Outcome
Write one sentence describing the business rule, such as: when a deal moves to Closed Won, stamp the won date on the account. If you can't describe it simply, split it into smaller functions.
Step 2: Map the Arguments
In Zoho CRM, create a function under the Functions section of Setup and declare arguments such as the deal ID. When you attach it to a workflow rule, map each argument to a merge field from the record.
Step 3: Write the Logic in Small Steps
Fetch the record with zoho.crm.getRecordById, read the fields you need with get, build a map of updates with put, then call zoho.crm.updateRecord. Add an info line after each step while you develop.
Step 4: Test, Attach and Monitor
Run the function in the editor with a real record ID, preferably in a sandbox. Once it works, attach it to the workflow rule, button or schedule, then review execution logs for the first few days. In Zoho CRM, saving a Deluge function updates the live version immediately, so edit carefully once it's in use.
Connections and API Calls
A connection is how Deluge authenticates with another Zoho app or a third-party service. You create it once, either from a default service or as a custom one using OAuth 2, API key or basic authentication, and then refer to it by its link name in your scripts. Credentials stay out of the code, and tokens are handled by Zoho.
For services without a built-in integration task, the invokeurl task makes an HTTP request. You give it a URL, a method such as GET or POST, optional headers and body, and the connection name. The response usually comes back as a map you can read with get.
- Each integration task or invokeurl execution counts against your plan's external call limits, so avoid calls inside large loops.
- Connections that go unused for a long period can be revoked automatically and need re-authorizing.
- Log the response status of every external call so failures are visible.
For larger projects, design the integration before scripting it. Our API integrations guide covers choosing the source of truth, handling duplicates and planning for failures.
Deluge Best Practices
- One function, one job. Small functions are easier to test, reuse and hand over.
- Use clear names for functions and variables, and comment the business reason, not the obvious syntax.
- Always use API names for modules and fields, and check them in setup rather than guessing from labels.
- Handle empty values before using them, since missing lookups are the most common runtime error.
- Control re-triggers. Zoho documents a trigger option on zoho.crm.updateRecord; workflow rules only fire from a script update if you include them, which helps prevent loops.
- Keep a change log of what each script does and where it's attached.
Common Deluge Mistakes
Using Scripts Where a Rule Would Do
If a standard workflow field update or Blueprint can handle it, use that instead. It's easier for the next admin to understand. Guided processes are often better built with Zoho CRM Blueprint than with code.
Hardcoding IDs and Credentials
Record IDs, user IDs and API keys pasted into scripts break when data changes or keys rotate. Use connections for credentials and look up IDs dynamically.
No Error Handling
Scripts triggered by workflows fail silently from the user's point of view; the error appears only in logs. Wrap external calls in try and catch, and record failures on the record or notify an admin.
Automation Sprawl
Dozens of overlapping functions attached to the same module become impossible to debug. Review scripts regularly and retire unused ones. We cover this in common workflow automation mistakes.
Frequently Asked Questions
Is Deluge hard to learn?
Not for most Zoho admins. Deluge was designed to be readable, and simple tasks like updating a field or sending an email take only a few lines. If you understand your Zoho data model and workflow rules, you can learn the basics in a few weeks of practice on small scripts.
Which Zoho apps support Deluge?
Zoho says more than forty products support Deluge, including Zoho CRM, Creator, Books, Desk, Inventory, Projects, Recruit and Cliq. Where scripts can run differs by app. For example, CRM functions attach to workflows, buttons and schedules, while Creator scripts run on form and report events.
Can Deluge call external APIs?
Yes. The invokeurl task sends HTTP requests to external APIs using methods such as GET, POST, PUT and DELETE. Pair it with a connection so authentication is handled securely, and remember that each call counts against your plan's external call limits.
Does Deluge support error handling?
Yes. Deluge supports try and catch blocks. Code inside try runs normally, and if a runtime error occurs, control passes to catch, where you can log the message and line number, update a status field or notify an admin instead of letting the script stop unexpectedly.
Do I need a developer to write Deluge scripts?
Simple scripts are well within reach of a trained Zoho admin. For integrations with external systems, complex data syncs or business-critical logic, an experienced Zoho developer helps you avoid loops, duplicate records and limit issues, and leaves documentation the next admin can follow.
Conclusion
Deluge lets you add your own business rules to Zoho apps where standard configuration stops. Start small with a field update or a notification, learn maps, lists and integration tasks, and add connections when you're ready to talk to other systems.
If you'd rather have scripts designed, tested and documented by specialists, our Zoho team builds custom functions and integrations across the Zoho suite.
References
Written by
Xevort Team
Developers and Zoho consultants writing up practical lessons from client projects.
Want help applying this?
Tell us about your Zoho, product or cloud project and we'll suggest a sensible next step.




