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

# Match Data Record

The `match-data-record` function type finds a data record with fields matching a query. Unlike `find-data-record-by-id` which searches by ID, this function type searches by field values.

## Usage

This function type is used in Actions to provide access to data collection match functionality.

## Configuration Example

```yaml theme={null}
name: Find Contact by Email
key: find-contact-by-email
inputSchema:
  type: object
  properties:
    email:
      type: string
type: match-data-record
config:
  dataSource:
    collectionKey: contacts
  lookup:
    query:
      email:
        $var: $.input.email
  fieldMapping:
    importValue:
      name:
        $var: $.fullName
      email:
        $var: $.primaryEmail
```

## Configuration Parameters

* `dataSource` - Data source configuration
  * `collectionKey` - Identifier of the data collection to operate on
  * `collectionParameters` - Parameters passed to the collection methods
  * `udm` - (for universal integrations only) Universal Data Model to read
* `lookup` - Query configuration for matching records
  * `query` - Field values to match against (supports formulas)
  * `universalQuery` - Universal field values for matching (for universal integrations)
* `fieldMapping` - Field mapping configuration
  * `importValue` - Maps fields from external app to your app format

## Output

Single record object or `null` if no match is found
