How to Automatically Populate the Deal ID in the Parent Lead After Creating a New Deal with Blueprint?

How to Automatically Populate the Deal ID in the Parent Lead After Creating a New Deal with Blueprint?

Hello Everyone! 🎉

I wanted to share a solution to a problem that some of you might have encountered. In Zoho CRM, when creating a Deal from a Lead using a Blueprint, data can only flow in one direction—from the Lead (parent) to the Deal (child). But what if you need the newly created Deal’s ID to be automatically added back to the Lead?

The Problem:
When creating a new Deal, it’s straightforward to pass the Lead ID to the Deal via a custom field, but there’s no native way to automatically link the new Deal’s ID back to the originating Lead.

The Solution:
I worked around this limitation by using a short Deluge script in a workflow that triggers after the creation of a new Deal. Here’s how it works:

  1. While creating a Deal via Blueprint, I populate a custom field in the Deal (Lead_ID_before_conversion) with the Lead’s ID.
  2. A workflow runs a Deluge script that:
    • Retrieves the Lead ID from the Deal’s custom field.
    • Updates the Lead with the ID of the newly created Deal.

Deluge Script:

void automation.FetchDealIDToMotherLead(int recordId)
// Fetch the Deal record based on the passed ID in JSON format dealInfo = zoho.crm.getRecordById("Deals", recordId, "json"); // Retrieve the Lead ID from the Lead_ID_before_conversion field leadIdJson = dealInfo.get("Lead_ID_before_conversion"); if(leadIdJson != null) { // Extract the ID directly from the JSON object leadId = leadIdJson.get("id"); // Update the Lead by setting the Deal_ID_after_conversion field to the current Deal ID leadMap = Map(); leadMap.put("Deal_ID_after_conversion", recordId); updateLead = zoho.crm.updateRecord("Leads", leadId, leadMap); } }

Steps to Implement:

  1. While creating the Deal in your Blueprint, make sure the field Lead_ID_before_conversion is populated with the originating Lead’s ID.
    (I’attach a screenshot showing where to configure this in the Blueprint!)

  2. Create an automated workflow for newly created Deals that triggers the Deluge script.

With this simple solution, you can effectively connect Leads to their Deals and streamline your data management! 😊

If you have any questions or need more details, feel free to ask! 💬


Best Regards
Katarzyna Ochnik
kochnik | LinkedIn



    • Sticky Posts

    • Kaizen #198: Using Client Script for Custom Validation in Blueprint

      Nearing 200th Kaizen Post – 1 More to the Big Two-Oh-Oh! Do you have any questions, suggestions, or topics you would like us to cover in future posts? Your insights and suggestions help us shape future content and make this series better for everyone.
    • Kaizen #226: Using ZRC in Client Script

      Hello everyone! Welcome to another week of Kaizen. In today's post, lets see what is ZRC (Zoho Request Client) and how we can use ZRC methods in Client Script to get inputs from a Salesperson and update the Lead status with a single button click. In this
    • Kaizen #222 - Client Script Support for Notes Related List

      Hello everyone! Welcome to another week of Kaizen. The final Kaizen post of the year 2025 is here! With the new Client Script support for the Notes Related List, you can validate, enrich, and manage notes across modules. In this post, we’ll explore how
    • Kaizen #217 - Actions APIs : Tasks

      Welcome to another week of Kaizen! In last week's post we discussed Email Notifications APIs which act as the link between your Workflow automations and you. We have discussed how Zylker Cloud Services uses Email Notifications API in their custom dashboard.
    • Kaizen #216 - Actions APIs : Email Notifications

      Welcome to another week of Kaizen! For the last three weeks, we have been discussing Zylker's workflows. We successfully updated a dormant workflow, built a new one from the ground up and more. But our work is not finished—these automated processes are