> ## Documentation Index
> Fetch the complete documentation index at: https://help.revenuehero.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Salesforce matching rules

> Book inbound prospects with the rep who already owns them in Salesforce, using leads, contacts, accounts, opportunities or your own custom objects.

When a prospect fills in your form, matching rules check Salesforce for an existing owner before any calendar is shown. If a lead, contact, account, opportunity or custom object record already has an owner, the prospect books with that owner, and your territory rules only handle people you don't know yet.

> [!NOTE]
>
> **BEFORE YOU BEGIN**
>
> 1. [Connect Salesforce to RevenueHero](https://help.revenuehero.io/crm/salesforce/overview.md).
> 2. To match on opportunities, turn on **Enable Opportunities** in your Salesforce integration settings.
> 3. To match on a custom object, add that object in your Salesforce integration settings first.
>
> New to matching? Start with [What are Matching Rules?](https://help.revenuehero.io/what-are-matching-rules.md) for how matching fits into a router.

## How matching works in a router

Matching runs after qualification and before territory routing, on every inbound submission.

1. The prospect submits your form and the submission is enriched.
2. Qualification checks whether the prospect fits. Prospects who don't are disqualified and sent to the page you chose.
3. Your matching rules run in the order you set. The first rule that finds a record wins.
4. If a rule matches, territory routing is skipped and the prospect sees the owner's calendar.
5. If no rule matches, your distribution rules decide, for example by region or segment.
6. Salesforce is updated with the prospect, the owner and the meeting.

![Inbound router with matching rules on, running before distribution](https://mintcdn.com/revenuehero/a27sOTJ9YTTr7Wpt/images/salesforce_matching_01_router_flow.png?fit=max\&auto=format\&n=a27sOTJ9YTTr7Wpt\&q=85\&s=81f48e762f71d81c183569c9b49aa9f7)

## The eight Salesforce match types

Each matching rule looks for one kind of Salesforce record and books the prospect with that record's owner.

| Match type | What RevenueHero compares | Books with | Use it when |
| - | - | - | - |
| **Lead** | Prospect's email to the lead email | Lead owner | SDRs should keep the people they've already been working |
| **Contact** | Prospect's email to the contact email | Contact owner | Named people are assigned to a specific rep |
| **Account** | Prospect's email domain to the account domain | Account owner | Every new person from an owned account should reach its AE |
| **Associated Account** | Prospect's email to a contact, then that contact's account | Account owner | People email from a domain that differs from the account's website |
| **Related Contact Opportunity** | Prospect's email to a contact, then that contact's opportunity | Opportunity owner | People on an active deal should reach the rep running it |
| **Related Account Opportunity** | Prospect's email domain to an account, then that account's opportunity | Opportunity owner | Anyone from a company with an active deal should reach the deal owner |
| **Associated Account Opportunity** | Prospect's email to a contact, then the contact's account, then that account's opportunity | Opportunity owner | The deal sits on a parent account but people use their own domain |
| **Custom Object** | Any form field to a field on your custom object | Record owner | Ownership lives in your own object, such as customer success |

> [!NOTE]
>
> The three opportunity match types appear only after **Enable Opportunities** is turned on in your Salesforce settings.

## What each match type looks like in practice

These examples use a B2B team with SDRs, regional AEs and customer success managers. Pick a tab to see who each prospect books with.

> [tab] People
>
> > [card] A known lead comes back
> >
> > **Lead match**
> >
> > A marketing manager downloaded a guide last month and is still a lead owned by your SDR. Today they request a demo.
> >
> > **Books with:** that SDR
>
> > [card] A named contact asks for time
> >
> > **Contact match**
> >
> > A VP of Sales is already a contact owned by your Mid-Market AE.
> >
> > **Books with:** the Mid-Market AE

> [tab] Companies
>
> > [card] New person, known company
> >
> > **Account match**
> >
> > Someone from a company your Enterprise AE owns fills in the demo form. They've never been in Salesforce, but their email domain matches the account.
> >
> > **Books with:** the Enterprise AE
>
> > [card] Different domain, same company
> >
> > **Associated Account match**
> >
> > A prospect emails from a regional brand's own domain. Their contact record is linked to the parent company's account.
> >
> > **Books with:** the account owner

> [tab] Opportunities
>
> > [card] A buyer on a live deal returns
> >
> > **Related Contact Opportunity match**
> >
> > A champion on an open opportunity fills in the demo form again.
> >
> > **Books with:** the rep running that deal
>
> > [card] A colleague of an active deal
> >
> > **Related Account Opportunity match**
> >
> > A company has an open opportunity with your team. Someone from another department, who isn't on the deal, asks for a demo.
> >
> > **Books with:** the opportunity owner
>
> > [card] The deal sits with the parent company
> >
> > **Associated Account Opportunity match**
> >
> > A prospect emails from their division's own domain. Their contact sits under the parent company's account, which has an open opportunity.
> >
> > **Books with:** that opportunity's owner

> [tab] Your own objects
>
> > [card] An existing customer comes back
> >
> > **Custom Object match**
> >
> > A customer asks about adding another product. Current customers are tracked in a Customer Success object.
> >
> > **Books with:** their customer success manager

## Create a Salesforce matching rule

### Step 1: Open matching rules

1. In the left sidebar, click **Inbound → Matching Rules**.
2. Click **Create Matching Rule** in the top-right corner.
3. Pick the match type. This decides which Salesforce record RevenueHero looks for and whose owner the prospect books with.

![The eight Salesforce match types in the Create Matching Rule picker](https://mintcdn.com/revenuehero/a27sOTJ9YTTr7Wpt/images/salesforce_matching_02_match_types.png?fit=max\&auto=format\&n=a27sOTJ9YTTr7Wpt\&q=85\&s=87872214938a2b8b2ff6ff35a1056318)

### Step 2: Assign meetings

Choose what RevenueHero compares and who takes the meeting.

* **What to match.** Lead, contact and account rules default to the prospect's email or email domain. You can also match on phone, or compare any form field with a custom object's field. For example, a prospect whose phone number is already on a contact.
* **Owner field.** Read the record owner, or any other owner field you keep on the record. For example, a separate SDR owner field, so the SDR takes the first meeting.
* **How meetings are assigned.** Show the owner's availability, or the shared availability of everyone who needs to attend. For example, the account owner and the SDR together, at a time both are free.
* **Always assign to a specific member.** Recognize the relationship but always book with a person or team you choose. For example, a dedicated rep for a strategic segment.
* **Update owner field in Salesforce.** Write the rep who took the meeting back to Salesforce. You choose the owner field separately for leads and for contacts. For example, the lead's owner becomes the SDR who booked it.

![Step 1 Assign Meetings for an Account rule: email domain matched to account domain, owner field, and update owner in Salesforce](https://mintcdn.com/revenuehero/a27sOTJ9YTTr7Wpt/images/salesforce_matching_03_assign_meetings.png?fit=max\&auto=format\&n=a27sOTJ9YTTr7Wpt\&q=85\&s=f5f22c811497010659ac070432e33d90)

### Step 3: Add conditions

A found record only counts if the conditions you add on its Salesforce fields are also true. For example, match the account owner only when the account's industry is Healthcare.

Add an owner condition when you only want records owned by RevenueHero users to match. With that condition on the rule, a record owned by someone who isn't a RevenueHero user doesn't match, and the next rule runs. This covers cases like an account still owned by a rep who has left.

![Step 2 Add Conditions: the matching condition plus an additional condition on the account owner team](https://mintcdn.com/revenuehero/a27sOTJ9YTTr7Wpt/images/salesforce_matching_04_conditions.png?fit=max\&auto=format\&n=a27sOTJ9YTTr7Wpt\&q=85\&s=08a099b35745734d7574abd74c695c37)

### Step 4: Set meeting settings

These settings are optional and apply only to meetings booked through this rule.

* **When several records match this domain** (account rules). If more than one account shares a domain, choose **Don't match** (the default, so the prospect moves to the next rule), **Most recently created** or **Most recently updated**. For example, two accounts share a domain after an acquisition.
* **Fuzzy matching** (contact rules). If there's no contact with the exact email, RevenueHero uses another contact with the same email domain. A new colleague of a known contact then routes like that contact. This is only available when the rule matches on email.
* **Always add guests** to meetings booked through this rule.
* **Override default meeting settings** to use a different meeting type. For example, known accounts get a 30-minute discovery call with their AE.
* **Override redirect URLs** to send prospects to their own page after booking, or when they don't book.

![Step 3 Meeting Settings with advanced settings open: duplicate account handling and guests](https://mintcdn.com/revenuehero/a27sOTJ9YTTr7Wpt/images/salesforce_matching_05_meeting_settings.png?fit=max\&auto=format\&n=a27sOTJ9YTTr7Wpt\&q=85\&s=cb22e7d8a758f2e56e5c5eff08415933)

### Step 5: Add the rule to your router and set the order

Add the rule to your inbound router's matching rules. Rules run top to bottom and the first match wins, so put the most specific relationship first.

> [!TIP]
>
> A common order is opportunity rules first, then account, then contact or lead. That way a prospect connected to a live deal reaches the rep running it, even when someone else owns the account or contact.

## What happens after the match

| Result | What happens |
| - | - |
| **Matched** | Territory routing is skipped. The prospect sees only the owner's calendar and books with them. |
| **Matched, not booked** | With **Skip redistribution if qualified via matching rule** on in the router, the prospect isn't passed to anyone else. The owner is assigned and follows up. With it off, your redistribution rules can offer the meeting to another group. |
| **No match** | Your distribution rules pick the rep. If the prospect doesn't book, redistribution can offer the meeting to another group, such as SDRs. |

To keep matched prospects with their owner, open the router, expand **Redistribution** and turn on **Skip redistribution if qualified via matching rule**.

![Router Redistribution settings with Skip redistribution if qualified via matching rule turned on](https://mintcdn.com/revenuehero/a27sOTJ9YTTr7Wpt/images/salesforce_matching_07_skip_redistribution.png?fit=max\&auto=format\&n=a27sOTJ9YTTr7Wpt\&q=85\&s=a5bc1bd05ce9fa19fa060b2c4c758c32)

## Salesforce settings behind the rules

These live in your Salesforce integration settings and shape what your rules can do.

* **Enable Opportunities.** Turn this on once to use the three opportunity match types.
* **Custom objects.** Add any custom object, then match on its fields.
* **Refresh fields.** Fields you've just created in Salesforce don't appear in rules until you refresh fields.
* **Leads, contacts or both.** Choose which records RevenueHero creates and updates.

> [!WARNING]
>
> If a field you just added in Salesforce is missing from the rule builder, refresh fields in your Salesforce settings, then reopen the rule.

***

Your Salesforce matching rules now send known prospects to the rep who already owns the relationship.

> [card] [What are Matching Rules?](https://help.revenuehero.io/what-are-matching-rules.md)
>
> How matching fits into a router, for any CRM.

> [card] [How to create a Matching Rule?](https://help.revenuehero.io/rules/matching/create-matching-rule.md)
>
> Matching rules for campaign routers and Relays.

> [card] [How to integrate Salesforce CRM?](https://help.revenuehero.io/crm/salesforce/overview.md)
>
> Connect Salesforce before you build rules.

> [card] [Routing Logs](https://help.revenuehero.io/reports/inbound/routing-logs.md)
>
> See why each prospect reached a rep.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.