HowTo: Import warehouse data
Edit on GitHubThis document shows how to import warehouse data using a CSV file, including the following:
- Import warehouses.
- Assign a warehouse to stores.
- Import warehouses with the stores assigned in bulk.
Import warehouses
- Prepare the
warehouse.csv
file where you can indicate the warehouse name and its availability. The file can contain the following fields:
PROPERTY | TRANSCRIPTION | EXAMPLE |
---|---|---|
name |
Warehouse name you want to create. | Warehouse1 |
is_active |
Status of the warehouse specified in a boolean value: 1 (true) or 0 (false), where 1 indicates that the warehouse is available and 0 indicates that the warehouse is unavailable. |
1 or 0 |
If you don’t set the status value, the warehouse will be unavailable by default.
- Populate the necessary data and save changes.
- Upload the
warehouse.csv
file toStockDataImport/data/import
. - Import the data:
console data:import stock
The imported data must be imported to the spy_stock
database table and appear in the Back Office, on the Warehouses page. For more information about how to manage the warehouses, see Managing warehouses.
Import a warehouse with the stores assigned
- Prepare the
warehouse_store.csv
file containing the following fields:
PROPERTY | TRANSCRIPTION | EXAMPLE |
---|---|---|
warehouse_name |
Warehouse name you want to create. | Warehouse1 |
store_name |
Store, which you want to assign to the warehouse. | DE |
- Populate the necessary data and save changes.
- Upload the
warehouse_store.csv
file toStockDataImport/data/import
. - Import the data:
console data:import stock-store
The imported data must be added to the spy_stock_store
database table and appear in the Back Office, on the list of warehouses. For more information about how to manage the warehouses, see Managing warehouses.
Import warehouses with store relation in bulk
- Perform steps 2-4 from the preceding sections: Importing warehouses and Importing a warehouse with the stores assigned.
- Run the following console command:
console data:import
The imported data appears in the Back Office, on the Warehouses page. For more information about managing the warehouses, see Managing warehouses.
Thank you!
For submitting the form