Zoho CRM Custom Functions: An Introduction to Deluge Automation

Zoho CRM: Automate using Custom Functions - An Introduction

Zoho CRM's built-in tools, such as Workflow Rules, cover a lot of ground: sending emails, updating fields, creating tasks. But sometimes a process needs logic those visual tools simply can't express, such as calculating a value across related records, calling an external system, or making a decision based on several conditions at once. This is where custom functions come in.

What a custom function is

A custom function is a small script that runs when triggered by a Workflow Rule, a Blueprint transition, a scheduled timer, or a button click, and can manipulate CRM data, update related records, run calculations, or communicate with third-party applications. Traditionally, custom functions were written exclusively in Deluge, Zoho's own scripting language, though newer parts of the Functions platform have expanded to also support Java, Node.js, and Python, so it's worth checking what's available in your account.

What is Deluge?

Deluge, short for Data Enriched Language for the Universal Grid Environment, is an online scripting language built into Zoho CRM and integrated across more than forty other Zoho products. It's designed to be readable even without much programming background, with an English-like, indentation-based syntax similar in feel to Python. The database layer is abstracted away, so most of your work is mapping arguments to fields rather than writing low-level data access code yourself.

Setting up a custom function

  1. Open Custom Functions. Go to Setup, then Automation, then Actions, then Custom Function.
  2. Configure a new function. Click Configure Custom Function.
  3. Write the function. Click Write Your Own Function to open the script editor.
  4. Map your arguments. Map each argument the function needs to a field name or a custom value from the relevant CRM module.
  5. Test it. Test the function to confirm it behaves as expected before relying on it.
  6. Associate it with a workflow rule. Attach the function to the Workflow Rule (or other trigger) that should run it.
Note: Users need the Manage Workflow permission to access custom functions. When a record matches the criteria on the associated Workflow Rule, Zoho CRM triggers the function automatically and updates records accordingly.

What custom functions are typically used for

Common examples include copying a value from one module to a related one automatically, such as mapping a sector from an Account down to a new Contact, running calculations across records that a simple field can't express, calling an external API to pull in or push out data, and applying conditional logic that spans more than one module.

Need help? 1 Cloud Consultants can help you design and write custom functions for Zoho CRM, whether in Deluge or one of the newer supported languages. Book a discovery call with 1 Cloud Consultants.