--- title: "Configure metadata and identity" slug: "build-ai-ready-systems-business-entities-configure-metadata-identity" description: "Configure metadata and identity. Configure manifest sections matching the dataplane UI tabs. Integrators set auth, vocabulary, sync, and policies before cert..." tags: ["Integration", "Developer", "Integrator"] updated: 2026-11-30T18:59:00Z published: 2026-11-17T07:08:17Z canonical: "docs.aifabrix.ai/build-ai-ready-systems-business-entities-configure-metadata-identity" --- > ## Documentation Index > Fetch the complete documentation index at: https://docs.aifabrix.ai/llms.txt > Use this file to discover all available pages before exploring further. # Configure metadata and identity Define **`metadataSchema`**, **`primaryKey`**, and **`labelKey`** so each Business Entity has stable join identity and operator-readable labels. ## Prerequisites - Entity basics chosen — `entityType`, `resourceType` from [Entity basics, types, and resource](/docs/build-ai-ready-systems-business-entities-entity-basics-types-resource) - Vendor sample payload or OpenAPI schema for property names - [Configure business vocabulary](/docs/build-ai-ready-systems-business-entities-configure-business-vocabulary) planned or in progress ## Where it lives | Layer | Location | | --- | --- | | Schema | **`metadataSchema.properties`** — indexed fields for search/ABAC | | Identity | **`primaryKey[]`**, required **`externalId`** property | | Display | **`labelKey[]`** — human title fields | | UI | Business Entity **Overview** / vocabulary tabs | Manifest keys: **`metadataSchema`**, **`primaryKey`**, **`labelKey`**. ## Builder MCP | | | | --- | --- | | **Manifest keys** | `metadataSchema`, `primaryKey`, `labelKey` | | **Help topics** | `section`, `goldenExample`, `dependencyGraph` | | **Repair hooks** | `fieldMappings` | Changing identity bands triggers downstream exposure and RBAC — read **`dependencyGraph`** before patch. Example fixture: help topic **`goldenExample`** (CRM company pattern). ## How to set 1. **Repair field mappings first** when importing from a fixture: ``` aifabrix repair --dry-run aifabrix repair --expose ``` 1. **Require indexed `externalId`** on record and document storage entities: ``` { "key": "example-customers", "entityType": "recordStorage", "resourceType": "customer", "primaryKey": ["externalId"], "labelKey": ["name"], "metadataSchema": { "type": "object", "properties": { "externalId": { "type": "string", "index": true }, "name": { "type": "string", "index": true, "filter": true } } } } ``` 1. **Project vendor fields** via [Configure business vocabulary](/docs/build-ai-ready-systems-business-entities-configure-business-vocabulary) — schema and mappings must agree on every indexed property. 2. **Set `labelKey`** to operator-readable fields already mapped in **`fieldMappings.attributes`**. 3. **Validate entity file**: ``` aifabrix datasource validate aifabrix validate ``` ## Defaults and examples | Element | Purpose | Example | | --- | --- | --- | | **`externalId`** | Cross-entity join key | Indexed string in metadataSchema | | **`primaryKey`** | Storage identity | `["externalId"]` for most record types | | **`labelKey`** | UI and list display | `["name"]` or `["title"]` | | **`index: true`** | Search and ABAC | On decision-relevant fields only | Example metadata band with filter flags: ``` { "metadataSchema": { "type": "object", "properties": { "externalId": { "type": "string", "index": true }, "name": { "type": "string", "index": true, "filter": true }, "ownerId": { "type": "string", "index": true, "filter": true }, "country": { "type": "string", "index": true } } }, "primaryKey": ["externalId"], "labelKey": ["name"] } ``` Illustrative identity goals: - vendor `id` → normalized **`externalId`** (always indexed) - display name → **`labelKey`** source (searchable when agents need it) - governance dimensions → indexed fields referenced in top-level **`dimensions`** ## Validate ``` aifabrix datasource validate aifabrix validate aifabrix test-integration ``` System gate: missing **`externalId`** fails schema validation before upload. Empty search during integration tests often traces to incomplete **`metadataSchema.properties`** — not credential errors. Re-run **`datasource validate`** after every identity band edit; the compiler cross-checks **`primaryKey`**, **`labelKey`**, and indexed **`externalId`** on each pass. ## Common mistakes | Mistake | Fix | | --- | --- | | Composite PK as cross-entity join key | Use **`externalId`** for joins | | Schema properties without field mappings | Repair **`fieldMappings`** | | `labelKey` pointing at unmapped field | Map attribute first | | All vendor fields indexed | Index decision-relevant fields only | ## Limits Identity bands are vendor-specific in **mapping expressions** — this page shows required shape, not every JSONPath dialect. Document storage entities may add file-specific properties while keeping **`externalId`** as the join key. After identity edits, re-run **`repair --expose`** when exposure schema lists derived from metadata change. Keep **`labelKey`** fields stable across releases — operator bookmarks and audit trails reference display labels tied to identity configuration. ## Related - [Configure business vocabulary](/build-ai-ready-systems-business-entities-configure-business-vocabulary.md)