> ## 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 KYB

## Clear KYB

Use the **Clear KYB** Workflow Builder block (`clear_kyb`) to evaluate a business with Thomson Reuters CLEAR Risk Inform. The block is available for business entities and exposes two related operations:

| Operation | Purpose | Dependency |
| - | - | - |
| `clear_risk_inform_business_search` | Returns the matched business, configured risk sections, flags, source references, and section and total scores. | Requires a CLEAR business entity ID. Lendflow runs CLEAR ID Confirm Business automatically when that ID is not already stored. |
| `clear_risk_inform_business_report` | Returns a detailed report with the score, summary, business records, and source-document sections configured for the account. | Requires the search result's `GroupId`. Lendflow runs the Risk Inform Business Search first when that ID is not already stored. |

The report is downstream of the search:

1. Lendflow obtains a CLEAR business entity ID through CLEAR ID Confirm Business when necessary.
2. Lendflow runs `clear_risk_inform_business_search` and stores its `GroupId`.
3. Lendflow submits `clear_risk_inform_business_report` with that `GroupId`.
4. CLEAR produces the report asynchronously. Lendflow retries while the report is not ready and resumes a paused Data Orchestration run after the report finishes.

<Note>
  Risk Inform definitions, flags, point values, minimum thresholds, permissible-purpose values, and included source sections are configured for the CLEAR account. They are not universal Lendflow values. Thomson Reuters describes Risk Inform as customizable public-record risk assessment and states that CLEAR data is not a consumer report under the FCRA. Use the service only for purposes permitted by your agreement and applicable law.
</Note>

## Requirements

### Risk Inform Business Search

| Application field | Requirement | Notes |
| - | - | - |
| CLEAR business entity ID | Conditional | Required for the search. If it is unavailable, Lendflow runs CLEAR ID Confirm Business first. |
| Business legal name | Conditional | Required when CLEAR ID Confirm Business must run. |
| Business city | Conditional | Required when CLEAR ID Confirm Business must run. |
| Business state or region | Conditional | Required when CLEAR ID Confirm Business must run; use a value valid for the stored country, such as a two-letter US state code. |
| Business country | Conditional | Required when CLEAR ID Confirm Business must run so state and postal-code validation can be applied. |
| Business street address | Optional | Improves address matching. |
| Business ZIP or postal code | Optional | Must pass country-aware validation when provided. |
| EIN/FEIN | Optional | Accepts 9- or 11-character values after formatting; improves business matching. |
| Business telephone | Optional | Must be valid when provided; the primary owner's telephone is used when the business has none. |
| Primary owner's first and last names | Optional | Improves officer or agent matching. |

### Risk Inform Business Report

| Application field | Requirement | Notes |
| - | - | - |
| CLEAR Group ID | Conditional | Required for the report. If it is unavailable, Lendflow runs Risk Inform Business Search first. |

## Run through Data Orchestration

Clear KYB is available in Workflow Builder under the underwriting KYB block group. Data Orchestration runs the operation configured in the template and automatically runs its required prerequisites.

1. In the Lendflow Dashboard, open **Builders > Data Orchestration**.
2. Create or edit a template and add the applicable Clear KYB operation from the **KYB** category.
3. Configure the conditions, connect each outcome, then save and publish the template.
4. Run the template with [Execute Data Orchestration](/api-reference/data-orchestration/execute-data-orchestration) at `POST /api/applications/{application_id}/data_orchestration/execute`. Supply `template_id` and `application_id`; supply `stage_id` only when targeting a specific compatible underwriting stage.
5. Treat the successful execution response as confirmation that the orchestration was scheduled, not that CLEAR has completed.
6. Retrieve operation status and data with [Get Commercial Data](/api-reference/workflow-management/get-commercial-data). Filter to the two service names.

```http theme={"system"}
GET /api/applications/{application_id}/commercial_data?services[]=clear_risk_inform_business_search&services[]=clear_risk_inform_business_report
Authorization: Bearer {token}
```

The public response paths are:

* Search: `data.commercial_data.clear.clear_risk_inform_business_search.RiskInformBusinessSearchResult`
* Report: `data.commercial_data.clear.clear_risk_inform_business_report.SectionResults`
* Latest statuses: `data.statuses.clear.clear_risk_inform_business_search` and `data.statuses.clear.clear_risk_inform_business_report`
* Latest dates: `data.dates.clear_risk_inform_business_search` and `data.dates.clear_risk_inform_business_report`
* Stored requests: `data.request_data.clear.clear_risk_inform_business_search` and `data.request_data.clear.clear_risk_inform_business_report`

