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

# Enigma

## Enigma

Enigma matches application data to business profiles in Enigma's database. It returns one or more candidates with match decisions, confidence scores, matched input values, identifiers, and available firmographic data. Match confidence is entity-resolution evidence, not a credit or risk score.

The Workflow Builder block is **Enigma** (`enigma_business_match`), applies to a business entity, and runs `enigma_match`.

## Requirements

| Application field | Requirement | Notes |
| - | - | - |
| Business legal name | Required | Must be present. |
| Primary business contact or owner's first name | Required | Uses the primary business contact or owner associated with the application. |
| Primary business contact or owner's last name | Required | Uses the primary business contact or owner associated with the application. |
| Business address line 1 | Optional | Additional address information can improve matching. |
| Business address line 2 | Optional | Additional address information can improve matching. |
| Business city | Optional | Additional address information can improve matching. |
| Business state | Optional | Must be valid when present. |
| Business ZIP code | Optional | Must be valid when present. |

The current request does not send country, EIN, or website. Enigma can report that at least two entities are required, but Lendflow's current validation always requires both the business name and associated person's full name before sending the 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 `enigma_match`.
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`; Enigma Match has no provider-specific API options.
5. Confirm that the response contains `data.onqueue: true`. This means the job was queued, not that Enigma finished.
6. Poll [Get Commercial Data](/api-reference/workflow-management/get-commercial-data) with `services[]=enigma_match`.

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

| Operation | Method and route | Parameters |
| - | - | - |
| Queue Match | `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. |

### Workflow Builder

1. Add **Enigma** from the **Match** group to a business entity in the underwriting stage.
2. Publish the workflow.
3. When the application reaches the block, Lendflow queues `enigma_match`.
4. Wait for the lifecycle status to leave `Started`.

The block has no provider-specific configuration fields. Match has no upstream service dependency. On a successful match, Lendflow saves the `enigma_id` from the highest-confidence candidate for which `is_matched` is `true`; Enigma Lookup can use that saved ID in a separate flow.

## Data Orchestration availability and flow

`enigma_match` is not currently available as a Data Orchestration condition attribute or prerequisite service. Use the **Enigma** Workflow Builder block or the application enrichment API. Do not configure a Data Orchestration template that expects an Enigma Match attribute.

## What the service returns

| Result area | Lendflow response path | What it means |
| - | - | - |
| Lifecycle | `data.statuses.enigma.business_match` | Lendflow's latest execution state or failure message. |
| Provider data | `data.commercial_data.enigma.business_match` | Enigma's candidate list stored without a Lendflow field-level transformation. |
| Submitted request | `data.request_data.enigma.business_match` | The name, person, and address data sent to Enigma. |

## Representative response

This sanitized response is abbreviated. Returned firmographic fields depend on Enigma's data and your organization's entitlements.

```json theme={"system"}
{
  "data": {
    "statuses": {
      "enigma": {
        "business_match": "Success"
      }
    },
    "commercial_data": {
      "enigma": {
        "business_match": {
          "businesses": [
            {
              "is_matched": true,
              "match_confidence": 0.85,
              "matched_fields": {
                "name": "EXAMPLE COMPANY",
                "person": "JANE DOE"
              },
              "enigma_id": "E000example",
              "business_enigma_id": "B000example",
              "aliases": ["EXAMPLE COMPANY INC"],
              "addresses": [
                {
                  "street_address1": "100 EXAMPLE AVE",
                  "street_address2": null,
                  "city": "NEW YORK",
                  "state": "NY",
                  "postal_code": "10001"
                }
              ],
              "data_sources": ["Corporate Registrations"],
              "websites": ["https://example.com/"]
            }
          ]
        }
      }
    },
    "request_data": {
      "enigma": {
        "business_match": {
          "name": "EXAMPLE COMPANY",
          "person": {
            "first_name": "JANE",
            "last_name": "DOE"
          }
        }
      }
    }
  }
}
```

## Response attributes

