Difference between revisions of "Bulk Inventory Export and Import"

From Spiffy Stores Knowledge Base

m
 
Line 137: Line 137:
 
| 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 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.
 
| 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 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.
 
|}
 
|}
 
== CSV File Usage Notes ==
 
 
The first record for a given handle must contain the product data section (Title, Body, Vendor, Type and Tags). Title, Vendor and Type must be specified.
 
 
Optionally this record and subsequent records with the same handle can contain Variant, Image and Custom Option records.
 
 
As many secondary handle records are included as necessary to list all possible variant, image or option records.
 
 
If the product is new, the first record must contain at least the product data, a variant record and optionally an image or option record. This and subsequent records will define the product and all its variants, images and options.
 
 
If the product is being updated, then the product data in the first record will replace the existing product data. The variant, image and option data are optional on the first record. If a variant, image or option is specified on the first record, then '''ALL''' existing variants, images or options are deleted and replaced by the data from the CSV file.
 
 
If there is no variant, image or option on the first record, but data appears on subsequent records, then these records are used to update or add new records. Thus, if there is no variant on the first record, but one appears on the second record, then this data replaces any existing variant with the same title or adds a new variant if it doesn't already exist.
 
 
The same rules apply to options, and also to images. However, for images all images are treated as new images and an attempt is made to upload them to the product.
 
 
If a product exists and the overwrite option is not specified, then the product is skipped entirely.
 
 
NOTE: If the first record does not contain product data, it will be skipped.
 
 
NOTE: Only the product data on the first record for a handle will be used. It will be ignored on all other records.
 
 
Policy for updates -
 
 
*If a product is new, then obviously all the data in the CSV will be added to the product.
 
 
*If a product already exists and the overwrite flag is not set, then the product will be skipped and no changes will be made to the product, its variants, options or images.
 
 
*If a product exists and overwrite is specified, then the main product attributes will be replaced. Also, all variants, options and images will be deleted and replaced by the ones specified in the CSV. This is equivalent to the product being deleted and replaced with a new version.
 
 
With the addition of the Option1, Option2 and Option3 fields, the variant title is replaced by up to three of these 0ption names (and values).
 
 
The Option Names are the titles of each of the options and are specified by "Option1 Name", "Option2 Name" and "Option3 Name". Only the values on the first record will be used when creating a product. All the names on subsequent lines are ignored, and are assumed to be the same as the first record. An error will be issued if the names change. When a product is being updated, then an error will be issued if the names do not exactly match the existing option names.
 
 
If you are using your CSV file to update variant data such as prices and inventory levels, then we'd recommend deleting the '''Image Src''', '''Custom Option Name''', '''Custom Option Value''' and '''Custom Option Price''' fields as these won't be changing your product images or custom options and it's not necessary to update them every time you make minor changes to the product and variation settings.
 
 
=== CSV File Examples  ===
 
 
==== Identification Section  ====
 
 
<gallery widths="200px" heights="200px" class="right">
 
File:Product import 3.png|Handle Section in CSV File
 
</gallery>
 
 
The CSV file is divided into five main sections.
 
 
The first section consists of the first two columns, the '''Handle''' and the '''Title''' fields.
 
 
These two fields identify each product, and either a Handle or Title '''MUST''' be specified for each product. The values are repeated for every line of the product definition.
 
 
==== Product Section ====
 
 
<gallery widths="200px" heights="200px" class="right">
 
File:Product import 4.png|Product Section in CSV File
 
</gallery>
 
 
The next section of the file contains the product description.
 
 
The four fields in this section include the '''Body''', '''Vendor''', '''Type''' and '''Tags''' fields.
 
 
This data is only required only on the '''FIRST''' record in a product definition. If any of these fields are specified on subsequent records for the product, they will be ignored.
 
 
==== Variations Section ====
 
 
<gallery widths="200px" heights="200px" class="right">
 
File:Product import 5.png|Variations Section in CSV File
 
</gallery>
 
 
The next 16 fields define each variation.
 
 
Each product variation requires one record in the CSV file, so include as many entries as necessary. Remember to include the '''Handle''' and/or '''Title''' fields for the product at the start of each record.
 
 
==== Custom Options Section ====
 
 
<gallery widths="200px" heights="200px" class="right">
 
File:Product import 6.png|Custom Options Section in CSV File
 
</gallery>
 
 
The following 3 fields define all the custom options and their values.
 
 
An entry is required for each custom option name and each of the values and prices for that name. Each combination requires one product record, and you need to include as many records as necessary to define all custom option combinations.
 
 
It doesn't matter if you have more or less Custom Options than Variations. In the example on the right, there are 3 variations, but 4 custom options, so we need a total of 4 product records for the first product.
 
 
==== Images Section ====
 
 
<gallery widths="200px" heights="200px" class="right">
 
File:Product import 7.png|Images Section in CSV File
 
</gallery>
 
 
The final field defines the images for the product.
 
 
Each entry is the URL of the image on a web server. Each product image is listed on a single record. You need to include as many records as you have product images to define.
 
 
It doesn't matter if you have more or less Images than Custom Options or Variations. In the example on the right, there are 3 variations, 4 custom options, but only 1 image, so we need a total of 4 product records for the first product.
 

Latest revision as of 12:04, 10 October 2024

You are able to Export and Import your store inventory using CSV (Comma-Separated Values) files. CSV files can be created and edited with products such as Excel and Open Office.

This feature is similar to the more generic Bulk Product Export and Import feature, but is specifically designed to make it much easier to update just the inventory levels for your products. Just download the inventory for your current products as a CSV, and use that file as a template in order to update the inventory levels for your products. Once updated, the CSV file can be imported, as described below.

You cannot use the Inventory CSV file to import new products. You must use the full product CSV as defined in the Bulk Product Export and Import section.

You can also import a CSV file of your inventory downloaded from Shopify. If you're having problems importing inventory levels from Shopify, please send us your CSV file at support@spiffystores.com.au.

Exporting Inventory

Select the Export all Inventory link on the Products page to download a CSV file containing just the Inventory levels of the products in your online store.

This link is also available on the Inventory page.

You can also choose the Export all Inventory in current group to download a CSV file of the inventory levels for a selected group of products.

This file can be edited and used to update your product inventory levels in bulk.

Please refer to the following section on Importing Inventory for details on the format of the CSV file.

Importing Inventory

Select the Import more products link to go to the Product Import page.

The same process is used for the Product CSV files as well as the Inventory CSV files. The Product Import can determine the type of file being imported automatically.

Product Import Page

The Product Import page contains some instructions on how to use the product import process. In the side-bar are the answers to a number of commonly asked questions about importing products.

If you want a template CSV file to use to start building your product update CSV file, then click on the Download Template CSV button. This is only used for full Product imports, and if you want to use an Inventory import CSV file, you should do an export of the Inventory first.

Your CSV file needs to adhere to the following conventions in order for it to be used to import products.

You can freely use UTF-8 character encodings for product titles and product descriptions, but be sure to create them using a Unicode or UTF-8 enabled program. The OpenOffice.org suite of programs is suitable for this purpose.

A CSV file (Comma-Separated Values) file is a plain text file with commas delimiting the fields. The first line of the CSV file is the header, and contains the name of the fields. The sample template CSV file can assist you with the correct heading values.

The first line of the CSV file must have the following heading columns.

Handle
Title
Option1 Name
Option1 Value
Option2 Name
Option2 Value
Option3 Name
Option3 Value
SKU
HS Code
COO
Location
Incoming
Unavailable
Committed
Available
On hand

The fields are explained below.

The inventory.csv file explained

HEADER WHAT IS IT?
Handle (Required when updating products. Not required when adding new products) The product handle is a unique identifier for a given product. The handle is used as part of the product's URL to identify that product. In the CSV file, each line must contain a Handle or Title.

If the Handle is not provided, one is automatically generated from the Title.

This option is usually used when importing new products. For referencing existing products, it is necessary to specify the Handle of the product. A product definition may take a number of records in the CSV file, and each of these lines will contain the product's Handle. When a different Handle is encountered, a new product is being defined.

The handle consists of lower-case letters and digits separated by dashes ('-'). No special characters or spaces are permitted. The handle must be unique for each product. The handle must start with an alphabetic character.

In the following example, the handle is "a-green-t-shirt".

http://www.myshop.com.au/products/a-green-t-shirt
Title (Required) The product's title.
Option1 Name (Required) This is the name of the default option that is used to distinguish a product's variations. For products with only single option, this should be left as 'Title'. A value MUST be provided if a variation is being defined. e.g. Title, Size, Colour, Name, Material, Style.
Option1 Value (Required) This is the value used to distinguish between a product variations. A value MUST be provided if a variation is being defined. If you have only one option, this should be set as 'Default'. e.g. Small, Medium, Large, Blue, Green, Yellow
Option2 Name If a product has a second option used to distinguish a product's variations, then enter the name of the option here.
Option2 Value If a product has a second option, enter the value of the option for this variation here. A value MUST be provided if a variation is being defined. e.g. Small, Medium, Large, Blue, Green, Yellow
Option3 Name If a product has a third option used to distinguish a product's variations, enter the name of the option here.
Option3 Value If a product has a third option, enter the value of the option for this variation here. A value MUST be provided if a variation is being defined. e.g. Small, Medium, Large, Blue, Green, Yellow
SKU This is the SKU (Stock Keeping Unit) identifier used to identify the variation.
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 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 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. Use 'Default' if multiple locations are not enabled for your store.
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 inventory that isn't available for sale or committed to an order. 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 your Committed, Unavailable and Available inventory. The inventory values that you input 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.