An operation's `commercial_data` value is `null` until Lendflow stores a provider response. It can also remain `null` when CLEAR returns no result body.

## What the service returns

| Result area | Operation | Meaning |
| - | - | - |
| Provider status | Both | CLEAR's status for that provider request. This is separate from Lendflow's orchestration and enrichment status. |
| Business match and score | Search | The selected business entity, result-group identifier, configured section summaries, detailed flags, and aggregate score. |
| Detailed report | Report | A list of independently identified report sections. Typical fixtures include user terms, score, summary, business overview, detailed risk sections, source records, association data, and empty optional sections. |
| Source references | Both | Provider source names and document GUIDs supporting a flag or report record. A field may be one object or an array when multiple records support the result. |
| Lendflow execution metadata | Commercial-data wrapper | Latest status or error message, latest service date, and stored request. |

The exact flags and report sections depend on the CLEAR definition and available public records. Objects may be absent, empty arrays, or arrays of records. Code that consumes the response should not assume that every fixture section is present or that a single record will always remain a single object.

<Note>
  The public Thomson Reuters developer pages describe CLEAR S2S, Risk Inform customization, and usage restrictions, but do not publish the complete Risk Inform Business field contract or all possible status values. The response paths and field shapes below are therefore limited to Lendflow's implemented parser, typed frontend models, and tested CLEAR fixtures. Treat additional provider fields as definition-dependent.
</Note>

## Sample response

This sanitized shape combines representative fields from Lendflow's CLEAR fixtures. Unrelated services are omitted.

```json theme={"system"}
{
  "data": {
    "statuses": {
      "clear": {
        "clear_risk_inform_business_search": "Success",
        "clear_risk_inform_business_report": "Success"
      }
    },
    "dates": {
      "clear_risk_inform_business_search": "2026-09-10T16:00:02Z",
      "clear_risk_inform_business_report": "2026-09-10T16:00:08Z"
    },
    "commercial_data": {
      "clear": {
        "clear_risk_inform_business_search": {
          "Status": {
            "StatusCode": "200",
            "SubStatusCode": "200"
          },
          "RiskInformBusinessSearchResult": {
            "BusinessEntity": {
              "Header": {
                "AllFlags": {
                  "@attributes": {
                    "sectioncount": "5",
                    "sectionscore": "18.00"
                  }
                }
              },
              "GroupId": "sanitized-result-group-id",
              "EntityId": "sanitized-business-entity-id",
              "Sections": {
                "Section": [
                  {
                    "SectionName": "Single Risk Indicators",
                    "SectionScore": "5.00",
                    "SectionDetails": {
                      "SingleRiskIndicators": {
                        "BusinessLessThanOneYear": {
                          "RiskFlagName": "Business Started Less Than One Year Ago",
                          "RiskFlagScore": "5.00",
                          "RiskFlagHitIndicator": "Yes"
                        }
                      }
                    }
                  }
                ]
              },
              "TotalScore": "18.00"
            }
          }
        },
        "clear_risk_inform_business_report": {
          "Status": {
            "Reference": "S2S Risk Inform Business Report",
            "StatusCode": "200",
            "SubStatusCode": "200"
          },
          "ReportId": "sanitized-report-id",
          "SectionResults": [
            {
              "SectionName": "RiskInformScore",
              "SectionStatus": "COMPLETE",
              "SectionRecordCount": "1",
              "CLEARReportDescription": "Risk Inform Score",
              "SectionDetails": {
                "RiskInformScore": {
                  "RiskInformScoreRecord": {
                    "BusinessName": "EXAMPLE BUSINESS LLC",
                    "TotalScore": "18.00",
                    "MinThresholdScore": "70"
                  }
                }
              }
            }
          ]
        }
      }
    },
    "request_data": {
      "clear": {
        "clear_risk_inform_business_search": {},
        "clear_risk_inform_business_report": {}
      }
    }
  }
}
```

## Response attributes

### Lendflow commercial-data wrapper

| Attribute | Type | Meaning | Possible values or units | When returned |
| - | - | - | - | - |
| `data` | Object | Top-level Lendflow API response wrapper. | One response object. | Always for a successful commercial-data request. |
| `data.statuses.clear` | Object | Latest Lendflow state or error for each requested Clear KYB operation. | Keys include the exact search and report service IDs. | When the related service is included. |
| `data.dates` | Object | Latest service date keyed by exact service ID. | API timestamp or `null`. | When available. |
| `data.commercial_data.clear` | Object | Latest stored CLEAR responses converted from XML to JSON. | Search and report objects can be `null`. | When the related service is included. |
| `data.request_data.clear` | Object | Stored CLEAR requests keyed by exact service ID. | Request objects can be `null`. | When the related service is included. |

