# Match Rules on HubSpot

> Create and configure match rules on HubSpot: what a rule holds, its limits, how to turn it on, how to change a rule that is on, and how to follow its scan.

A match rule is a named set of field comparisons that describe one kind of duplicate. Dedupify scores pairs of contacts against each rule that is on, and a pair that clears the rule's review threshold goes to the review queue. Thresholds are covered in [Review Thresholds and Auto-Merge](../auto-merge/).

You build and test a rule in the rule editor. Open the **Rules** tab on the Dedupify settings page, then select a rule, or select **Create new rule** (**Create match rule** when the tab is empty), then **Create rule for** an object such as **Create rule for Contacts**. A new rule opens with no fields. It is off, and auto-merge is off, so every match waits for your review. Select the rule's name at the top to edit its name and its description.

To see your rules and open one, step through it:

**Read your match rules on HubSpot**

1. **Open the Rules tab** Open Dedupify's settings (Settings, Integrations, Connected apps, Dedupify) and choose Rules. Every rule you have is listed with its status.
2. **Open a rule** Select a rule's name. Match criteria lists the properties it compares. A rule that is on stays on while you edit its fields; its thresholds are read-only until you turn it off.
3. **Read its thresholds** Review and merge behavior holds the score a pair needs to merge on its own and the score that sends it to review.

## What a rule holds

* **Name**: the label Dedupify lists the rule under.
* **Object**: the kind of record it compares. A rule never compares different objects.
* **On or off**: a rule that is off runs no scans and finds no matches.
* **Field rules**: the properties it compares, and how it compares each.

A rule also has an optional **Description** for your team. It works on contacts, companies, deals, tickets, or a custom object on an Enterprise portal.

### Field rules

A field rule pairs a property with a **recipe**: the comparison Dedupify uses for that kind of value, such as an email address or a company name. Dedupify picks the recipe from the property's type. [Match Recipes](../properties/) lists every recipe and its options.

Each field answers three questions, and a sentence under the field's name sums up the answers as you change them: what counts as the same, what happens when the values differ, and what happens when one record is blank. [Blank values and conflicts](#blank-values-and-conflicts) covers the last two.

In the editor each field is a card. It shows the property's label as HubSpot names it, with the API name under it when the two differ. Select **Remove** on a card to take the field out.

To create a rule for contacts and turn it on, step through it:

**Create a match rule on HubSpot**

1. **Create a rule** Open Dedupify's settings (Settings, Integrations, Connected apps, Dedupify), choose Rules and select Create new rule. Then select Create rule for the object you want to deduplicate, here Contacts.
2. **Tick the fields to compare** Suggested fields lists the properties Dedupify matches on by default for the object. Tick the ones you want, up to five. Each ticked field is a card with a sentence that says how it is compared. A new rule is off, and auto-merge is off, so every match waits for your review.
3. **Name the rule** Select the rule's name at the top to edit its name and its description, then select Save.
4. **Turn it on** Select Save and turn on, then confirm Turn on rule. Turning on a rule starts a one-time scan of your existing records; after it, new duplicates surface as records are created or updated.
5. **Follow the scan** The scan runs on its own. It reads Starting while it waits for a worker, then Scanning with its step, a count and a bar that fills as the step goes, and when it is done every step is complete and it shows the duplicates it found. How long it takes depends on how many records you have: a few minutes for a small account, up to tens of minutes for a large one.

#### What counts as the same

The cleanup applied to both values before they are compared, and how close they must be. Each toggle has a one-line description, and an example where one helps. **Fuzzy match** is on by default for recipes that can match approximately. Turn it off to accept exact matches only. For phone numbers the toggle reads **Multi-step match**: on, Dedupify matches international, national and partial forms of one number, and off, only the whole number counts. A recipe that can only match exactly shows **Exact match only**.

#### Add a field

On a new rule, **Suggested fields** lists the properties Dedupify matches on by default for the object. Tick the ones you want. Unticking removes a field, and the list stays while the editor is open, so you can tick several.

To add any other property, choose it under **Property to add** and select **Add field**. The list offers properties a recipe can compare. Calculated properties and properties HubSpot hides are absent, and so is a property another field already uses, because one rule compares a property once. A new field starts on the property's default comparison with blank values skipped. A rule holds up to 5 fields, and the editor says **A rule can match on at most 5 fields.** when you get there.

#### Change how a field is compared

Dedupify picks each field's comparison from the property. Where a property has a real choice, open **Change how this field is compared** on its card and choose under **Comparison**. **Automatic** shows the comparison Dedupify would pick, and the field's current one is marked **(current)**.

The accordion is absent when there is nothing to choose: email, phone and the other strong identifiers have none, and neither does a property whose comparison is fixed. It never lists a strong identifier, and a name field keeps a name comparison. Switching resets the options to the new comparison's defaults, except that a veto you turned on stays on when the new comparison offers it. [Match Recipes](../properties/) describes every comparison.

### Why a name alone is risky

See why a name alone fails:

**Why name-only rules are risky**

1. **See the lookalikes** Two people can have the same name at the same company.
2. **Spot the risk** A rule on names and company alone flags both as duplicates, and it can only send pairs to review.
3. **Add an identifier** A differing email or phone number lowers the pair's score, so it can drop below your review threshold. Veto on conflict rules the pair out.

A rule on names alone flags every pair that shares them and can never auto-merge. Add an email or a phone number.

### Blank values and conflicts

* **When one record is blank**: **Skip this field** (default) leaves it out of the score, and the pair can still match. **Rule out the match** means a record with no value there can never match under this rule, including for review.
* **When the values differ**: **A different email rules the pair out**, with the field's own name in place of "email". Off by default, it rules a pair out when both records have a value and the values differ, even if every other field matches. It ignores blanks and applies only when the property is compared exactly: while the match style is fuzzy, the card says **Veto on conflict requires Exact match style**. A rule on an external ID always has it on.

See a blank phone value:

**Blank values**

1. **Find the gap** Records are often missing a phone number or an email.
2. **Skip the property** The default. The blank property is left out and the pair is scored on the values both records have.
3. **Or rule the pair out** Where a rule offers it, a record with no value in the property never matches under that rule, even for review.

See a veto on conflict:

**Required matches and veto on conflict**

1. **Spot the conflict** Two records can agree on a name and a company and still differ on a phone number.
2. **Veto on conflict** A property compared exactly can rule a pair out when both records have a value and the values differ.
3. **Require a value** Blank values set to Rule out the match keeps a record with no value in the property from matching at all.

You change both on the field's card. The toggle is read-only while the match style is fuzzy, and on a field that always applies, such as an external ID, it is locked on and says **This always applies to this kind of field.**

## Rule strength

See what makes a rule strong:

**What makes a strong rule**

1. **Know what adds up** A rule scores from 0 to 100 on a strong identifier, several properties, a property that can rule a pair out, and a safe auto-merge setting.
2. **Compare two rules** A rule on a name and a company is Weak. A rule with an email or phone, more properties and a required value is Strong.
3. **Meet the auto-merge bar** Strength is a guide. To auto-merge, a rule needs a strong identifier, and each pair needs one that matches exactly.

A rule with at least one property shows a **strength badge**: a score from 0 to 100 and a label.

* **Strong** (green)
* **Good** (blue)
* **Weak** (yellow)
* **Danger** (red)

The score rises when the rule has a strong identifier (an email, a phone number, a LinkedIn URL or an external ID), compares several properties, has a field that can rule a pair out (a different value rules the pair out, or **Rule out the match** for blanks), and keeps auto-merge off or at a high threshold. A strong identifier counts for the most. Hover the badge to see which of these the rule has. A new rule shows **Strength scored on save** until you save it.

