Exporting or importing inventory with a CSV file

You can export an inventory CSV file that contains your inventory quantities at your locations. You can use that exported CSV file as a template to update the inventory amounts. After you update the inventory amounts, you can then import the CSV file to update your Shopify admin with the inventory quantities for each product in each location.

Export inventory

You can export an inventory CSV file either to create a template that contains your uniquely identified products or product variants for the location or specified locations, or to export the inventory quantities for use in other systems or processes.

If you have multiple locations, then you can specify whether you want to export the data for all of your locations or just for one specific location.

Steps:

  1. From your Shopify admin, go to Products > Inventory.

  2. Click Export.

  3. If you have multiple locations, then select the location that you want to export inventory from. To export inventory from all of your locations, select All locations.

  4. From the Quantity type section, select one of the following quantities:

    • Only Available quantities: This option only exports a CSV file that contain the Available quantity below the location name. You can only make changes to the Available value when you import an edited CSV file using Only Available quantities.
    • All quantity types: This option exports a CSV file that contains the Available, Unavailable, Committed, On hand, and Incoming columns only. If you want to make edits to this file and then import it to your Shopify admin, then edit only the On hand values. Available inventory is calculated based on your imported On hand values.
  5. From the Export section, select one of the following variants:

    • Current page: This option will export all variants on your current page.
    • All variants: This option will export all of your variants.
    • Selected variants: This option will export the variants you have selected on the page if you have any selected.
  6. From the Export as section, select one of the following CSV types:

    • CSV for Excel, Numbers, or other spreadsheet programs
    • Plain CSV file
  7. Click Export variants.

Examples of inventory export CSVs

Review the following examples of how the CSV appears based on the quantity type that you select.

When Only Available quantities is selected

The location names are used in the header row, with the available quantities listed in the rows below.

Example table that indicates what columns are visible when `Only Available quantities` is selected as the desired `Quantity type` for an inventory export CSV.
HandleTitle...OttawaNew York
strbry-jamStrawberry Jam...1050
rspbry-jamRaspberry Jam...2535

When All quantity types is selected

Location is a header, with each location name listed in rows below. This version of the inventory CSV also includes the columns for Incoming, Unavailable, Committed, Available, and On hand inventory quantities.

Example table that indicates what columns are visible when `All quantity types` is selected as the desired `Quantity type` for an inventory export CSV.
HandleTitle...LocationIncomingUnavailableCommittedAvailableOn hand
strbry-jamStrawberry Jam...Ottawa20351018
strbry-jamStrawberry Jam...New York01105061
rspbry-jamRaspberry Jam...Ottawa15032528
rspbry-jamRaspberry Jam...New York0563546

Update the inventory amounts

After you've exported the CSV file to get a template, you need to update the inventory quantities in the file.

The CSV file has several columns to help you identify your product, as described in Inventory CSV file format. When you're converting your store to use multiple locations, edit only the location columns.

Steps:

  1. Open your exported CSV file in a spreadsheet program.
  2. Update the inventory quantities:
    • If you exported the Only Available quantities CSV file option, then update the Available quantity below the location name.
    • If you exported the All quantity types CSV file option, then update the On hand quantity.
  3. The number that you enter in each row can be positive, negative, or 0. The number cannot include a decimal, such as 1.5. You can also enter not stocked to indicate that the product is never stocked at the location.
  4. Save the CSV file.

Import inventory

Before you import inventory, make sure that you've created a CSV file in the correct file format.

If you selected Only Available quantities when you exported your inventory, then the CSV file that you exported can update and overwrite Available inventory quantities only.

If you selected All quantity types when you exported your inventory, then the CSV file that you exported can update and overwrite only On hand inventory quantities when you import the file back into your Shopify admin. It doesn't override any other inventory state quantities. Your Available quantity is calculated based on your new On hand quantities.

Importing inventory quantities overwrites your inventory data. Import your inventory only when other inventory adjustments, such as general ongoing sales or manual changes, aren't occurring.

You can't update Unavailable inventory quantities using CSV files. Unavailable inventory must be adjusted directly in your Shopify admin. This includes inventory marked as Damaged, Quality Control, Safety Stock, or Other.

Steps:

  1. From your Shopify admin, go to Products > Inventory.

  2. Click Import.

  3. Click Add file and choose your CSV file.

  4. Click Upload file.

  5. Verify what you intend to import, and then click Start import.

Inventory CSV file format

The inventory CSV file contains information that uniquely identifies products, product variants, and their inventory quantities at your location or specified locations. You can download and view a sample inventory CSV file to use as a template.

If you plan to import your inventory amounts, then you need to create a CSV file that has the following columns:

The following columns are required in your inventory CSV file:

  • Handle - Required to uniquely identify each product
  • Location - Required to specify where the inventory is located
  • Either SKU or a combination of Option1 Name and Option1 Value - Required to identify specific variants
Description of columns in the inventory CSV file, including required fields and their purposes.
ColumnDescription
Handle (required)

Unique names for each product. They can contain letters, dashes, and numbers, but no spaces. A handle is used in the URL for each product.

Title

The Title column is optional. If you include it, then the values can be left blank.

Option1 Name

If a product has an option, then enter its name in this column. For example, Color.

If a product has no options, this should be set to Title.

Option1 Value

If a product has an option, then enter its option value in this column. For example, Black.

For products with no options, this should be set to Default Title.

Option2 NameIf a product has a second option, then enter its name in this column.
Option2 ValueIf a product has a second option, then enter its option value in this column.
Option3 NameIf a product has a third option, then enter its name in this column.
Option3 ValueIf a product has a third option, then enter its option value in this column.
SKU

The SKU of the product or variant. Used to track inventory with inventory tracking services.

Required if identifying variants by SKU instead of options.

HS Code (Harmonized System Code)

The HS Code column is used to estimate duties and taxes for international customers. This column is optional. If you include it, then the values can be left blank.

COO (Country/Region of Origin)

The COO column is used to estimate duties and taxes for international customers. Accepted values are ISO 3166-1 alpha-2 country codes. This column is optional. If you include it, then the values can be left blank.

Location

The names of each of your locations. The location name is case sensitive and must match your Shopify location name exactly.

For each variant, include a row for every location where you want to update inventory. Remove any other location rows.

IncomingInventory that's on its way to your location. Incoming inventory isn't available to sell until it's been received.
UnavailableInventory that isn't available for sale or that's committed to an order.
CommittedThe number of units that are part of a placed order but aren't yet fulfilled.
AvailableInventory that you can sell. Available inventory isn't committed to any orders or reserved for draft orders.
On hand

The number of units that you have at a location. On hand inventory is made up of the total of your Committed, Unavailable, and Available inventory.

The inventory values that you input can be positive, negative, or 0. The number can't include a decimal, such as 1.5.

You can also enter not stocked to indicate that the product is never stocked at the location.

Can’t find the answers you’re looking for? We’re here to help.