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

# Name Match

> Determine whether a subject's name matches the name extracted from their document in GBG GO, accounting for nicknames and abbreviations.

The **Name Match** module determines whether the subject's name matches the name extracted from a document. The comparison accounts for nicknames and abbreviations of the target name, for example matching "Bill" against an extracted "William".

This module is typically placed after a [Document Extraction](/docs/go-v2/platform/modules/documents/document-extraction) or [Document Verification](/docs/go-v2/platform/modules/documents/document-verification) module in a journey, since it requires extracted document data as an input.

**Required inputs:** Full name, primary document extraction data.

## Capabilities

| Capability      | Type    | Range/Values    | Description                                                                    |
| --------------- | ------- | --------------- | ------------------------------------------------------------------------------ |
| Does name match | Boolean | `true`, `false` | Whether the input name matches the name extracted from the document.           |
| Match score     | Integer | 0–100           | The confidence score of the name match. Higher values indicate a closer match. |

## Default outcomes

The outcome logic uses only the boolean match result. The match score is available for custom evaluation rules, for example to set a minimum confidence threshold.

| Outcome          | Condition                       | Description                                                      |
| ---------------- | ------------------------------- | ---------------------------------------------------------------- |
| `IsNameMatch`    | Does name match is `true`       | The subject's name matches the name extracted from the document. |
| `IsNotNameMatch` | Does name match is `false`      | The subject's name doesn't match the extracted name.             |
| `Error`          | Default (no conditions matched) | An error occurred during the name matching process.              |

## Input payload

The following is a sample payload used to submit subject details to the **Name Match** module for processing.

```json JSON theme={null}
{
  "resourceId": "<resourceId>",
  "context": {
    "config": {
      "delivery": "api"
    },
    "subject": {
      "identity": {
        "firstName": "John",
        "lastNames": ["Doe"]
      }
    }
  }
}
```

| Field                | Required | Description                                     |
| -------------------- | -------- | ----------------------------------------------- |
| `identity.firstName` | Yes      | First name of the subject.                      |
| `identity.lastNames` | Yes      | Array containing the last names of the subject. |

## Sample response

The following is a sample response for a successful name match.

```json JSON theme={null}
{
  "response": {
    "advice": {
      "contains": {
        "name_matched": true
      }
    },
    "outcome": "IsNameMatch"
  }
}
```
