Skip to main content
Version: v1.0.0(int)

W164: Bulk-import sales orders

Creates many SOs at once from an uploaded CSV or Excel file. Triggered from the Data page, SO import. Atomic.

Steps

  1. Parse the upload. Read the file into rows of { header, items[] }. Collect parse errors into a list.

  2. Abort on parse failures. Raise a ValidationError listing the failed rows. Nothing is persisted.

  3. Create each SO inside one transaction. For each parsed row, run W144 steps 1 to 5 inside withTransaction. The step-5 reconciliation projector seeds FG DEMAND / ALLOCATE / CONSUME ledger entries per the row's initial status.

  4. Commit. Any single-row failure rolls the whole batch back.

Returns

The list of created SO numbers.

Business rules

  • All or nothing. Atomic import.

Errors

  • ValidationError. Parse failures or any single row failing the Create SO rules.