HowTo: Import warehouse data

Edit on GitHub

This 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

  1. 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
Note

If you don’t set the status value, the warehouse will be unavailable by default.

  1. Populate the necessary data and save changes.
  2. Upload the warehouse.csv file to StockDataImport/data/import.
  3. 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

  1. 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
  1. Populate the necessary data and save changes.
  2. Upload the warehouse_store.csv file to StockDataImport/data/import.
  3. 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

  1. Perform steps 2-4 from the preceding sections: Importing warehouses and Importing a warehouse with the stores assigned.
  2. 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.