I have multiple location. How to Import product and assign automatically to one of location

hypefast-tech
Shopify Partner
6 0 0

I have multiple locations on my Shopify (currently it's 6 locations). is there any way to automatically assign products to a specific location when doing import product via template?

Replies 3 (3)
Liam
Shopify Staff
Shopify Staff
1882 202 577

Hi Hypefast-Tech,

 

It's not possible to assign products to locations with the product CSV import but using an inventory CSV file import, you can effectively "assign" products to specific locations by setting the inventory levels for each product variant at each location. In the CSV file, you specify the handle or SKU of the product variant, the name of the location, and the quantity available at that location.

 

Is this what you're looking for?

Liam | Developer Advocate @ Shopify 
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Mark it as an Accepted Solution
 - To learn more visit Shopify.dev or the Shopify Web Design and Development Blog

hypefast-tech
Shopify Partner
6 0 0

Does that mean that whenever I upload a new product via template I need to go through 2 steps? Upload product and then upload inventory?

Liam
Shopify Staff
Shopify Staff
1882 202 577

If you're just using admin features then correct, you'd need to import products and then update inventory. However you could automate this process by creating a custom app that would access the InventoryLevel resource and would allow you to automatically set inventory for products - possibly based on tags, or metafields? Here's some examples of how to work with this endpoint in our developer docs.

 

Hope this helps,

Liam | Developer Advocate @ Shopify 
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Mark it as an Accepted Solution
 - To learn more visit Shopify.dev or the Shopify Web Design and Development Blog