Zoho CRM Example: Auto-Convert Qualified Leads Workflow Rule

Example: Building an Automatic Lead Conversion Workflow in Zoho CRM

This article works through a single concrete example of automatic lead conversion in Zoho CRM, naming the pieces you would actually create so you can follow along and adapt them to your own instance. It stops short of prescribing exact Deluge syntax, since that detail depends on your current API version and should always be checked against Zoho's own documentation.

The scenario for this example

Suppose your team wants any Lead whose status changes to Qualified to be converted automatically, with a new Deal created directly into a pipeline stage called Discovery Call Scheduled.

Naming the Workflow Rule

Give the rule a name that describes exactly what it does and when, so anyone auditing your automations later understands it at a glance. For this example, something like Auto-Convert Qualified Leads works well. Vague names like "Lead automation 1" cause confusion once you have several rules running.

SettingValue in this example
Rule nameAuto-Convert Qualified Leads
ModuleLeads
TriggerField Update
CriteriaLead Status equals Qualified
ActionCustom function: Convert Qualified Lead

What the custom function needs to accomplish

You might call this function something like convertQualifiedLead, though the name itself is entirely up to you and your team's naming conventions. Conceptually, once the Workflow Rule fires, the function needs to work through the following in order.

  1. Receive the triggering Lead's ID. The Workflow Rule passes the record that met the criteria into the function.
  2. Decide what the new Account and Contact should be called. Typically this comes straight from the Lead's company and name fields, though you may want logic to handle Leads with no company name gracefully.
  3. Specify whether a Deal should be created, and its starting stage. In this example, that stage needs to be the exact API name for Discovery Call Scheduled, confirmed under Deals field settings, not just the label shown on screen.
  4. Call the lead conversion capability. This is the part that actually asks Zoho CRM to perform the conversion. The function needs to call a Deluge function that calls the lead conversion API, check Zoho's current Deluge documentation for the exact method signature, since it is not something to guess at or copy from an example without verifying it against your own API version.
  5. Handle the outcome. Decide what should happen if the conversion fails, for example because the Lead had already been converted, so the failure is visible rather than silent.
Note: Before relying on this function in production, confirm your Lead Conversion Mapping covers every custom field you expect to carry across, since fields left unmapped and unset in the function will simply be blank on the new records.

Checking the result

After saving and activating the rule, update a test Lead's status to Qualified and confirm three things: an Account was created with the expected name, a Contact was created and linked to it, and a Deal appeared in the Discovery Call Scheduled stage with the fields you expected populated. If the Deal did not land in the right stage, the most likely cause is a mismatch between the stage label you used and its actual API name.

Need help? 1 Cloud Consultants can build and test a workflow rule and Deluge function like this one against your actual pipeline stages and field mapping, so it works correctly from the first Lead onward. Book a discovery call with 1 Cloud Consultants.