Editing Multiple Barcodes per Variant

A variant in Shopify can have up to 20 barcodes. Each barcode can have a type: GTIN, UPC, EAN, ISBN, ASIN, or NS-PID. A barcode without a type is a Custom barcode, which is useful for internal codes that don't follow a standard. With Ablestar Bulk Product Editor you can add, remove, and replace these barcodes in bulk.

The primary barcode

The first barcode on a variant is its primary barcode. Shopify uses it wherever only one barcode fits, such as on labels, in sales channel feeds, and in apps that don't support multiple barcodes yet.

Shopify keeps the primary barcode first and sorts the other barcodes by value. You can choose which barcode is the primary one, but you can't put the other barcodes in a specific order.

There are two barcode fields in the app:

  • Barcodes (all barcodes, with types) edits the whole list of barcodes and their types. This article is about this field.
  • Barcode (ISBN, UPC, GTIN, etc.) edits only the primary barcode and keeps the others. Read Editing Barcodes (ISBN, UPC and GTIN) for this field.

In-app edits

  1. Select the products to edit, and then select Edit products.
  2. In Field to edit, select Barcodes (all barcodes, with types).
  3. In How to edit, select one of the options in the following table.
  4. Enter the barcodes, one per row. Select Add barcode for another row, and select the type of each barcode in the list next to it.
How to edit What it does
Add barcodes Adds the barcodes and keeps the existing ones. The primary barcode stays the same. If a variant already has one of the barcodes, the barcode gets the type you selected.
Add as primary barcode Adds the barcodes and makes the first one the primary barcode. The existing barcodes stay.
Remove barcodes Removes the barcodes from every variant that has them. Upper and lower case don't matter, and the type doesn't matter. If you remove the primary barcode, the next barcode becomes the primary one.
Set barcodes (overwrites existing) Replaces all of the variant's barcodes. The first barcode becomes the primary barcode. If you leave the list empty, the edit removes all barcodes.

The preview shows each variant's barcodes the way Shopify will store them. Added barcodes are green, and removed barcodes are red and struck through.

You can also use a dynamic value, for example to add the SKU as a barcode. Learn more about dynamic values.

You can use these options in one-off edits, scheduled edits, and product rules. Undo removes only the barcodes that the edit added and adds back the barcodes that it removed. Changes made to the barcodes after the edit stay.

Spreadsheet edits

Barcode format

A spreadsheet cell can hold several barcodes. The format is the same as the Barcodes column in the Shopify product CSV:

  • Put a semicolon (;) between barcodes.
  • To set a barcode's type, put the type and a colon in front of the barcode, for example isbn:9780262033848. The type names are gtin, upc, ean, isbn, asin, and ns_pid, in upper or lower case.
  • A barcode without a type is saved as a Custom barcode.
  • If a barcode contains a colon, a semicolon, or a backslash, put a backslash in front of it: \:, \;, or \\.

For example, isbn:9780262033848; upc:036000291452; INTERNAL-123 is three barcodes: an ISBN, a UPC, and a Custom barcode.

Columns

Column What it does
Barcodes Replaces all of the variant's barcodes. The first barcode becomes the primary barcode. Enter [DELETE] to remove all barcodes.
Barcodes: Add Adds the barcodes and keeps the existing ones.
Barcodes: Add as primary Adds the barcodes and makes the first one the primary barcode.
Barcodes: Remove Removes the barcodes in the cell.

The app maps a column with one of these names to the matching option. A blank cell doesn't change anything.

For example, to add an ISBN to books that already have a barcode, upload a spreadsheet like this one:

SKU Barcodes: Add
BOOK-001 isbn:9780262033848
BOOK-002 isbn:9780134685991

The existing barcodes stay, and each book gets the ISBN as an additional barcode.

Find variants by barcode

When the identifier column is Barcode/UPC, a row matches a variant if any of its barcodes match, not only the primary barcode. A cell can list several barcodes separated by semicolons, and the row then matches the variants that have any of them. Type prefixes such as upc: are ignored for matching.

Export

To export all barcodes, add the Barcodes (all barcodes, with types) column to your export. It uses the same format, so you can change the file and upload it again. The column maps back to Barcodes, which replaces the whole list.

Filters

The Barcode (ISBN, UPC, GTIN, etc.) filter on the Products page and in product rules checks all of a variant's barcodes, not only the primary barcode. This applies to all of its conditions, such as equals, contains, and starts with. The Has Duplicate Barcode filter also checks all barcodes.

Barcode checks

Shopify checks barcodes that have a type. The app runs the same checks before it sends the edit to Shopify, because one invalid barcode makes Shopify reject the changes for all the variants sent with it.

Type Rules
UPC 8 or 12 digits
EAN 8 or 13 digits
GTIN 8, 12, 13, or 14 digits
ISBN 10 characters (the last one can be X), or 13 digits that start with 978 or 979. Hyphens and spaces are allowed.
ASIN 10 letters and digits
NS-PID and Custom Any text up to 255 characters

UPC, EAN, GTIN, and ISBN barcodes also have a check digit, the last digit, which must match the other digits. A variant can't have the same barcode twice, even with a different upper and lower case.

If a barcode doesn't pass, the app doesn't change that variant and the edit log shows error EDT028. If an edit would give a variant more than 20 barcodes, the edit log shows EDT029.

Tips and troubleshooting

  • Spreadsheet programs often change long numbers to scientific notation and remove leading zeros. Format the barcode columns as text before you paste the barcodes. Read how to avoid scientific notation.
  • Remove spaces and hyphens from UPC, EAN, and GTIN barcodes. Only ISBN barcodes can have them.
  • If a barcode is an internal code that follows no standard, don't give it a type, so that it's saved as a Custom barcode.
Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.

Still need help? Contact Us Contact Us