How Salesforce contact matching works in Default
A contact-first intake workflow in Default runs these steps:- A trigger starts the run with the person’s email. Use Form Submission, API, or Incoming Webhook. See Triggers.
- Match Record looks for a Contact. Set Record to Contact and match Email to the email from the trigger.
- Match: the person is already a Contact. Later nodes use the Contact’s ID, Owner ID, and Account ID. No Lead is created, and the Contact keeps its owner.
- No Match: look for a Lead. A second Match Record node searches Leads by the same email.
- Create a Lead only when neither exists. On the second No Match, a Round-Robin node picks an owner and Create Record creates the Lead.
Match options for Salesforce contacts
Match Details lists the Contact fields that Salesforce lets you filter on, including custom
fields, and needs at least 1 condition before the workflow can be published.
Update on conflict behaves differently from Match Record:
- It looks for an exact match on the Match field value, and the Match field must also be in Mapped Fields.
- With exactly 1 match, it updates that record with the mapped fields. With none, it creates a record. With 2 or more, the node fails, because it cannot tell which record to update.
- It writes every mapped field that Salesforce lets it update, including Owner ID. Leave Owner ID out of Mapped Fields so an existing Contact keeps its owner.
When several Salesforce contacts match
The same email can sit on more than 1 Contact. Prioritize matched records by picks 1 of them. Select Add tiebreaker:
Rules run from top to bottom, and only when 2 or more Contacts match. A single matching Contact is
used as it is, so put a hard requirement in Match Details instead. Prefer records where…
keeps only the Contacts that meet it. When none of the remaining Contacts meets it, Default skips the
rule, keeps those Contacts for the next rules, and adds a warning to the run log. Without any rule,
Default takes the first Contact Salesforce returns, and that order is not defined.
See Salesforce lead-to-account matching
for how rules combine.
When no Salesforce contact matches
The node follows No Match when no Contact has the email. It also follows No Match, without searching, when the email is empty for that run. The run log then shows a warning that the match conditions could not be built because upstream data was missing. Use No Match to check for a Lead before you create one:- Add Match Record with Record set to Lead. Match Email to the same email, and add
Converted equals
falseso a Lead that was already converted does not count. - On its Match branch, leave the existing Lead and its owner alone.
- On its No Match branch, pick an owner with Round-Robin and create the Lead with Create Record.
Build a contact-first intake workflow
This example handles a demo request form. Known Contacts keep their owner and get a follow-up task. New people become Leads owned by the next member of a queue namedInbound Leads.
1
Add the trigger
In Workflows, create a workflow and add the Form Submission trigger. Set
Connected Form to your demo request form.
2
Match the Contact by email
Add Match Record from the Records section. Set CRM to Salesforce and Record to
Contact. Under Match Details, select Edit, choose Email and equals, and pick the
email from the form. Select Save changes.Under Prioritize matched records by, select Add tiebreaker and choose
Most recently modified.
3
Follow up with the Contact's owner
On the Match branch, add Create Activity. Set CRM to Salesforce and Type to
Task. Under Fields, map the subject and due date, set the Task owner to the Contact’s
Owner ID from the Match Record step, and set the Task’s Name ID to the Contact’s ID
from the same step. Leave Associated record (optional) empty. It fills the Task’s
Related To ID, which takes a record such as an Account or Opportunity, not a Contact.
4
Look for an existing Lead
On the No Match branch, add a second Match Record. Set Record to Lead. Match
Email equals the email from the form, and add Converted equals
false. Leave its
Match branch without an owner change.5
Create the Lead
On the second No Match branch, add Round-Robin with Queue set to
Inbound Leads. Then
add Create Record with Platform set to Salesforce and Record Type set to Lead.
In Mapped Fields, map Email, the fields your Leads require, such as Last Name and
Company, and Owner ID set to Latest assigned user under Round robin.6
Test and publish
Select Test and run the form trigger once with the email of an existing Contact and once with
a new email. Check Salesforce after each run. Then select Publish and check that the status
next to the deployment switch reads Live. A new workflow
goes live when you first publish it. If the status reads Paused, turn the switch on.
Merge a duplicate lead into the existing contact
When a new Lead has the same email as an existing Contact, Convert Lead can merge the Lead into that Contact and its Account. Salesforce then keeps 1 person record instead of a Lead and a Contact.1
Start from the new Lead
Add the CRM Record Created trigger with CRM set to Salesforce and Record set to
Lead.
2
Match the Contact
Add Match Record with Record set to Contact, and match Email equals the Lead’s
Email from the trigger. Add the Most recently modified tiebreaker.
3
Convert the Lead into the Contact
On the Match branch, add Convert Lead and set the fields in the table below.
4
Route the rest
On the No Match branch, route the Lead as usual, for example with
lead-to-account matching.
What to know before you convert:
- Author Apex. Default converts leads through Apex, so the Salesforce user connected to Default needs the Author Apex permission.
- Duplicate rules apply. A duplicate rule set to block stops the conversion and the node fails, with a message that suggests merging into the matching Account or Contact. A rule set to allow with an alert lets the conversion through.
- Already converted. A Lead that is already converted returns its existing IDs, and the node does not convert it again.
- The Contact needs an Account. Salesforce merges a Lead into an existing Contact only together with that Contact’s Account. When the matched Contact has no Account, Default sends no Account ID and the conversion fails. Before Convert Lead, add a Multi-Branch that checks the Contact’s Account ID is not NULL, and route Contacts without an Account another way.
- Permanent. Salesforce cannot undo a lead conversion. Test with a test Lead.
Check and troubleshoot Salesforce contact matching
Open the workflow, select Runs at the top, and select a run. Each Match Record step shows its conditions, how many records Salesforce returned, and the record it chose. See Run logs.
Related: Lead routing software from Default