Bulk Import Organization Structure from CSV
The Org CSV Import Screen allows a Global Administrator to upload a structured CSV file containing all organizational units across all levels. Upon upload, the system parses the file and displays a preview table showing each row mapped to its organizational type and hierarchy position. Rows with validation errors (e.g., invalid parent references, duplicate names at the same level, missing required fields) are highlighted in red with explanatory messages. The administrator can review and correct errors before confirming. On confirmation, the Org Structure Service imports all valid rows transactionally and reports a summary of imported vs skipped records.
User Story
Acceptance Criteria
- Given I am a Global Administrator on the CSV Import Screen, when I upload a CSV file with the expected column format, then a preview table renders within 3 seconds showing all rows mapped to org type and parent
- Given the CSV contains a local association row with an invalid parent region name, when the preview renders, then that row is highlighted with an error message identifying the invalid parent reference
- Given the preview shows validation errors, when I click Confirm Import without fixing them, then only the valid rows are imported and a summary confirms how many were skipped with reasons
- Given all rows in the preview are valid, when I confirm the import, then all units are created in the correct hierarchy positions and immediately appear in the organization tree
- Given I upload a CSV for an organization that already has some units, when the preview renders, then duplicate unit detection flags rows that would create conflicts with existing units
- Given the import completes, when I navigate to the organization tree, then the newly imported structure is fully navigable and expandable at all levels
Business Value
NHF alone has 1,400 local associations. Manual creation of each unit would take an estimated 70+ person-hours and introduce significant data entry errors. A validated CSV import with preview reduces onboarding time for large organizations from days to minutes and is a prerequisite for platform adoption by NHF.
Components
- Org CSV Import Screen ui
- Org Structure Service service
- Org Structure Repository data
- Org Structure RLS Policy infrastructure