We have an ongoing external email campaign that directs potential leads to our website. If they engage, they are considered a lead and are sent to SF. But, some already exist in our system so are being caught by the lead duplication rules, and the lead is not captured in SF. Is there a way that I can have the system recognize this as a duplicate and add the new Campaign to the old lead, and the status reset to new? BTW, we only use salescloud. #Sales Cloud #Campaign Members #Leads
Hi @Anne Kuczynski,
I see that at the moment your duplicate rule alerts and/or blocks the creation of the lead, so it doesn't come through. Are you able to identify via a certain field, all the leads that are part of this email campaign? If that's the case, you could create another duplicate rule (using the same matching rule) that does not alert nor block of the duplicate - it will only create a "Duplicate Record Set" Record with its child "Duplicate Record Item" records. You will need to create a filter in this duplicate rule so that it only applies to the relevant leads (and you will also have to filter the existing duplicate rule so that it doesn't apply to these leads, as you want these to pass through).
At the same time, you need to create a record-triggered flow on the "Duplicate Record Set" object, and in the Condition set that "Duplicate Rule ID" is equal to the ID of the new Duplicate Rule that you just created before, so that the flow only triggers for this case. In the flow you would then have to do a Get records to obtain the "Duplicate Record Items" for this Duplicate Record Set, so that you can figure out the Ids of the Leads (one will be the old Lead and one will be the new one, you can check that by CreatedDate. Once you have identified the old Lead Id, you can do the flow actions to assign the current campaign to this lead and reset the status to new, and finally add a delete element to delete the new Lead that just got created, so that only the old lead remains.
Hope this helps, let me know if you need clarification!