# Brink mapping for `curated.inventory_items`

## Main staging sources

- `staging.brink_settings2_items`

## Mapping groups

- Business property mappings describe how Brink item content is mapped or could be mapped into curated business fields.
- Technical and ETL property mappings describe lineage, source reconciliation, tenant scoping, and ingestion metadata.

## Business property mappings

| Curated Column | Brink Staging Table | Brink Property Path | Current mapping | Status | Notes |
|---|---|---|---|---|---|
| `inventory_id` | `N/A` | `N/A` | `NULL` | `Not mapped` | Brink staging does not expose an inventory master or stock item ID. |
| `sku` | `staging.brink_settings2_items` | `plu` | `NULL` | `Not mapped` | `skus` can be used as a fallback alternate identifier. |
| `item_name` | `staging.brink_settings2_items` | `name` | `NULL` | `Not mapped` | Best match for the inventory item name. |
| `pos_item_id` | `staging.brink_settings2_items` | `item_id` | `NULL` | `Not mapped` | Direct POS item identifier. |
| `category_name` | `staging.brink_settings_get_item_groups` | `name` | `NULL` | `Not mapped` | Resolve category name by joining `staging.brink_settings2_items` to `staging.brink_settings2_item_groups` on `item_id` and then to `staging.brink_settings_get_item_groups` on `item_group_id`. |
| `unit_of_measure` | `staging.brink_settings2_items` | `unit_name` | `NULL` | `Not mapped` | Best available unit label. |
| `cost_per_unit` | `staging.brink_settings2_items` | `cost` | `NULL` | `Not mapped` | Direct item cost. |
| `quantity_on_hand` | `N/A` | `N/A` | `NULL` | `Not mapped` | Brink staging does not expose stock-on-hand quantities. |
| `par_level` | `N/A` | `N/A` | `NULL` | `Not mapped` | Brink staging does not expose par levels. |
| `reorder_point` | `N/A` | `N/A` | `NULL` | `Not mapped` | Brink staging does not expose reorder points. |
| `vendor_name` | `N/A` | `N/A` | `NULL` | `Not mapped` | Brink staging does not expose vendor data. |
| `last_updated` | `N/A` | `N/A` | `NULL` | `Not mapped` | No inventory update timestamp is documented. |
| `store_id` | `N/A` | `N/A` | `NULL` | `Not mapped` | No store identifier is documented on the item snapshot. |
| `store_name` | `N/A` | `N/A` | `NULL` | `Not mapped` | No store name is documented on the item snapshot. |
| `vendor_id` | `N/A` | `N/A` | `NULL` | `Not mapped` | Brink staging does not expose vendor IDs. |
| `item_status` | `staging.brink_settings2_items` | `is_active` | `NULL` | `Not mapped` | Requires a transform from boolean active flag to a status label. |
| `last_counted_at_utc` | `N/A` | `N/A` | `NULL` | `Not mapped` | Brink staging does not expose count timestamps. |
| `updated_at_utc` | `N/A` | `N/A` | `NULL` | `Not mapped` | No item-update timestamp is documented. |
| `currency_code` | `N/A` | `N/A` | `NULL` | `Not mapped` | Currency is not documented in the Brink item snapshot. |
| `snapshot_at_utc` | `N/A` | `N/A` | `NULL` | `Not mapped` | Warehouse snapshot metadata, not a Brink API field. |

## Technical and ETL property mappings

| Curated Column | Brink Staging Table | Brink Property Path | Current mapping | Status | Notes |
|---|---|---|---|---|---|
| `inventory_item_key` | `N/A` | `N/A` | `NULL` | `Not mapped` | Warehouse-generated key. |
| `source_system` | `N/A` | `N/A` | `constant 'brink_pos'` | `Derived constant` | Warehouse constant, not a Brink API field. |
| `source_inventory_item_id` | `N/A` | `N/A` | `NULL` | `Not mapped` | Brink does not expose a separate inventory-item source ID. |
| `tenant_key` | `N/A` | `N/A` | `NULL` | `Not mapped` | Warehouse-generated tenant key. |
| `tenant_name` | `N/A` | `N/A` | `parameter @tenant_id` | `ETL context` | Tenant metadata is outside the documented Brink staging payloads. |
| `_etl_batch_id` | staging.brink_settings2_items | _etl_batch_id | `_etl_batch_id` | `Mapped` | ETL metadata propagated from staging. |
| `_etl_source_type` | staging.brink_settings2_items | _etl_source_type | `_etl_source_type` | `Mapped` | ETL metadata propagated from staging. |
| `_etl_ingested_at` | staging.brink_settings2_items | _etl_ingested_at_utc | `_etl_ingested_at_utc AS _etl_ingested_at` | `Mapped` | ETL metadata propagated from staging. |

## Portal and sample validation

| Curated field | Additional validated source | How to use it |
|---|---|---|
| `category_name` | `Settings.GetItemGroups -> ItemGroup.Name` | Join `Settings2.GetItems.Items[].ItemGroups[]` to `GetItemGroups.ItemGroup.Id`. This lookup is now documented in the local Brink staging model. |
| `item_name` | `temp/GetItems_WhenConfigured_CallsRealBrinkEndpoint.xml -> Items[].Name` | Confirms the item master response carries the readable item name in sample payloads. |
| `cost_per_unit` | `temp/GetItems_WhenConfigured_CallsRealBrinkEndpoint.xml -> Items[].Cost` | Confirms `Cost` is present in sample payloads, not only in the WSDL. |
