Skip to main content
Account-based routing sends a new lead or contact from a company you already work to the rep who owns that company’s account, so 1 rep works each account. People from companies you don’t work yet go to a queue as usual. Default runs account-based routing as a workflow for Salesforce and HubSpot. A Match Record node finds the person’s Salesforce Account or HubSpot Company by company domain, the Match branch assigns the account owner, and the No Match branch sends everyone else to a Round-Robin queue or to Rules of Engagement territories.

Account-based routing at a glance

Setup for account-based routing

2 ways to give matched people to the account owner

Neither path counts toward a queue’s round robin, because no queue picked the owner. A rule’s Fallback queue pick does count, once Update Record writes it. The steps below use Update Record. For the Rules of Engagement version, see Route with Rules of Engagement instead.

Build an account-based routing workflow for Salesforce

This example sends each new inbound Salesforce Lead to the owner of its company’s Account. Leads from companies without an Account go to the next member of a queue named Inbound 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

Match the Account by company domain

Select Add Node and add Match Record from the Records section. Set CRM to Salesforce and Record to Account. Under Match Details, select Edit, choose Website and domain matches, pick the Lead’s Email from the trigger, and choose Domain from email. Select Save changes. Personal email domains such as gmail.com never match. See Match an account by company domain.
3

Keep only accounts owned by a current rep

In Match Details, add a second condition joined with and: Owner ID equals Queue: Account Executives, a queue that holds every rep who owns accounts. Accounts owned by anyone else, such as an integration user or a rep who left, take No Match and go to the round robin.
4

Pick 1 Account when several match

Under Prioritize matched records by, select Add tiebreaker and choose Largest by employees. Add Most recently modified below it. See When several Salesforce accounts match.
5

Send matched leads to the account owner

On the Match branch, add Update Record. Set Platform to Salesforce, Record Type to Lead, and Record to update to the Lead’s record ID from the trigger. Under Fields, add Owner ID and choose the Account’s Owner ID from the Match Record step. To alert the owner too, add Send Slack Message with that Owner ID under Recipients. The owner needs a Salesforce and a Slack mapping in Settings → Users.
6

Round-robin everyone else

On the No Match branch, add Round-Robin with Queue set to Inbound Leads. Then add Update Record for the Lead and set Owner ID to Latest assigned user under Round robin. To split by region or size instead, see Territory and segment routing.
7

Test and publish

Select Test, choose the trigger, and fill in a test 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.
A workflow test performs real actions in Salesforce. It changes the Lead owner and counts queue assignments. Use a test Lead.
A Queue: condition counts only active members with a CRM mapping. A member paused with Pause assignments counts as outside the queue, so their accounts’ leads take No Match while they are paused. To avoid that, use Rules of Engagement.

Merge matched leads into the Account

To turn a matched Lead into a Contact on the existing Account, add Convert Lead after Update Record on the Match branch. Set Lead to convert to the Lead’s record ID and Account to merge into (optional) to the Account’s ID from the Match Record step. Leave Owner (Optional) empty: Default then sends no owner, and Salesforce gives the new Contact the Lead’s owner, which is now the account owner. Conversion is permanent and needs the Author Apex permission. See Convert a matched lead into the existing account.

Route form fills to the account owner

A Form Submission workflow starts from form data, so it checks for the person before the account:
  1. Add Match Record for a Contact, then a Lead, by email. People who already exist keep their owner. See Salesforce contact matching.
  2. On the last No Match, add the Account Match Record from the steps above.
  3. On its Match branch, add Create Record for the Lead with Owner ID set to the Account’s Owner ID. On No Match, add Round-Robin, then Create Record with Owner ID set to Latest assigned user.
  4. To let the person book with the account owner, add Display Scheduler, turn off Use event hosts, and add the Account’s Owner ID as the host. The owner needs a Salesforce mapping in Settings → Users so Default can find their calendar. See Connect a scheduler to your form.

Route with Rules of Engagement instead

A Rules of Engagement ruleset puts the account owner and your territories in 1 ordered list:
  1. On the ruleset page, select Add source and add the Salesforce Account or the HubSpot Company. Its fields become available in rule conditions and as User targets, and the fields your rules use are saved automatically.
  2. Select New rule and name it Existing account owner. Under Criteria, check that the account’s owner field is not NULL. Set Route to to User with the owner field, and set Fallback to a queue such as Named Accounts. Select Save changes.
  3. Keep it above your territory rules. New rule adds a rule at the bottom, so drag it to the top of an existing ruleset. Then select Publish.
  4. In the workflow, add a Rules of Engagement node with this ruleset on both branches of the Account Match Record. On No Match the owner input is empty, so the territory rules decide.
  5. On Resolved, add Update Record with the owner field set to Latest resolved user. On Else, add Round-Robin for a catch-all queue, then Update Record with the owner field set to Latest assigned user. If a queue in the ruleset can end up with no active members, check that Latest resolved user exists with a Multi-Branch first.
See Route named accounts to their existing owner for a full ruleset with territory rules.

Route target accounts differently

Default uses the target account fields in your CRM, for example a checkbox or a tier picklist on the Account or Company. Use the field in 1 of these places:

Salesforce and HubSpot differences

  • Record: Account, matched on Website. Write the owner to the Lead or Contact Owner ID.
  • Salesforce requires an owner on every Account, so unowned Accounts usually sit with an integration user. The Queue: condition in Match Details keeps them out.
  • Convert Lead can merge a matched Lead into the Account. It works only in Salesforce.
  • Salesforce can refuse to assign a record to a deactivated user, so the owner write can fail when an Account still belongs to one. Remove departed reps from the queue, and the Queue: condition keeps their Accounts out.
  • Record: Company, matched on Company Domain Name. Write the owner to the contact’s Contact owner from the Company’s Company owner.
  • A HubSpot Company can have no owner. Default does not write an empty owner, and an Update Record with nothing left to write fails. Add Company owner is not NULL to Match Details, so Companies without an owner take No Match.
  • Link the contact to the matched Company with Create Association. When the contact is already associated, match with Match by association instead. See HubSpot contact-to-company matching.
  • In a form workflow, find or create the contact first. See HubSpot contact matching.

Check that account-based routing worked

  • Runs: open the workflow, select Runs at the top, and select a run. The Match Record step shows its conditions, how many accounts the CRM returned, and the one it chose. The Update Record step shows the owner it wrote. See Run logs.
  • Rules of Engagement: admins can open the ruleset and select Logs to see which rule decided and why.
  • Assignments: in Routing, select Assignments, then Object assignments. Queue picks appear here once they are written as the owner. Owners that no queue picked do not.
  • The CRM: the person’s record shows the account owner, and a converted Lead appears as a Contact on the Account. For the full trail, see Why a lead went to a rep.

Troubleshoot account-based routing

Related: Lead routing software from Default