Shopify: what ID is used for the MerchantProductNo?
Shopify product ID
When you first connect your Shopify plugin as a merchant plugin, you might notice that the unique product identifier in ChannelEngine (the MerchantProductNo) is a long number and not the SKU that you may have assigned to a product. These long numbers are Shopify's own product (or variant) IDs.
Why use the Shopify IDs?
The reason we use these Shopify IDs instead of your own SKU (as would often be the case if you use a product feed or ERP connection) is that these IDs are required to perform API calls to and from Shopify. Setting the relationship between individual variants, children, parent, is all based on these IDs.
Extracting the IDs for external use
Shopify offers a great and simple platform for managing an online webshop but it offers limited options for product information. As a lot of marketplaces require more and more detailed product information, most Shopify users will use an alternative system to enrich the existing product information and add new attributes.
To add additional product information via a feed, the original MerchantProductNo (so in this case the Shopify product IDs) has to be included in that feed to connect the data. Therefore, extracting these product IDs is crucial when it comes to that.
Exporting the Shopify product IDs
Shopify has an export option to generate a CSV with all products in Shopify (on the Products page, select Export in the top right corner), and that does contain information about the individual variants, but it does not include any Shopify IDs.
There are several alternatives that allow you to export all products including variant IDs.
- Use a (paid) Shopify plugin - there are multiple (paid) Shopify plugins available (like https://apps.shopify.com/product-and-variant-ids) that do allow the exporting of Shopify IDs.
- Build your own implementation of the Shopify API - if you have a developer available or are a little tech-savvy, it is relatively simple to fetch all product information from Shopify. To do so, run:
(the number of pages and number of calls being based on your total amount of products).
- Using a custom channel in ChannelEngine - you can create a custom channel in ChannelEngine including all (Shopify) products. These will automatically contain the Shopify ID (as the MerchantProductNo) and the SKU (the VendorProductNo).
Example: using Google Sheets to enrich Shopify content
To set up a new feed to enrich existing content:
- Create a custom channel and include all (Shopify) products.
- Once a feed has been generated, download the CSV file. It can take up to one hour after enabling the channel for the feed to be generated.
Open that file and copy-paste the columns you want to Google Sheets. Alternatively, open Google Sheets and click File, Import, Upload and select the file you downloaded from ChannelEngine.
You can add columns with all sorts of product information to the Google spreadsheet. Make sure to keep the MerchantProductNo column.
Once you're done, publish the file to the web, make it public and export it as a CSV file. For more information on how to do refer to the Product feeds: using Google Docs article.
Now you can use the link and import the new/added product information (more information on setting up feed mapping can be found on Product feeds).