Hi,
I have a client who are seeking to move to Shopify from a very old legacy custom built e-commerce system. I have began to write a service worker in .NET to synchronise their local database of products to Shopify, however I’ve ran into a bit of a problem when determining items that already exist in Shopify before attempting to add them again the next time the worker runs.
From the API documentation, I can see that there is an endpoint on /products.json that I can call via a GET request to get all the products for the shop. If I use this and compare the local product names with the names in Shopify, then if someone was to change the name of the product on the legacy website, the product would get re-added again causing a duplicate product.
Is there a better way to check in Shopify if the item already exists? Or would I need to store the ID Shopify provides in the response of the added product with the product in the local database so I have a way to cross-reference?
Thanks,
Owen