| Attribute | Type | Meaning | Possible values or units | When returned |
| - | - | - | - | - |
| `businesses` | Array of objects | Candidate business profiles returned by Enigma. | Zero or more candidates. | With a stored provider response. |
| `is_matched` | Boolean | Enigma's determination that the candidate met its matching criteria. | `true` or `false`. Lendflow only considers `true` candidates when saving an ID. | Per candidate. |
| `match_confidence` | Number | Enigma's entity-match confidence. | `0` to `1`; `1` is the strongest confidence. | Per candidate. |
| `matched_fields` | Object | Provider values that best matched submitted inputs. | Can contain `name`, `person`, `address`, or `website`; only returned fields are present. | Per candidate when available. |
| `enigma_id` | String | Opaque profile identifier. | Provider-defined string; do not parse its prefix. | Per candidate. |
| `business_enigma_id` | String | Related business-level Enigma identifier. | Provider-defined string. | When Enigma supplies it. |
| `aliases` | Array of strings | Other names associated with the profile. | Zero or more names. | When available. |
| `addresses` | Array of objects | Addresses associated with the profile. | Zero or more addresses. | When available. |
| `street_address1` | String | Primary street line. | Text. | Per address when available. |
| `street_address2` | String or null | Suite, floor, or other secondary line. | Text, empty string, `null`, or absent. | Per address. |
| `city` | String | Address city. | Text. | Per address when available. |
| `state` | String | Address state. | Usually a two-letter US code in current fixtures. | Per address when available. |
| `postal_code` | String | Address postal code. | Preserve leading zeros. | Per address when available. |
| `data_sources` | Array of strings | Source categories supporting the profile. | Provider-defined labels. | When available. |
| `websites` | Array of strings | Websites associated with the profile. | Zero or more URL strings. | When available. |

### Other candidate fields and missing values

| Attribute or shape | Interpretation |
| - | - |
| `ein` | Array of strings. It can be empty; treat values as sensitive strings. |
| `names` | Array of objects with a `name` string when returned. |
| `phone_numbers` | Array of provider-formatted strings; it can be empty. |
| `associated_people` | Array of objects that can contain `name` and `titles`. |
| `registered_agents` | Array of names; it can be empty. |
| `registrations` | Array of objects. Current fixtures contain `state`, `issue_date` in `YYYY-MM-DD` format, and string `file_number`. |
| `corporate_structure` | Provider-normalized string, such as `CORPORATION`. |
| `year_incorporated` | Four-digit `YYYY` string, not a full date. |
| Missing, `null`, or empty array | The provider did not supply usable data for that field. Do not interpret absence as a negative finding. |

## Errors and statuses

| Status or message | Meaning | Action |
| - | - | - |
| `Not yet started` | No run is recorded for `enigma_match`. | Queue the service or run the Workflow Builder block. |
| `Started` | The asynchronous job is running. | Continue polling. |
| `Success` | Lendflow stored Enigma's candidate response and saved the selected ID. | Read the candidate data; `Success` is not a credit or risk decision. |
| `No Business found` | No candidate had `is_matched: true`; Lendflow did not select an Enigma ID. | Verify the required name and person fields plus any address data, then rerun. |
| `Bad Request: At least 2 entities must be provided.` | Enigma rejected a request with insufficient matching entities. | Ensure the required business name and associated person's full name are present. |
| Validation message | A required input is missing, state or ZIP is invalid, the service is not enabled, or `stage_id` is invalid. | Correct the application or request before retrying. |
| Provider error text | Enigma returned a non-success response. Lendflow records Enigma's `error` or `Message` when available. | 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="Is this a Dun & Bradstreet service?">
    No. The **Enigma** block runs Enigma Match through Enigma's API. Dun & Bradstreet is a separate provider.
  </Accordion>

  <Accordion title="Do I need my own Enigma API key?">
    No. Lendflow supplies the Enigma API key. Your organization must have `enigma_match` enabled, and direct Lendflow API calls require your normal bearer token.
  </Accordion>

  <Accordion title="Can I use Enigma Match in Data Orchestration?">
    No. Enigma Match is not currently exposed as a Data Orchestration attribute. Use the Workflow Builder block or application enrichment API.
  </Accordion>

  <Accordion title="Are address, EIN, country, or website required?">
    Address fields are optional. The current request does not send EIN, country, or website. Business legal name and the associated person's first and last names are required.
  </Accordion>

  <Accordion title="How does Lendflow choose among multiple candidates?">
    Lendflow filters to candidates where `is_matched` is `true`, then saves the `enigma_id` from the candidate with the highest `match_confidence`.
  </Accordion>

  <Accordion title="Does Success mean Enigma approved the business?">
    No. It means Lendflow stored Enigma's response and selected a matched identifier. Apply your own underwriting and compliance policy.
  </Accordion>
</AccordionGroup>
