How lead-to-account matching works in Default
A lead-to-account workflow in Default runs these steps:- A trigger starts the run with the lead. Use CRM Record Created on the Salesforce Lead for leads that already exist in Salesforce, or Form Submission, API, or Incoming Webhook for leads that arrive with form or request data. See Triggers.
- Match Record searches Accounts. Set Record to Account. The conditions under Match Details decide which Accounts count as the lead’s company.
- Tiebreakers pick 1 Account. When several Accounts match, the rules under Prioritize matched records by choose 1 of them.
- The node branches. Match carries the chosen Account’s ID and fields to later nodes. No Match runs when no Account qualifies.
- Later nodes act on the result. On Match, route the lead to the account owner or convert it into the Account. On No Match, route the lead through a queue.
Match options for Salesforce accounts
Match Details compares Account fields with values from the trigger or earlier nodes. It lists the Account fields that Salesforce lets you filter on, including custom fields. Combine conditions with and or or.
Match Details needs at least 1 condition before the workflow can be published.
When several Salesforce accounts match
A company often has several Accounts, for example a parent and its subsidiaries, or duplicates created by different teams. Prioritize matched records by decides which one the workflow uses. It is optional. Select Add tiebreaker to add a rule:
How Default applies the rules:
- Only when 2 or more Accounts match. When exactly 1 Account matches, the node uses it and runs no rule. Put a hard requirement, such as the Account owner, in Match Details instead.
- In order, top to bottom. Drag a rule to reorder it. A sort rule directly below another sort rule breaks its ties. Empty values sort last.
- Filter rules narrow the list but never empty it. Has a parent account and Prefer records where… keep only the Accounts that meet them. When none of the remaining Accounts meets a filter rule, Default skips that rule, keeps the Accounts for the next rules, and adds a warning to the run log. Tiebreakers never send the node to No Match.
- Without rules, the first result wins. Default takes the first Account Salesforce returns, and that order is not defined. Add at least 1 rule whenever more than 1 Account can match.
- Rules see a limited window. When Default sorts or filters the matches itself, it reads a limited number of matching Accounts. If that limit is reached, the run log shows a warning with the query limit, and better matches beyond it are skipped. Narrow Match Details so fewer Accounts match.
When no Salesforce account matches
The node follows No Match in these cases:
Give No Match its own path. Route the lead through a queue with a Round-Robin node,
send it to an enrichment node to find the company first, or both.
Build a Salesforce lead-to-account workflow
This example sends each new inbound Salesforce Lead to the owner of its company’s Account. Leads without a matching Account go to the next member of a queue namedInbound Leads.
1
Add the trigger
In Workflows, create a workflow and add the CRM Record Created trigger. Set CRM to
Salesforce and Record to Lead. Optionally, add a Condition, for example
Lead Source is Inbound.2
Add Match Record for the Account
Select Add Node and choose Match Record from the Records section. Set CRM to
Salesforce and Record to Account.Under Match Details, select Edit. Choose Website as the field and domain matches
as the operator. For the value, pick the Lead’s Email from the trigger and choose
Domain from email. Select Save changes.
3
Add tiebreakers
Under Prioritize matched records by, select Add tiebreaker and choose
Largest by employees. Add a second tiebreaker, Most recently modified.
4
Route matched leads to the account owner
On the Match branch, add Update Record. Set Platform to Salesforce and
Record Type to Lead. For Record to update, choose the Lead’s record ID from the
trigger.Under Fields, add Owner ID. For its value, open the data picker and choose the Account’s
Owner ID from the Match Record step.
5
Round-robin the rest
On the No Match branch, add Round-Robin from the Actions section and set Queue to
Inbound Leads. Then add Update Record for the Lead and set Owner ID to
Latest assigned user under Round robin.6
Test and publish
Select Test, choose the trigger, and fill in a sample Lead whose email domain belongs to an
existing Account. Select Run Test and check the Lead owner in Salesforce. 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.
Convert a matched lead into the existing account
Convert Lead turns a Salesforce Lead into a Contact under an Account. Set Account to merge into (optional) to the matched Account, and Salesforce adds the new Contact to that Account instead of creating a second Account for the same company. Add Convert Lead after the Match branch of the Account Match Record node:
What to know before you convert:
- Salesforce only. Convert Lead works on Salesforce Leads and has no HubSpot version.
- Converted status. Default uses the first converted lead status in your Salesforce organization, by sort order.
- Already converted. If the Lead is already converted, the node returns its existing Account, Contact, and Opportunity IDs and continues without converting again.
- Outputs. Later nodes can use the Lead, Account, Contact, and Opportunity IDs.
- 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. A rule set to allow with an alert lets it through.
- Permanent. Salesforce cannot undo a lead conversion. Test with a test Lead.
Check a Salesforce lead-to-account match
Open the workflow, select Runs at the top, and select a run. In the run details, the Match Record step shows its conditions, how many Accounts Salesforce returned, and the Account it chose. When domain matches dropped a lookalike domain, the step also shows how many candidates survived. See Run logs.Troubleshoot Salesforce lead-to-account matching
Related: Lead routing software from Default