Hello Make community,
I need your help with an automation I’m trying to set up.
Goal:
I want to update the inventory quantities of my Shopify products daily, using a CSV export from my point of sale system.
Context:
My CSV file contains more products than are actually listed in my Shopify store.
In the CSV:
Column 26 contains the SKU (e.g., “SKU #1”, “SKU #2”, etc.).
Column 14 contains the quantity in stock that needs to be updated in Shopify.
In Shopify:
Only certain SKUs from the CSV exist as products.
SKUs are used as unique identifiers.
What I want to achieve:
Loop through the CSV file.
Only update the inventory for products in Shopify where the SKU matches.
Ignore SKUs that exist in the CSV but do not exist in Shopify.
Problem:
I can parse the CSV and read each line, but I don’t know how to properly:
Search for the Shopify variant by SKU.
Only proceed with the inventory update if the product is found.
Skip or avoid errors when the SKU doesn’t exist on Shopify.
Important details:
- Column 26 → SKU (to match with Shopify variant SKU).
- Column 14 → New stock quantity (to update in Shopify).
- Some SKUs from the CSV will not be found in Shopify (normal situation).
Any advice, sample scenarios, or tips to structure this properly would be super appreciated!
Thanks so much in advance!