Exporting or importing inventory with a CSV file
You canexport an inventory CSV filethat contains your inventory quantities at your locations. You can use that exported CSV file as a template toupdate the inventory amounts. After you update the inventory amounts, you can thenimport the CSV fileto update your Shopify admin with the inventory quantities for each product in each location.
On this page
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:
- Go toProducts>Inventory.
- ClickExport.
- Do either of the following:
- If you have multiple locations, then select the location that you want to export inventory from.
- To export inventory from all of your locations, selectAll locations.
- From theQuantity typesection, 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 theAvailable
value when you import an edited CSV file usingOnly Available quantities. - All quantity types: This option exports a CSV file that contains the
Available
,Unavailable
,Committed
,On hand
, andIncoming
columns only. If you want to make edits to this file and then import it to your Shopify admin, then edit only theOn hand
values.Available
inventory is calculated based on your importedOn hand
values.
- Only Available quantities: This option only exports a CSV file that contain the
- From theExportsection, 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.
- From theExport assection, select one of the following CSV types:
- CSV for Excel, Numbers, or other spreadsheet programs
- Plain CSV file
- ClickExport variants.
Examples of inventory export CSVs
Review the following examples of how the CSV appears based on the quantity type that you select.
WhenOnly Available quantities
is selected
The location names are used in the header row, with the available quantities listed in the rows below.
Handle | Title | ... | Ottawa | New York |
---|---|---|---|---|
strbry-jam | Strawberry Jam | ... | 10 | 50 |
rspbry-jam | Raspberry Jam | ... | 25 | 35 |
WhenAll 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.
Handle | Title | ... | Location | Incoming | Unavailable | Committed | Available | On hand |
---|---|---|---|---|---|---|---|---|
strbry-jam | Strawberry Jam | ... | Ottawa | 20 | 3 | 5 | 10 | 18 |
strbry-jam | Strawberry Jam | ... | New York | 0 | 1 | 10 | 50 | 61 |
rspbry-jam | Raspberry Jam | ... | Ottawa | 15 | 0 | 3 | 25 | 28 |
rspbry-jam | Raspberry Jam | ... | New York | 0 | 5 | 6 | 35 | 46 |
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 inInventory CSV file format. When you're converting your store to use multiple locations, edit only the location columns.
Steps:
- Open your exported CSV file in a spreadsheet program.
- Update the inventory quantities:
- If you exported theOnly Available quantitiesCSV file option, then update the
Available
quantity below the location name. - If you exported theAll quantity typesCSV file option, then update the
On hand
quantity.
- If you exported theOnly Available quantitiesCSV file option, then update the
- The number that you enter in each row can be positive, negative, or0. You can also enter
not stocked
to indicate that the product is never stocked at the location. - 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 selectedOnly Available quantitieswhen you exported your inventory, then the CSV file that you exported can update and overwriteAvailable
inventory quantities only.
If you selectedAll quantity typeswhen you exported your inventory, then the CSV file that you exported can update and overwrite onlyOn hand
inventory quantities when you import the file back into your Shopify admin. It doesn't override any other inventory state quantities. YourAvailable
quantity is calculated based on your newOn 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.
Steps:
- Go toProducts>Inventory.
- ClickImport.
- Click添加文件and choose your CSV file.
- ClickUpload file.
- Verify what you intend to import, and then clickStart 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. It's similar to other CSV files that you use with Shopify, but has different columns.
如果你打算进口你的发明ory amounts, then you need to create a CSV file that has the following columns:
- Handle- Handles are 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. For example,
Color
. If a product has no options, then this should be set toTitle
. - Option1 Value- If a product has an option, then enter its value. For example,
Black
. For products that have no options, this should be set toDefault Title
. - Option2 Name- If a product has an option, then enter its value. This can be left blank.
- Option2 Value- If a product has an option, then enter its value. This can be left blank.
- Option3 Name- If a product has an option, then enter its value. This can be left blank.
- Option3 Value- If a product has an option, then enter its value. This can be left blank.
- SKU- Stock keeping units (SKUs) are codes that you can use internally to track your inventory and report on your sales. For accurate inventory tracking and reporting, the SKUs that you add should be unique. The SKU column is optional. If you include it, then the values can be left blank.
- HS Code- The HS Code (Harmonized System 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- The COO (Country/Region of Origin) column is used to estimate duties and taxes for international customers. Accepted values areISO 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 row is case sensitive and must be the name of one of your locations. The inventory for each location is displayed in the corresponding location row. For each variant, include a row for every location where you want to update inventory. Remove any other location rows.
- Incoming- Inventory that’s on its way to your location. Incoming inventory isn’t available to sell until it's been received.
- Unavailable- Unavailable inventory refers to the number of units that are reserved for draft orders or set aside by apps. It's not available to be sold.
- Committed- The number of units that are part of a placed order but aren't fulfilled.
- Available- Inventory that you can sell. Available inventory isn’t committed to any orders or reserved for any draft orders.
- On hand- The number of units that you have at a location. On hand inventory is made up of the total of yourCommitted,Unavailable, andAvailableinventory. The inventory values that you input can be positive, negative, or0. You can also enter
not stocked
to indicate that the product is never stocked at the location.
来唯一地标识一个变体,指定values for theHandle,Option1 Value,Option2 Value, andOption3 Valuecolumns.
Your inventory CSV file must be in the correct format and needs to have a.csv
file extension.