web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Customer experience | Sales, Customer Insights,...
Answered

Automatically link new Leads to Existing Contacts, if a matching Contact already exists.

(2) ShareShare
ReportReport
Posted on by 267
Hi,
 
Is there a way to import a list of new Leads (for example Trade Show attendees) from a csv, and then if that Lead matches an existing Contact, for the newly created Lead to be linked to that existing Contact (as it's parent contact)?
 
The only way I can think of doing it is to import from csv with the email address in both the Lead Email and the Parent Contact column (matching contact by email), and then re-running the import for any that fail (because no match was found) for the brand new individuals... Not very clean and a bit clunky though! Could it be done with a Power Automate Flow? If so can anyone help with the logic for checking if a matching contact exists and then linking it if it does?
 
Thanks!
I have the same question (0)
  • Verified answer
    Tom_Gioielli Profile Picture
    2,792 Super User 2025 Season 2 on at
    You can definitely do it with the import option you mentioned, but creating a flow would be a good approach as this logic can be handy to keep in place for any Lead created in your application.
     
    • Create a new flow with a Dataverse trigger on create/modify of a record in the lead table
      • Set the triggering field to be the email address, this way if the email is modified or added after creation the flow logic will run
      • Add a filter so the flow only runs when the email address is not null
    • Once triggered, the flow can do a List rows action on the Contact table, where Contact email address = Lead email address
      • Here is where you will need to make a decision. Ideally, your environment has duplicate detection turned on for Contacts and there can be just a single contact record with a given email address. However, if this is not the case you will need to determine which contact out of many that can be returned you want to link the lead record to.
        • I might recommend your 'List Rows' to be set to only return one result, sorted by most recent created date. This will mean that your lead gets linked to the newest contact with that matching email address, provided at least one is found
    • Use the 'Update a Row' Dataverse action to set the contact on your lead
      • Parent Contact = contacts(GUID of Contact Record Here)
     
    The above presumes you are somewhat familiar with flows and how the Dataverse connector works. If not, let me know and I can look at actually building something with the proper syntax for you to look at.
  • MichelleM Profile Picture
    267 on at
    Thanks @Tom_Gioielli - that works perfectly. Thanks for the breakdown of the flow steps too!

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Customer experience | Sales, Customer Insights, CRM

#1
Tom_Gioielli Profile Picture

Tom_Gioielli 70 Super User 2025 Season 2

#2
Gerardo Rentería García Profile Picture

Gerardo Rentería Ga... 33 Most Valuable Professional

#3
Daniyal Khaleel Profile Picture

Daniyal Khaleel 32 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans