function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Jairus McClureJairus McClure 

Using formula in process builder to avoid duplicate leads

A team of mine uses Cases in salesforce when logging specific interactions with customers. When interaction with the customer is done, they will either close the case or select "Closed to Lead" if they believe there is potential for future business a salesperson should follow up with. I also have a picklist on the case record called "Closed to Lead" that is automatically changed from "No" to "Yes" whenever a case is closed to a lead. Whenever the closed to lead picklist is changed to yes it triggers an automated creation of a new lead that is assigned to a sales person. 

The only problem is in some cases the original case team is contacted again after they've closed a case, so they must change the case status back to "In Progress", work with the customer again, and then close the case once again. This creates duplicate leads as every time the case is edited again the process builder recognizes the picklist as being "Yes" and creates a new lead every time the case is created. 

I've tried using the ISCHANGED function is process builder to prevent this, but for some reason it won't work. Does anyone have any idea a formula that would prevent the duplicate leads being created? 
Syed Insha Jawaid 2Syed Insha Jawaid 2
Hi Jairus

How about entering the source case Id in a lead field and then making that field unique?

Cheers!!!
Jairus McClureJairus McClure
What is best practice in making the field unique? Get Outlook for iOS Jairus McClure, Samtec New Albany Office: 812-920-7551 www.samtec.com