Deluge scripts read like structured English. Each statement ends with a semicolon. Variables do not need to be declared before use — you just assign them a value. Logic blocks use curly braces. Here is a complete Deluge function that reads a deal record and sends an email if the deal value is above a threshold:
Read through the code line by line. Line 5 gets the deal record and stores it in a variable called “deal”. Line 8 reads the Amount field from that record. Line 11 reads the Owner’s email address. Lines 14–22 send an email if the amount exceeds $50,000. Every line is readable without programming experience — it is close to how you would describe the logic in English.
| // Simple Deluge function: alert manager on high-value deal // Input parameter: dealId (passed from workflow rule) // Step 1: Get the deal record deal = zoho.crm.getRecordById(“Deals”, dealId); // Step 2: Read the deal amount dealAmount = deal.get(“Amount”); // Step 3: Read the deal owner’s email ownerEmail = deal.get(“Owner”).get(“email”); // Step 4: Send alert if deal is above threshold if(dealAmount 50000) { sendmail [ from: zoho.adminuserid to: “manager@yourdomain.com” subject: “High-value deal: ” + deal.get(“Deal_Name”) message: “Deal value: $” + dealAmount + “. Owner: ” + ownerEmail ]; } |
|---|
Almost every Deluge function in a CRM context involves some combination of four operations:
Every script in the 5 Deluge scripts CRM admins should know guide uses these four operations in various combinations. Understanding these four building blocks makes any Deluge script readable, even before you learn the syntax details.
Workflow rules in Zoho CRM can: update a field on the same record that triggered the rule, send an email, create a task and call a webhook. They are appropriate for most straightforward automation requirements.
Deluge functions handle the requirements that workflow rules cannot. The clearest examples:
Deluge functions in Zoho CRM are found under Setup → Developer Space → Functions. Each function is a named block of Deluge code that can be triggered by a workflow rule, a blueprint transition, a button click on a record, a scheduled timer or an incoming API request.
Writing a function in the Developer Space editor gives you a code editor with syntax highlighting, a test execution panel where you can run the function with sample inputs and an execution log that shows what happened when the function ran — including any errors. The test panel is where most Deluge learning happens: write a function, run it with test data, read the log, adjust, repeat.
The three Deluge patterns that are most immediately useful for a Zoho CRM administrator with no prior coding experience:
For structured learning from beginner to advanced, see the Zoho Deluge training programme.
Is Zoho Deluge similar to other programming languages?
What can you automate with Zoho Deluge that workflow rules cannot?
Where is Zoho Deluge written and executed?
Can ABR write Zoho Deluge scripts for our business?