### Provider response and search result

| Attribute | Type | Meaning | Possible values or units | When returned |
| - | - | - | - | - |
| `Status` | Object | CLEAR's provider-level response status. | Contains string status codes; the report can also include `Reference`. | When CLEAR returns a status body. |
| `Status.Reference` | String | Provider description of the request or report. | For example, `"S2S Risk Inform Business Report"`. | When supplied by CLEAR, including in the report fixture. |
| `Status.StatusCode` | String | Primary CLEAR response code. | For example, `"200"` in successful fixtures. | When supplied by CLEAR. |
| `Status.SubStatusCode` | String | More specific CLEAR response code. | Provider-defined string; `"200"` in successful fixtures. | When supplied by CLEAR. |
| `RiskInformBusinessSearchResult` | Object | Root search result. | Provider-defined object. | When the search finds and returns a result. |
| `BusinessEntity` | Object | Matched business and its risk assessment. | One business object in current Lendflow fixtures. | Inside a successful search result. |
| `Header` | Object | Section-level count and score summaries keyed by configured section name. | Common fixture keys include `AllFlags`, `AddressFlags`, `SingleRiskIndicators`, `CompanyDetailsStructure`, `PrincipalsExecutivesTiedToBusiness`, `Custom`, and `News`. | Keys vary by CLEAR definition and returned content. |
| `Header.AllFlags` | Object | Aggregate summary for all returned configured flags. | Contains XML attributes converted to the `@attributes` object. | When the active definition includes this summary. |
| `@attributes.sectioncount` | String | Count reported for the section. | Decimal integer encoded as a string. | When a header section is returned. |
| `@attributes.sectionscore` | String | Provider-configured points accumulated for the section. | Signed decimal points encoded as a string. No universal range is published. | When a header section is returned. |
| `GroupId` | String | Identifies the result group used to request the detailed report. | Opaque provider identifier. | When CLEAR returns a business search result. |
| `EntityId` | String | Identifies the matched CLEAR business entity. | Opaque provider identifier. | When CLEAR returns a business search result. |
| `Sections.Section` | Array | Search sections and their returned flags or content. | Zero or more provider-defined section objects. | When the definition returns section content. |
| `SectionName` | String | Provider section name. | Definition-dependent string. | For each returned section. |
| `SectionScore` | String | Provider-configured points for that section. | Signed decimal points encoded as a string. | For scored search sections. |
| `SectionDetails` | Object or array | Flags, supporting details, news, or source-specific content. | Shape varies by `SectionName`; it can be empty. | When section details are available. |
| `SectionDetails.SingleRiskIndicators` | Object | Flags in the Single Risk Indicators section, keyed by provider flag identifier. | Definition-dependent flag objects. | When that section returns flags. |
| `BusinessLessThanOneYear` | Object | Representative provider flag object indicating the returned business-age condition. | Contains the shown flag name, score, and hit indicator. | Only when CLEAR returns this configured flag. |
| `RiskFlagName` | String | Human-readable provider flag name. | Definition-dependent string. | For a returned flag. |
| `RiskFlagScore` | String | Points assigned to that flag by the configured definition. | Signed decimal points encoded as a string; fixtures include positive, zero, and negative values. | For a scored flag; it can be omitted from informational flags. |
| `RiskFlagHitIndicator` | String | Indicates whether the returned flag condition hit. | `"Yes"` in representative fixtures; other values are provider-defined. | When CLEAR supplies an indicator. |
| `TotalScore` | String | Aggregate provider score for the returned Risk Inform definition. | Signed decimal points encoded as a string. It is not a probability or percentage. | When the search returns a scored business entity. |

### Detailed report

