Hi Community, this is my first Deluge script. I've pieced it together from reading various articles
I want to use it in a workflow to
1 Convert a lead to a contact
2. Create a record in a custom module
Below is what I have got so far but it does not fire in the workflow trigger.
I am not sure what I have to change but a little guidance would very much be appreciated
void automation.Convert_insurance_referral()
{
try
{
leadId = Lead_ID;
if(leadId == null)
{
info "Error: input.id is null.";
return;
}
// get lead record
lead = zoho.crm.getRecordById("Leads", leadId);
if(lead == null || lead.isEmpty())
{
info "Error: No Lead found for ID: " + leadId;
return;
}
// convert lead
convertMap = map();
convertMap.put("overwrite", true);
converted = zoho.crm.convertLead(leadId, convertMap);
if(converted == null || converted.isEmpty())
{
info "Error: Lead conversion returned no response for Lead ID: " + leadId;
return;
}
contactId = converted.get("Contacts");
if(contactId == null)
{
info "Error: Lead was converted, but no Contact ID was returned. Response: " + converted.toString();
return;
}
// create Initial Assessment record
assessmentMap = map();
contactLookup = map();
contactLookup.put("id", contactId);
assessmentMap.put("Contact", contactId);
assessmentMap.put("Contact", contactLookup);
assessmentMap.put("Insurance_Provider", lead.get("Insurance_Provider"));
assessmentMap.put("Case_ID", lead.get("Case_ID"));
assessmentMap.put("Case_Handler", lead.get("Case_Handler"));
assessmentMap.put("Approved_Treatments", lead.get("Approved_Treatments"));
assessmentMap.put("Venue", lead.get("Venue"));
assessmentMap.put("Assessment_Date", lead.get("Assessment_Date"));
assessmentMap.put("Assessment_Status", lead.get("Assessment_Status"));
assessmentMap.put("Assigned_Therapist", lead.get("Assigned_Therapist"));
// mandatory field
assignedTherapist = lead.get("Assigned_Therapist");
if(assignedTherapist != null)
{
assessmentMap.put("Record_Name", assigned_Therapist);
}
else
{
assessmentMap.put("Record_Name", "Assessment for Contact " + contactId);
}
createResp = zoho.crm.createRecord("Initial_Assessments", assessmentMap);
if(createResp == null || createResp.isEmpty())
{
info "Error: Initial_Assessments record creation returned no response.";
return;
}
if(createResp.get("id") != null)
{
info "Success: Initial Assessment created. Record ID: " + createResp.get("id");
}
else
{
info "Warning: Record creation response did not include an ID. Response: " + createResp.toString();
}
}
catch (e)
{
info "Exception occurred in Convert_insurance_referral: " + e.toString();
}
}
Recent Topics
ZOHO Reports are taking longer time to get refresh
Hi Team, Since last few days, I'm facing issues in getting updated reports. For eg: right after making an expense entry or even posting a journal, it is taking longer then expected for the updated reports. Refer below: "You are viewing the report that
Sales IQ chat is not working in signed android apk
I have integrated ZOHO sales IQ support chat and i have followed each step and its working fine in my development build but when i create signed APK for it. Chat does not work in it and showing awaiting for detail. I previously asked the same query but
How to add line breaks in zoho.cliq.postToUser(...) message?
In a CRM function using Deluge I'm sending this message and attempting to add some line breaks but they are ignored. Is there another way to add these breaks? My message: message: New urgent task\nDescription \nThis is a fake description.\n A new line?
Enable Free External Collaboration on Notecards in Zoho Notebook
Hi Zoho Notebook Team, I would like to suggest a feature enhancement regarding external collaboration in Zoho Notebook. Currently, we can share notes with external users, and they are able to view the content without any issue. However, when these external
Problem with CRM Connection not Refreshing Token
I've setup a connection with Zoom in the CRM. I'm using this connection to automate some registrations, so my team doesn't have to manually create them in both the CRM and Zoom. Connection works great in my function until the token expires. It does not refresh and I have to manually revoke the connection and connect it again. I've chatted with Zoho about this and after emailing me that it couldn't be done I asked for specifics on why and they responded. "The connection is CRM is not a feature to
Update Existing Records greyed out in Free Version
Trying to update records from an Excel sheet, and not getting the option to update. Only option is to add as new accounts. All documentation I can see says update should be an option! Accounts, Leads, Contacts, all the same.
In Lesson Video
Can anyone help me with this? I'm not sure what happened. It suddenly became like that. I tried to reupload. I tried create a new lesson. Still the same. Please help!
emailing estimates
Shows up in the customer mail logs as sent but nobody is receiving them, even when I send them to myself I don't get them ??? Something wrong with the mail server or my end ?
Help with deluge script
Hi Community, this is my first Deluge script. I've pieced it together from reading various articles I want to use it in a workflow to 1 Convert a lead to a contact 2. Create a record in a custom module Below is what I have got so far but it does not fire
How to use OR when filtering using two fields
I want to create return a list of Account Names by filtering on Field1 = "yes" OR Field 2 = "no" I can't see how to use the OR in the filter.
Mobile phone version not working well
I am working on the Zoho Site Builder. In the preview the desktop version looks okay, but in the mobile phone preview many words are cut off in the weirdest (wrong) way. How can I fix that?
Zoho - Please explain difference between Thread view and Conversation view on Ticket
I have reviewed the help document here but am still not clear on the difference between the two views. As an example, I just had a back and forth on a ticket: - Customer emails support email. - I email back from Desk. - Customer responds back. - I email back from Desk. On the upper left drop down box on the ticket Zoho Desk now says this is "4 Threads" and "4 Conversations" . How is that 4 threads?? By my count it is 1 thread and 4 conversations (assuming by "conversation" Zoho means number of total
I need help to take Reports for tickets moved between departments.
Hi, I need help to take Reports for tickets moved between different departments. Pls guide Shyam
Export to excel stored amounts as text instead of numbers or accounting
Good Afternoon, We have a quarterly billing report that we generate from our Requests. It exports to excel. However if we need to add a formula (something as simple as a sum of the column), it doesn't read the dollar amounts because the export stores
Increase Round Robin Scheduler Frequency in Zoho Desk
Dear Zoho Desk Team, We hope this message finds you well. We would like to request an enhancement to the Round Robin Scheduler in Zoho Desk to better address ticket assignment efficiency. Current Behavior At present, the Round Robin Scheduler operates
Automation #6 - Prevent Re-opening of Closed Tickets
This is a monthly series where we pick some common use cases that have been either discussed or most asked about in our community and explain how they can be achieved using one of the automation capabilities in Zoho Desk. Typically when a customer submits
Zoho Desk EU slow/unresponsive
Has anyone else got issues with ZohoDesk today in the EU? It takes an age to come back and if you do start typing something and try and send or save it looks like it times out. We are also getting this pic. ot I can't see anything on https://status.zoho.eu/
EU DC Partial Outage Resolved: A Detailed RCA
Incident Summary Due to an overload on one of the nodes in the EU DC for Zoho Desk, the system was unable to handle the heavy load, causing a slowdown in requests and resulting in a partial outage for customers with data residing in that node. On May
Perfomance Management - Zoho People
Hi team, I am looking for performance management data such as KRA, goals, feedback, appraisals, etc., in Zoho Analytics. However, I am unable to find these metrics while editing the setup. Could you please confirm whether these fields are available in
Deprecation of the Zoho OAuth connector
Hello everyone, At Zoho, we continuously evaluate our integrations to ensure they meet the highest standards of security, reliability, and compliance. As part of these ongoing efforts, we've made the decision to deprecate the Zoho OAuth default connector
Zoho Mail iOS app update: Display recipient's nickname on contact suggestion
Hello everyone! In the most recent version(v3.3.1) of the Zoho Mail iOS app update we have brought in support to display recipient's nickname in contacts suggestion. Please update the app to the latest version directly from the App Store or using the
Digest Février - Un résumé de ce qui s'est passé le mois dernier sur Community
Bonjour chers utilisateurs, Le 26 février, nous avons organisé notre première session Ask the Expert de 2026. Nous sommes heureux de partager que ce fut une session très interactive, avec de nombreuses questions intéressantes posées par nos clients. Si
Zoho CRM Case Notes - Share to Customer
Hi team does anyone know the Api to set a note, against a case, to shared with customer? i cant seem to find it cheers
Synching changes to Stripe when changes are made in Zoho Billing
We have a situation where we have merged customers in Zoho BIlling and then found out later that the payment in Stripe was not updated and still associated with the old customer record. The card gets updated and billed, but that payment is still associated
Send out follow-up email in the same thread (threaded conversations in individual emails) from Zoho CRM
Hi, I'm new to Zoho. I'm trying to send individual emails to my leads one by one. And I'll send out follow up email if I don't hear back from them later. However, instead of sending a new email, I want to reply in the same email thread so that the recipients
Depositing funds to account
Hello, I have been using Quickbooks for many years but am considering moving to Zoho Books so I am currently running through various workflows and am working on the Invoicing aspect. In QB, the process is to create an invoice, receive payment and then
web to lead
Can anyone help me how to create web to lead from zoho marketing automation
Introducing Workqueue: your all-in-one view to manage daily work
Hello all, We’re excited to introduce a major productivity boost to your CRM experience: Workqueue, a dynamic, all-in-one workspace that brings every important sales activity, approval, and follow-up right to your fingertips. What is Workqueue? Sales
UI issue with Organize Tabs
When looking at the organize Tabs window (bellow) you can see that some tabs are grayed out. there is also a "Add Module/Web Tab" button. When looking at this screen it's clear that the grayed out tabs can not be removed from the portal user's screen
I created a signup form in Zoho Marketing Automation with the correct field mapping, but the data is not being reflected under Leads in Zoho CRM.
web to lead from zoho marketing automation
Pasted Images not being embedded in custom mail
Hi, I'm making a custom report by email based on commentaries. I have the email ready, all working great except for images that are being pasted in the commentaries. Zoho deals with them as temp images and so it requires authentication to view them, something
Kaizen #232 - Building a Ticket Escalation Mechanism from Zoho CRM
Howdy, Tech Wizards! Picking up the thread from last week, we will continue our Zoho CRM and Zoho Desk integration. In Kaizen #231 - Embedding Zoho Desk Tickets in Zoho CRM, we built a Related List widget that displays open Zoho Desk tickets within the
Inactive License for free account.
I recently upgraded my Cliq subscription not my team (on the free version), are unable to login to their accounts. The error message received is Inactive License Looks like you have not been covered under the current free plan of users. Please contact
Deluge scripts
Why is there not a search function to make it easier to find the script of interest when modifications are required.
Zoho Sheet for Desktop
Does Zoho plans to develop a Desktop version of Sheet that installs on the computer like was done with Writer?
Zoho Books (and other Finance Suite Apps) - Clickable Item Name on Invoices and Reports
Hi Zoho Books team, It would be really helpful if the Item Name on Reports were clicable to take me to the item. The same on Invoices, often I am looking at an invoice and I want to look at the deails of a product. A link here would be helpful to jump
Zoho Books - Payment Gateway - Revolut
Hi Books Team, My feature request if to include the popular platform Revolut as a payment collection option on invoices in Zoho Books. Please upvote if you are also looking for this option.
Searching for an item from within an invoice should show any item containing the string, not just those that begin with the string.
Hello, I've found myself becoming increasingly frustrated with the limited line-item seach when adding new items to an invoice. The problem is that the characters being typed are only being matched from the beginning of the item name. This might be usable
How to Rank Tables by Row Count in Descending Order
I am trying to understand the consume of lines that grow up so fast in the last week. Is there any way to create a pivot table or query to get TABLE NAME LINES in descending order?
Dealing With One-Time Customers on Zoho Books
Hello there! I am trying to figure out a way to handle One-Time customers without having to create multiple accounts for every single one on Zoho Books. I understand that I can create a placeholder account called "Walk-In Customer", for example, but I
Next Page