---
schema_version: "1"
id: 7344cfa69884bf40785f90d8c7ad48d38ca6681caed79563208196766f28142e
title: MatchingRuleItem
collection: legacydeveloper
version: current
locale: en-us
portal_url: https://docs.salesforce.com/legacydeveloper/current/en-us/object_reference/sforce_api_objects_matchingruleitem.md
canonical_url: https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_matchingruleitem.htm
source_site: developer.salesforce.com
content_type: documentation
content_hash: e983469fb0d763a3722366620e9ec72d1eb8558e778acb3f260605c049b30ca3
description: Represents criteria used by a matching rule to identify duplicate records. This object is available in API version 33.0 and later.
---
# MatchingRuleItem

Represents criteria used by a matching rule to identify duplicate records. This object is available in API version 33.0 and later.

A matching rule item determines which field the matching rule uses to identify a duplicate record. It also determines the method used to compare value that two records have for the field. For example, a matching rule item might specify that the Email field values of two records must match exactly in order for the records to be considered duplicates.

When a matching rule has multiple matching rule items, it means that multiple fields must match in order for the records to be identified as dupcliates.

## Supported Calls

describeSObjects(), query(), retrieve()

## Special Access Rules

As of Summer ’20 and later, only users with the View Setup and Configuration permission can access this object.

## Fields

| Field Name | Details |
| --- | --- |
| BlankValueBehavior | 
Type

picklist

Properties

Defaulted on create, Filter, Group, Restricted picklist, Sort

Description

Specifies how blank fields affect whether the fields being compared are considered matches. Valid values are:

- MatchBlanks
- NullNotAllowed (default)





 |
| Field | 

Type

picklist

Properties

Filter, Group, Nillable, Restricted picklist, Sort

Description

Indicates which field to compare when determining if a record is similar enough to an existing record to be considered a match.



 |
| MatchingMethod | 

Type

picklist

Properties

Filter, Group, Nillable, Restricted picklist, Sort

Description

Defines how the fields are compared. Choose between the exact matching method and various fuzzy matching methods. Valid values are:

- Exact
- FirstName
- LastName
- CompanyName
- Phone
- City
- Street
- Zip
- Title

For details on each matching method, see “Matching Methods Used with Matching Rules” in the Salesforce Help.



 |
| MatchingRuleId | 

Type

reference

Properties

Filter, Group, Sort

Description

The ID for the matching rule.

This is a relationship field.

Relationship Name

MatchingRule

Relationship Type

Lookup

Refers To

MatchingRule



 |
| SortOrder | 

Type

int

Properties

Filter, Group, Sort

Description

The order of the matching rule items for a matching rule.



 |

## Usage

Use the Salesforce SOAP API to retrieve and view details about MatchingRule and MatchingRuleItem. Use the Salesforce Metadata API to create, update, or delete these objects.

#### See Also

- [MatchingRule](https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_matchingrule.htm "Represents a matching rule that is used to identify duplicate records. This object is available in API version 33.0 and later.")
- [DuplicateRule](https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_duplicaterule.htm "Represents a duplicate rule for detecting duplicate records.")

- [MatchingRule in the Salesforce Metadata API Developer's Guide](https://developer.salesforce.com/docs/atlas.en-us.264.0.api_meta.meta/api_meta/meta_matchingrule.htm " MatchingRule in the Salesforce Metadata API Developer's
    Guide - HTML (New Window)")