W029: Bulk-import vendors
Creates many vendors at once from an uploaded CSV or Excel file. Triggered from the Data page, Vendors import. Atomic.
Steps
-
Parse the upload. Collect parse errors into a list.
-
Abort on parse failures. Raise a
ValidationErrorlisting the failed rows. -
Create each vendor inside one transaction. For each parsed row, run W024 steps 1 to 2.
-
Commit. Any single-row failure rolls the whole batch back.
Returns
The list of created vendor ids.
Business rules
- All or nothing.
Errors
ValidationError. Parse failures or any single row failing the Create Vendor rules.