| Operator | Meaning | Example |
|---|---|---|
| == | Equal to | status == “Active” |
| != | Not equal to | stage != “Closed Lost” |
| Greater than | amount 50000 | |
| < | Less than | daysOverdue < 7 |
| = | Greater than or equal to | score >= 80 |
| <= | Less than or equal to | age <= 30 |
| Operator | Meaning | Example |
|---|---|---|
| && | AND — both conditions must be true | score 50 && industry == “Technology” |
| ││ | OR — at least one condition must be true | source == “Demo” ││ source == “Website” |
| ! | NOT — reverses the condition | !isConverted |
| // Pattern 1: Simple if amount = deal.get(“Amount”); if(amount 100000) { dealCategory = “Enterprise”; } // Pattern 2: If / else if(lead.get(“Lead_Source”) == “Demo Request”) { priority = “High”; } else { priority = “Medium”; } // Pattern 3: If / else if / else chain score = lead.get(“Lead_Score__c”); if(score >= 80) { routing = “Senior Rep”; } else if(score >= 50) { routing = “Standard Rep”; } else if(score >= 20) { routing = “Nurture Queue”; } else { routing = “Disqualify”; } // Pattern 4: Nested conditions if(amount 50000) { if(daysToClose < 30) { urgency = "High value, closing soon"; } else { urgency = "High value, long term"; } } |
|---|
| // Check if a value is in a list premiumIndustries = List(); premiumIndustries.add(“Financial Services”); premiumIndustries.add(“Healthcare”); premiumIndustries.add(“Technology”); industry = contact.get(“Industry”); if(premiumIndustries.contains(industry)) { segment = “Premium”; } else { segment = “Standard”; } // String condition helpers title = contact.get(“Title”).toLowerCase(); isSenior = title.contains(“director”) ││ title.contains(“vp”) ││ title.contains(“head of”) ││ title.contains(“chief”); if(isSenior) { seniorityTier = “C-Suite/Director”; } |
|---|
| // Iterate a list of CRM records criteria = “(Stage:equals:Proposal Sent)”; deals = zoho.crm.searchRecords(“Deals”, criteria, 1, 200); for each deal in deals { dealId = deal.get(“id”); amount = deal.get(“Amount”); // Conditional action inside the loop if(amount 50000) { // High-value proposal: notify the sales director // … (update or notification logic here) info “High-value proposal: ” + deal.get(“Deal_Name”); } } // Break out of a loop early targetFound = false; for each record in records { if(record.get(“Email”) == “target@example.com”) { targetFound = true; break; } } |
|---|
A Deluge function that tries to call .get() on a null value throws an error and stops executing. Always check for null before accessing nested data from CRM records:
For the complete Deluge syntax reference including string functions, date operations and API calls, see the Deluge cheat sheet. For structured learning, see the Deluge training programme.
| // Null check before accessing nested data accountRef = deal.get(“Account_Name”); if(accountRef != null) { accountId = accountRef.get(“id”); account = zoho.crm.getRecordById(“Accounts”, accountId); industry = account.get(“Industry”); } else { industry = “Unknown”; // safe default } // Compact null check using ternary-style logic // Deluge does not have a ternary operator. // Use a variable assignment inside if/else instead: amount = deal.get(“Amount”); safeAmount = 0; if(amount != null) { safeAmount = amount.toNumber(); } |
|---|
What types of conditional logic does Zoho Deluge support?
How do I compare two dates in Zoho Deluge?
What is the maximum execution time for a Deluge script?
Can Deluge scripts handle null or empty field values safely?
Can ABR write complex conditional Deluge logic for our CRM?