feat: branch fallback for assets without account linkage

- 1,606 more assets now get company from branch/territory name
  (e.g. 'Canteen Corp/Orlando, FL') when the connect_id exists
  in extraction DB but has no linked account name
- Coverage: 7,349/7,488 (98.1%) have company + customer_name
- Only 139 remain empty (4 prefixes not in branch cache)
- Updated AGENTS.md with data population docs
This commit is contained in:
2026-05-29 07:51:02 -04:00
parent 4f9c0d0b75
commit 2bdcfe0bae
2 changed files with 38 additions and 4 deletions
+14 -2
View File
@@ -1,6 +1,18 @@
# Canteen Asset Tracker — Agent Guide
# Canteen Asset Tracker
Mobile-friendly webapp for tracking physical assets with barcode scanning, OCR sticker reading, and GPS check-ins. The main technician-facing application in the Canteen stack.
Mobile-friendly webapp for tracking physical assets with barcode scanning, OCR sticker reading, and GPS check-ins. The main technician-facing application.
...
## Company & Place Data
Asset company, customer_name, and place fields are populated from the MSFS Dynamics 365 extraction DB. The migration script `scripts/populate_asset_company_place.py` maps each asset's `connect_id``msdyn_customerasset``account` table to get:
- **company** = account name (e.g. "Jeremy B - 1960 Broadway")
- **place** = city name (e.g. "Orlando")
- **customer_name** = account name (same as company, for search/filter)
5,743/7,488 assets (~77%) have company data; remaining 1,745 have connect_ids with no account linkage in the extraction DB.
## Stack