Use Case: Create Lead or Update Contact 


In this Article
Related Articles

Overview

Duplicate records can be a common issue when dealing with Leads and Contacts.

How do duplicates happen?

Perhaps you're using a Web-to-Lead form. This type of form only creates Leads and usually does not check to see if a Lead already exists.

Another possible cause for duplicates could be that you've converted a previous Lead to a Contact. In this case, they should not be considered a Lead. Instead of creating a Lead for them, you can add an Event or Task to their Contact record.

But no worries. We can help! You can use the respondent's email address to search Salesforce for an existing record. If the respondent is already a Contact, you can update their information. If not, you can create a new Lead within the connector.

Below are instructions for both the form-native version of this solution and the workflow-native solution.


Form-Native Salesforce Connector Solution

When you are using the Form-Native Salesforce Connector, you can follow the steps below to update an existing contact record or update or create a lead record if no contact exists.

Update an Existing Contact

First, select to Update the Contact object. An email address is unique, so base your Lookup on the email address entered in the form. Match your selections with the example below:

  • If no matching record is found: Skip this object and any dependent. (We'll take care of this in the next step.)
  • If one matching record is found: Update record (default).
  • If more than one records are found: This depends on what you need.
    • For example, pick Create a new record if you have several contacts sharing the same email address. If you choose End execution and log an error, you or the respondent will be notified of an error, but the data won't be pushed to Salesforce.

Create a Lead When No Contact Exists

Now, we need to handle the opposite situation, where no Contact exists. In this case, we want to create a new Lead. To do this, we follow a similar pattern as above Lookup the Contact, but apply the opposite logic:

  • If no matching record is found: Continue with dependent objects.
  • If one matching record is found: Skip this object and any dependent.
  • If more than one records are found: Skip this object and any dependent.

Add a step to Update Lead object as a dependent object to the Lookup Contact, and match your selections with the above example.

Again, if the Connector doesn't find any matching Leads, or if it discovers multiple Leads, you can set it to update the most recently modified record. If only one matching Lead is found, that record will be updated with the mapped fields.


Salesforce Workflow Connector Solution

When you are using the Salesforce Workflow Connector, you can follow the steps below to update an existing contact record or create a lead record if no contact exists.

Update an Existing Contact

In your first action, select to Update a Contact Record and rename this action to Update Contact. An email address is unique, so base your Lookup Query on the email address entered in the form. Then set your Match settings to the below: 

  • If no record found: Skip this action
  • If multiple records found: Pick most recently modified record

Finish mapping your form data to the Salesforce fields in the Mapping section.

Your existing Contact Record will now be successfully updated with this first action!

Create a Lead When No Contact Exists

To create a Lead Record when no Contact Record exists will span 2 actions, with the setup for each action listed below. 

Action 2

Add a second action to your connector, select to Lookup a Contact Record, and rename this action to Lookup Contact. Then set your Match settings to the below: 

  • If no record found: Continue with dependent actions
  • If multiple records found: Skip this action

This action is now set up and will check if a Contact record exists, then continue to the next steps to create a Lead Record if one does not.

Action 3

Add a third action to your connector, select to Create a Lead Record, and rename this action to Create Lead.

Add a Dependency to this action so that it runs only after the Lookup Contact action has completed.

Finish mapping your form data to the Salesforce fields in the Mapping section. 

This action is now set up and will only create a new Lead Record when there are no existing Contact records. 

Check Salesforce for your successfully created Lead Record. 


Terms of Service · Privacy Policy