point1

Many of the people working with the Sales & Marketing team would have come across this situation wherein they get leads from people who already exist as contacts in your Salesforce org. This in fact is an every day story for companies whom 90% of the customers are repeat customers. So, how do these companies tackle with this situation ?

The easiest solution, I would suggest is to simply configure a duplicate rule in your Salesforce org which would automatically identify the incoming lead as an existing contact and simply update the existing contact. So, why would anyone create an altogether fresh lead record when it already exists as a Contact ? Well, there are reasons why companies choose to do it that way. To some companies the reason may be as simple as having a check on the statistics like the the number of times a lead has been generated against the same contact. At the end of the day, it’s upon you to choose what suits your requirement better.

In this post I will walk you through setting up a flow, that will associate a lead with an existing Contact if the lead name matches with the Contact Name.

Before, we get started, it’s assumed that your Lead object has a new custom field defined which is a lookup to the Contact object. So the flow will identify the existing Contact and put the contact record value into this custom field.

Let’s kick start with the flow now.

We will need just two elements in our flow

  1. A Record Lookup element – to lookup for an existing Contact with the same name.
  2. A Record Update element – to associate the Contact found with the Lead created.

Our flow will also need the below 3 variables.

  1. InputName – An input variable to hold the name of the Lead which will be used to match with an existing Contact.
  2. InputLeadID – An input variable to identify the lead record that needs to be updated.
  3. OutputID – An output variable that will store the ID of the contact record matched and the one which will be used to associate with the Lead record.

The variables are defined as below

p1

p2

p3

 

Now, that we have defined the variables, let’s create the Record Lookup and Record Update elements as shown below.

p4

p5

Your flow should look like below.

p6

Now, that our flow is ready, simply Activate your flow and we just have to create a process that will invoke this flow like below. Note that you need to pass the values of the input variables defined in the flow from this process that we define in the process builder.

p7

Just Activate your process and you are now good to go !

Feel free to comment if you have any doubts. Happy using flows !

 

 

Advertisements