· DataEase · Tutorials  · 2 min read

Update HS Code and Country in Bulk

Setting or changing HS Code and Country of origin for many variants manually can be extremely time-consuming. DataEase makes it easy: export your product variants, edit the HS code and country fields, and import them back to Shopify—all with validation.

🎯 Goal

Set or change HS Code and Country of origin for many variants at once using CSV/Excel and DataEase.


📋 Step-by-Step Instructions

1. Export Products with Variants

In DataEase, go to New Export → Products. Include at minimum:

Identifiers:

  • id
  • variantId (recommended)
  • Optional: handle, variantSKU

Fields to edit:

  • variantHsCode
  • variantCountryOfOrigin
  • Optionally add title, variantTitle for context

2. Edit the File

Open the exported file in Excel or Google Sheets. For each variant you want to change:

  • Set variantCommand = UPDATE
  • Fill variantHsCode with the Harmonized System code (digits only, typically 6–10)
  • Fill variantCountryOfOrigin with a two-letter ISO country code (e.g., US, PL, CN)

When done, save the file as .xlsx or .csv.


3. Import & Validate

  1. In DataEase, start New Import
  2. Upload your edited file
  3. Map columns (Variant ID or unique SKU → variant)
  4. Run Validation

Fix any issues flagged in Validation Status (e.g., invalid ISO code, non-numeric HS).


4. Run the Import

After validation passes, click Run Import to apply your changes to Shopify.

Once complete, spot-check a few products in Shopify Admin to confirm the updates.


📝 Important Notes

  • These are variant-level fields; each product variant can have its own HS code and origin
  • Keep HS codes numeric (no spaces/dashes). Use official codes from your customs authority
  • Country must be a valid ISO-3166-1 alpha-2 code
  • Prefer matching by variantId; use SKU only if it’s unique and stable

💡 Minimal CSV Examples

Update by Variant ID:

variantId,variantCommand,variantHsCode,variantCountryOfOrigin
gid://shopify/ProductVariant/111,UPDATE,610910,PL
gid://shopify/ProductVariant/112,UPDATE,420222,CN

Update by SKU (unique):

variantSKU,variantCommand,variantHsCode,variantCountryOfOrigin
TEE-ORG-M,UPDATE,610910,US

🎉 That’s it!

Your HS codes and countries of origin are now updated in bulk.
If you run into any issues or have questions, feel free to contact our support team.