The qualification or disqualification of a Lead in Dynamics 365 is a human triggered event that kicks off a predefined process. That process will convert the Lead to a new Contact and Account record and also create an Opportunity that is associated with the Contact and Account. There will also be a link back to the originating lead in the Opportunity record.
But what happens to important pieces of information that were recorded in the CRM user’s conversations with the Lead? Absolutely nothing! They stay with the Lead record and remain several clicks away from the Opportunity record and are basically out of sight and out of mind.
I started thinking about how to solve this challenge with Microsoft Flow after seeing a post on the CRMUG Community support forum.
This is what I have come up with as one approach to copy the Notes and attachments to the Opportunity record automatically. You could also approach it differently by changing the regarding on the Notes from the Lead record to the new Opportunity record. Modify it to fit the way your company wants it to work.
Here is a big picture of what the Flow looks like. (if it looks a little scrunched on your screen, click on it to get a bigger view):
Let’s break down each step in the Flow:
Step 1 – Listen for the creation of a new Opportunity and then get all the field data from the Opportunity record. We will need some of that info in later steps.
Step 2 – Check to see if the Opportunity was created as a result of the Automated Lead Qualification workflow. We do this by checking to see if the attribute field on the Opportunity record has any data in the Originating Lead Lookup field (look for this in the Marketing section of the Opportunity form)
Step 3 – If it resolves to False, it means the lookup field is not empty, ie it came from a Lead, so then go down the Yes path. If it didn’t come from a Lead conversion we don’t need to do anything so we don’t need any steps for the No result.
Step 4 – Now lets get all the Notes for the Lead record and then loop through them using the Apply to Each function to make a Copy of the Lead Note to a New Note along with the attachment, if any. And set the regarding to the new Opportunity.
There you go. The takeaway is the List and Apply to Each Actions in Microsoft Flow is the greatest thing to happen for us in the Dynamics 365 world.