Strength is a guide to how safely a rule finds duplicates. You do not set it, and it does not change how Dedupify scores a pair. Auto-merge has its own requirement, a strong identifier on the rule, which [Review Thresholds and Auto-Merge](../auto-merge/#rule-strength-requirement) describes.

## Limits

| Constraint | Limit |
|---|---|
| Field rules in one rule | 5 |
| The same property twice in one enabled rule | Not allowed |
| Rules turned on at once | Set by your plan; see [Plans and billing](../billing/) |

A rule that is off doesn't count toward the plan limit, so you can keep drafts.

## Several rules on one object

Each rule is scored on its own against its own thresholds, and a pair is surfaced when it clears any rule that is on. Use one rule per kind of duplicate: one on email, another on phone plus company name. Two rules may use the same properties.

## Testing a rule

Two buttons in the editor's header try a rule before you turn it on. Both read your real records.

**Test rule** opens a window with two columns, Record A and Record B. Pick a record from your portal for each side, or type values into the columns to test a made-up pair, and edit any value after picking to test a what-if. It scores the pair with the properties currently in the editor, saved or not, and shows:

* the verdict, **Auto-merge**, **Review** or **No match**, with the score and the thresholds it is measured against
* a breakdown per property, with the two values, the similarity, the contribution to the score and a label: **Matched**, **Partly similar**, **Too different**, **Missing on one side** or **Both empty**
* when the verdict is **No match**, **Why didn't this match?**, which points to the properties that held the score down

**Test pair** takes two real records and runs them through the rule as saved, the way a scan would. Choose which rule to test. A rule that is off can be tested too. The result shows each stage and whether the pair passed it:

1. **Blocking key match**: the records share a key a scan groups candidates by.
2. **Safety exclusion**: neither record matches a Never Merge rule.
3. **Field veto**: nothing rules the pair out, such as a conflict, a required field left empty, or too few fields filled in on both records.
4. **Score vs. review threshold**
5. **Score vs. auto-merge threshold**, evaluated only when the rule has auto-merge on.

The verdict reads **Would auto-merge**, **Would surface for review**, **Would not merge** or **No active rules**. When the pair would merge or be reviewed, a merge preview names the record that would survive and why.

## Turn a rule on

A new rule is off, so nothing changes until you turn it on. It turns on only for an object that is activated for Dedupify, on a started plan or free trial. [Plans and billing](../billing/) covers what activation costs.

1. If the rule's object is not active yet, select **Activate** and the object's name, for example **Activate Contacts**, and confirm the cost shown.
2. Select **Review and turn on**. If you have unsaved changes the button reads **Save and turn on** and saves them first.
3. Confirm **Turn on rule**. The confirmation says that turning on the rule starts a one-time scan of your existing records, after which new duplicates surface as records are created or updated. If auto-merge is on for the rule, it also warns that pairs scoring at or above the threshold are merged without review, and asks you to type a phrase first.

The editor shows the scan's progress and reports **Scan complete** with the number of possible duplicates.

Turning a rule off stops its scans and dismisses its pending matches from the review queue. Dedupify shows how many before you confirm.

## Change a rule that is on

A rule that is on stays on while you change its fields. Save the change from the rule editor: it opens a confirmation first. The confirmation says:

* Dedupify re-checks the rule's pairs in the background.
* The pairs waiting for review, with their number, stay until the re-check replaces them.
* With auto-merge on, auto-merge for this rule waits until the re-check finishes.
* A re-check that is already running or paused starts over from the beginning.
* Merged records stay merged.

Pairs you already reviewed or dismissed stay as they are, and other rules keep auto-merging.

In the editor, a rule that is on keeps its field cards editable, and your edits go into a draft that nothing reads until you save. **Cancel** and **Back** discard the draft. Thresholds are read-only: the banner reads **This rule is active** and says **Thresholds can't change while this rule is on, except turning auto-merge off.** The auto-merge toggle switches off but not on. A rename saves on its own, without the field edits, which stay in the draft.

The confirmation, **Save changes?**, adds two more lines when they apply. If a field edit made a stricter auto-merge threshold the better choice, the draft raises it, for example **Auto-merge's threshold rises to 97% to match the new fields.** Putting the fields back puts the threshold back. If the draft switches auto-merge off: **Auto-merge turns off for this rule. Its matches go to review instead.** Select **Save changes** again to confirm, or **Cancel** to go back to the draft.

The re-check is a scan of the rule, so it counts against API limits like one: see [How Scanning Works](../scanning/). Until it finishes, the pairs in your queue were found under the old fields, and auto-merge is not acting on them. 

If the re-check fails, the rule shows the error and **Retry scan** in the rule editor. Auto-merge for the rule keeps waiting until a scan of it completes: see [How auto-merge runs](../auto-merge/#how-auto-merge-runs).

### Try a change on your pending pairs

While you edit a rule that is on, **Try it on your pending pairs** shows how a sample of its waiting pairs would score with your change, before you save. It covers changes to a field's options and blank handling. When you add a field, remove one or change a field's comparison, there is nothing to sample until you undo that. Dedupify reads the sampled records from HubSpot as it does for a review, saves nothing, and shows the values only on the screen. A rule with no waiting pairs shows **No pairs to sample yet.**

It reads up to 50 of the rule's waiting pairs from HubSpot and shows:

* a line such as **12 pairs sampled, 3 would change.**, with the pairs that would change listed first
* for each pair, **Would change.** or **Stays the same.**, then **Now** and **With this change** each as **waiting for review**, **below the review threshold** or **ruled out**, with the score
* for each field the change touches, both records' values and the field's similarity before and after. The other fields are in a collapsed list.

HubSpot allows one sample about every 2 seconds for your portal. If more than one editor is sampling at once, the panel says **Samples are rate-limited for your account, so this one was held back. Try again shortly.**, and **Try again** works once the wait ends.

### If a change can't be saved

Dedupify refuses these before it writes anything, so a refusal changes nothing and your edits stay in the editor:

* **Your plan doesn't allow re-checking pairs right now, so the change wasn't saved.** Check [Plans and billing](../billing/).
* **Scans aren't available for your CRM yet, so changes to this rule's fields can't be saved until they are.**
* **A rule with auto-merge on needs a field that identifies a record**, such as an email. A change that removes the last one is refused. **Save changes** is disabled with the tooltip **Turn auto-merge off, or keep a field that identifies a record.** Switch auto-merge off in the same draft to save.

If **This rule changed somewhere else.** appears, your edits are still in the draft. The banner lets you **Keep editing** them, which overwrites the other update when you save, or **Discard my changes**.

If HubSpot doesn't answer clearly, Dedupify reloads the rule and says **The change may not have been saved, so the rule was reloaded.** Its fields show which happened.

## Scan status

Turning a rule on starts a scan of every record of its object. See [How Scanning Works](../scanning/).

## Object settings

Some options apply to the whole object, such as which properties appear on the review card. They live in the **Object Settings** tab. See [Object Settings: Survivorship & Safety](/docs/dedupify/hubspot/object-settings/).

Source page: https://artifactapps.com/docs/dedupify/hubspot/rules/
