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

# Clear Business Match

## Clear Business Match

Clear Business Match compares a business's application data with CLEAR public-record data. It returns candidate records, field-level match scores, an overall match score, and identity indicators that you can use in an underwriting workflow. A match score is identity evidence, not a credit or risk decision.

The Workflow Builder block is **Clear Business Match** (`clear_business_match`), applies to a business entity, and runs CLEAR ID Confirm Business Search. The current API provider ID is `clear_id_confirm_business`.

## Requirements

| Application field | Requirement | Notes |
| - | - | - |
| Business legal name | Required | Only the ASCII letters, numbers, spaces, and punctuation accepted by CLEAR validation are allowed. |
| Business city | Required | Uses the city from the business address. |
| Business state | Required | This service is US-only and requires a valid uppercase US state code. |
| Business address line 1 | Optional | Additional address information can improve matching. |
| Business ZIP code | Optional | Must be valid for the business address country when present. |
| Business EIN | Optional | The cleaned value must contain 9 or 11 characters under current validation. |
| Business phone | Optional | Uses the business phone when available; otherwise, Lendflow uses the primary owner's phone when available. |
| Primary owner's first and last names | Optional | Used as the officer or agent name when available. |

Country is used to validate and normalize state and ZIP values, but it is not a separate field in the current CLEAR business request.

## API flow

1. Call [Enrich Business Credit Application](/api-reference/workflow-management/enrich-business-credit-application) with the application ID in the URL.
2. Set `provider` to `clear_id_confirm_business`.
3. Optionally include `stage_id`. When supplied, it must be the UUID of an underwriting stage in the application's workflow.
4. Do not include `options`; this service has no provider-specific API options.
5. Confirm that the response contains `data.onqueue: true`. This means the job was queued, not that CLEAR finished.
6. Poll [Get Commercial Data](/api-reference/workflow-management/get-commercial-data) with `services[]=clear_id_confirm_business`.

```json theme={"system"}
{
  "provider": "clear_id_confirm_business",
  "stage_id": "00000000-0000-4000-8000-000000000000"
}
```

| Operation | Method and route | Parameters |
| - | - | - |
| Queue the search | `PUT /api/applications/{application_id}/enrich` | Required `provider`; optional `stage_id`; no `options`. |
| Retrieve status, request, and response | `GET /api/applications/{application_id}/commercial_data` | Optional repeated `services[]` filter. |

## Data Orchestration availability and flow

CLEAR Business Match attributes are available in Data Orchestration under **Match > Clear > Business Match**.

1. Add an outcome condition that uses a CLEAR Business Match attribute.
2. Publish the Data Orchestration template and execute it for an application.
3. If no stored `clear_id_confirm_business` response exists, Data Orchestration runs the prerequisite search synchronously before evaluating the condition.
4. Data Orchestration evaluates the returned value and continues through the configured outcome.

The service has no upstream data-service dependency, but the required application fields must exist and CLEAR must be enabled. By default, an existing stored response satisfies the prerequisite and is reused instead of being fetched again.

## What the service returns

| Result area | Lendflow response path | What it means |
| - | - | - |
| Lifecycle | `data.statuses.clear.clear_id_confirm_business` | Lendflow's latest execution state or failure message. |
| Provider data | `data.commercial_data.clear.clear_id_confirm_business` | CLEAR's business search response converted from XML to JSON-compatible objects and arrays. |
| Submitted request | `data.request_data.clear.clear_id_confirm_business` | The request stored by Lendflow. It can contain sensitive business and owner data; restrict access and logging. |

## Representative response

This sanitized response is abbreviated. CLEAR may return one entity or an array of entities.

```json theme={"system"}
{
  "data": {
    "statuses": {
      "clear": {
        "clear_id_confirm_business": "Success"
      }
    },
    "commercial_data": {
      "clear": {
        "clear_id_confirm_business": {
          "Status": {
            "StatusCode": "200",
            "SubStatusCode": "200"
          },
          "EIDVBusinessSearchResults": {
            "EIDVBusinessSearchResult": {
              "CompanyEntities": {
                "CompanyEntity": {
                  "Summary": {
                    "BusinessName": {
                      "@attributes": {
                        "matchtype": "MATCH",
                        "matchscore": "100.00"
                      }
                    }
                  },
                  "TotalScore": "96.50",
                  "OfacListing": {
                    "OfacListingIndicator": "NO"
                  },
                  "SearchRecords": {
                    "SearchRecord": {
                      "BusinessName": {
                        "@text": "EXAMPLE COMPANY LLC",
                        "@attributes": {
                          "matchtype": "MATCH",
                          "matchscore": "100.00"
                        }
                      },
                      "ContentSource": "Corporate Filing"
                    }
                  },
                  "EntityIdentifier": "C2__EXAMPLE"
                }
              }
            }
          }
        }
      }
    }
  }
}
```