| Attribute | Type | Meaning | Possible values or units | When returned |
| - | - | - | - | - |
| `ReportId` | String | Identifies the generated CLEAR report. | Opaque provider identifier. | When the report is generated. |
| `SectionResults` | Array | Detailed report sections. | Zero or more section objects. | When report data is returned. |
| `SectionStatus` | String | CLEAR's completion status for an individual report section. | `"COMPLETE"` in Lendflow fixtures; other values are provider-defined. | For each returned report section. |
| `SectionRecordCount` | String | Number of records represented by the section. | Decimal integer encoded as a string. | For each returned report section. |
| `CLEARReportDescription` | String | Human-readable section label. | For example, `"Risk Inform Score"`. | For each returned report section. |
| `SectionDetails` | Object or array | Section-specific report records. | May be a populated object or an empty array. | For each returned report section. |
| `SectionDetails.RiskInformScore` | Object | Container for the report's risk score record. | Contains `RiskInformScoreRecord`. | In the Risk Inform Score section. |
| `RiskInformScoreRecord` | Object | Scored business summary for the active CLEAR definition. | Contains the shown business name, total score, and optional configured threshold. | In a populated Risk Inform Score section. |
| `BusinessName` | String | Name associated with the score record. | Provider-returned business name. | In a populated `RiskInformScore` record. |
| `MinThresholdScore` | String | Threshold configured in the CLEAR Risk Inform definition. | Provider-configured points encoded as a string. No universal threshold applies. | When included in the score record. |
| `TotalScore` | String | Aggregate score copied into the report's score record. | Signed decimal points encoded as a string. | In a populated `RiskInformScore` record. |

## Errors and statuses

Keep provider results separate from Lendflow processing:

| Layer | Signal | Meaning |
| - | - | - |
| Lendflow API | `401` or `403` HTTP response | The bearer token is missing or invalid, or the caller cannot access the application or template. |
| Lendflow API | `422` HTTP response | Required execution fields are invalid or the selected published template and application are incompatible. |
| Data Orchestration | Scheduled or started log | The workflow has been accepted or is processing; CLEAR data is not necessarily ready. |
| Data Orchestration | Paused log | An asynchronous prerequisite such as the detailed report is still being fetched. Lendflow resumes automatically when it completes. |
| Data Orchestration | Missing-data terminal state | Required application data or another obtainable prerequisite was not available. |
| Data Orchestration | Error terminal state | A service, authentication, provider, or unexpected processing error stopped the workflow. |
| Commercial-data status | `Started` | The individual operation is in progress. |
| Commercial-data status | `Success` | The Lendflow operation finished. Inspect the provider `Status` and expected result object before treating it as a usable provider match. |
| Commercial-data status | Error message | The Lendflow operation failed. Correct the reported issue before rerunning. |
| CLEAR response | `Status.StatusCode` and `SubStatusCode` | Provider-level request result. These codes do not represent the Data Orchestration outcome. |
| CLEAR result | Missing result object or empty section | CLEAR returned no usable match or no content for that configured section. Do not interpret an empty section as a zero-risk determination. |

Common integration failures include missing business name, city, or state; invalid state, postal-code, telephone, or EIN formats; unavailable CLEAR service access; rejected CLEAR credentials; and provider validation errors. The detailed report cannot run without a usable search `GroupId`, but Lendflow attempts the prerequisite search automatically.

## FAQ

<AccordionGroup>
  <Accordion title="Does the Clear KYB block always run both operations?">
    No. The block exposes both operations. A template can run Search without Report, while Report automatically runs its Search prerequisite when a usable `GroupId` is not already stored.
  </Accordion>

  <Accordion title="Do I need to run CLEAR ID Confirm Business first?">
    No. When the application does not already have a CLEAR business entity ID, Lendflow runs CLEAR ID Confirm Business before the Risk Inform Business Search. Supply complete business information so that automatic lookup can match the intended business.
  </Accordion>

  <Accordion title="Can I request the report without running the search?">
    You can request the report operation, but the report still depends on a search result group. If Lendflow has no stored `GroupId`, it runs the search first. If that search does not produce a usable group ID, the report has no result to retrieve.
  </Accordion>

  <Accordion title="Is TotalScore a percentage or a universal risk grade?">
    No. It is a provider-configured point total for the CLEAR Risk Inform definition used by the account. Flag weights can be positive, zero, or negative, and the threshold is also configurable. Interpret the score using your approved CLEAR definition.
  </Accordion>

  <Accordion title="Why are fields or report sections missing?">
    CLEAR returns content based on the account definition and available source records. A section can be absent, an empty array, or a populated object; supporting records can also switch between one object and an array. Handle all of these shapes.
  </Accordion>

  <Accordion title="Does a successful execution response mean the report is ready?">
    No. It means Lendflow scheduled the Data Orchestration run. The report is asynchronous. Use the commercial-data endpoint and orchestration log to confirm completion before reading `SectionResults`.
  </Accordion>

  <Accordion title="Can I download a PDF report?">
    The dashboard shows a PDF download only when Lendflow has successfully stored the separately generated CLEAR report PDF. The public enrichment response returns the JSON-converted provider data, not the PDF file.
  </Accordion>
</AccordionGroup>
