---
schema_version: "1"
id: c1d2b67d0799e7f28215b96724f2902955269397c93c518d32f3c845213ec460
title: MatchRecord Class
collection: legacydeveloper
version: current
locale: en-us
portal_url: https://docs.salesforce.com/legacydeveloper/current/en-us/apexref/apex_class_Datacloud_MatchRecord.md
canonical_url: https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_class_Datacloud_MatchRecord.htm
source_site: developer.salesforce.com
content_type: documentation
content_hash: 2bcd1c56675cdcc5506a74c86e8e2a88fa4e891bb0e7f451cd93ef341e25e1ea
description: Represents a duplicate record detected by a matching rule. Returns other information about a matched record. For example, a matchGrade represents the quality of the data for the D&B fields in the matched record. Returns all matching rule fields and how each field value compares for the duplicate and its matching record.Returns the ranking of how similar a matched record’s data is to the data in your request. Must be equal to or greater than the value of the minMatchConfidence specified in your request. Returns -1 if unused.Returns the fields and field values for the duplicate.
---
# MatchRecord Class

Represents a duplicate record detected by a matching rule.

## Namespace

[Datacloud](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_namespace_datacloud.htm#apex_namespace_datacloud "The Datacloud namespace provides classes and methods for retrieving information about duplicate rules. Duplicate rules let you control whether and when users can save duplicate records within Salesforce.")

- **[MatchRecord Methods](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_class_Datacloud_MatchRecord.htm#apex_Datacloud_MatchRecord_methods)**

## MatchRecord Methods

The following are methods for MatchRecord.

- **[getAdditionalInformation()](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_class_Datacloud_MatchRecord.htm#apex_Datacloud_MatchRecord_getAdditionalInformation)**  
    Returns other information about a matched record. For example, a matchGrade represents the quality of the data for the D&B fields in the matched record.
- **[getFieldDiffs()](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_class_Datacloud_MatchRecord.htm#apex_Datacloud_MatchRecord_getFieldDiffs)**  
    Returns all matching rule fields and how each field value compares for the duplicate and its matching record.
- **[getMatchConfidence()](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_class_Datacloud_MatchRecord.htm#apex_Datacloud_MatchRecord_getMatchConfidence)**  
    Returns the ranking of how similar a matched record’s data is to the data in your request. Must be equal to or greater than the value of the minMatchConfidence specified in your request. Returns -1 if unused.
- **[getRecord()](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_class_Datacloud_MatchRecord.htm#apex_Datacloud_MatchRecord_getRecord)**  
    Returns the fields and field values for the duplicate.

### getAdditionalInformation()

Returns other information about a matched record. For example, a matchGrade represents the quality of the data for the D&B fields in the matched record.

#### Signature

public List<Datacloud.AdditionalInformationMap> getAdditionalInformation()

#### Return Value

Type: List<[Datacloud.AdditionalInformationMap](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_class_Datacloud_AdditionalInformationMap.htm#apex_class_Datacloud_AdditionalInformationMap "Represents other information, if any, about matched records.")\>

### getFieldDiffs()

Returns all matching rule fields and how each field value compares for the duplicate and its matching record.

#### Signature

public List<Datacloud.FieldDiff> getFieldDiffs()

#### Return Value

Type: List<[Datacloud.FieldDiff](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_class_Datacloud_FieldDiff.htm#apex_class_Datacloud_FieldDiff "Represents the name of a matching rule field and how the values of the field compare for the duplicate and its matching record.")\>

### getMatchConfidence()

Returns the ranking of how similar a matched record’s data is to the data in your request. Must be equal to or greater than the value of the minMatchConfidence specified in your request. Returns -1 if unused.

#### Signature

public Double getMatchConfidence()

#### Return Value

Type: [Double](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_methods_system_double.htm#apex_methods_system_double "Contains methods for the Double primitive data type.")

### getRecord()

Returns the fields and field values for the duplicate.

#### Signature

public SObject getRecord()

#### Return Value

Type: [SObject](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_methods_system_sobject.htm#apex_methods_system_sobject "Contains methods for the sObject data type.")