## Response attributes

| Attribute | Type | Meaning | Possible values or units | When returned |
| - | - | - | - | - |
| `Status.StatusCode` | String | CLEAR response status code. | HTTP-like numeric string, such as `"200"`. | With a stored CLEAR response. |
| `Status.SubStatusCode` | String | Provider substatus. | Provider-defined numeric string. | When supplied by CLEAR. |
| `CompanyEntity` | Object or array of objects | Candidate business records. | One or more entities; code must support both shapes. | When CLEAR finds candidates. |
| `Summary` | Object | Aggregate match result by submitted field. | Keys can include business name, EIN, address, phone, country, D-U-N-S number, and officer or agent names. | Per entity when CLEAR scored fields. |
| `@attributes.matchtype` | String | CLEAR's categorical comparison result. | Common values include `MATCH`, `PARTIAL MATCH`, and `NO MATCH`. | Per scored field. |
| `@attributes.matchscore` | String | Field-level identity match score. | Numeric string from `"0.00"` to `"100.00"`. | Per scored field. |
| `TotalScore` | String | Overall identity match score for the entity. | Numeric string from `"0.00"` to `"100.00"`; higher means a closer identity match. | Per entity. |
| `OfacListing.OfacListingIndicator` | String | Whether CLEAR associated the entity with an OFAC listing. | Usually `YES` or `NO`. | When supplied by CLEAR. |
| `SearchRecord` | Object or array of objects | Supporting public-record matches. | One or more records. | When candidate source records are available. |
| `@text` | String | Provider value found in a supporting record. | Field-specific text. | When CLEAR returns the underlying value. |
| `ContentSource` | String | Source category for a supporting record. | Provider-defined label. | Per search record when available. |
| `EntityIdentifier` | String | Opaque CLEAR business identifier saved for related CLEAR services. | Provider-defined string. | Per entity when available. |

### Missing values and collections

| Shape | Interpretation |
| - | - |
| Missing key or `null` wrapper | The service has not stored that part of the result, or CLEAR did not return it. |
| `[]` for an XML element | CLEAR returned an empty element. Treat it as unavailable, not as a negative match. |
| Object or array | XML-to-array conversion can represent a single entity or record as an object and repeated values as an array. |
| Numeric-looking strings | Preserve scores, record numbers, ZIP codes, EINs, and identifiers as strings. |

## Errors and statuses

| Status or message | Meaning | Action |
| - | - | - |
| `Not yet started` | No run is recorded for the service. | Queue the service or execute the workflow. |
| `Started` | The asynchronous job is running or waiting for CLEAR results. | Continue polling. CLEAR can return `204` while results are not ready. |
| `Success` | Lendflow stored the CLEAR response. | Read the provider data; `Success` does not mean the business matched. |
| `Authorization failed.` | CLEAR rejected the configured credentials. | Contact Lendflow or correct your organization's CLEAR configuration. |
| Validation message | A required field is missing or an optional value is invalid. | Correct the application data before retrying. |
| Provider message | CLEAR returned another search or retrieval error. | Follow the message when actionable; otherwise retry or contact Lendflow. |

See [Data Provider Status Messages](/api-docs/docs/error-handling-external-data-provider-status-messages) for shared status guidance.

## FAQ

<AccordionGroup>
  <Accordion title="Which provider ID should I send?">
    Send `clear_id_confirm_business`. The backend definition is named CLEAR ID Confirm Business Search, but `clear_id_confirm_business_search` is not the current executable API provider ID.
  </Accordion>

  <Accordion title="Does this service require an EIN?">
    No. Business name, city, and US state are required. EIN, street, ZIP, phone, and officer or agent names are optional.
  </Accordion>

  <Accordion title="Do I send CLEAR credentials or permissible-purpose values?">
    No. Lendflow resolves the configured CLEAR credentials and permissible-purpose settings. Send only your Lendflow bearer token with the API request.
  </Accordion>

  <Accordion title="Does data.onqueue true mean the match is complete?">
    No. It only confirms that Lendflow queued the job. Poll commercial data until the lifecycle status leaves `Started`.
  </Accordion>

  <Accordion title="Does a high TotalScore approve the business?">
    No. It means CLEAR found a closer identity match. Apply your own underwriting and compliance policy.
  </Accordion>

  <Accordion title="Why is a field an empty array?">
    CLEAR responds in XML, which Lendflow converts to a JSON-compatible shape. An empty XML element can become `[]`; treat it as unavailable data.
  </Accordion>
</AccordionGroup>
