How to Create a Live Inventory Feed from Shopify
Tip: Spark Shipping can connect to a Shopify store directly as a vendor, which pulls the catalog and inventory and sends orders without a CSV template. See Shopify as a Vendor. The steps below are an alternative if you only need a simple inventory feed.
If you have a Shopify store that you would like Spark Shipping to connect to for live inventory it can be done by doing the following.
Create a CSV Template
- In the Shopify Admin go to Online Store -> Themes
- On your current theme go to ... -> Edit HTML/CSS
-
Select 'Add a new Template'
-
Create a new template for 'Collection' called 'csv'
Replace the code in collection.csv.liquid with:
{% layout none %}
{% paginate collection.products by 5000 %}
Sku,Qty,Cost,Product Name
{% for product in collection.products %}{% for variant in product.variants %}{{variant.id}},{{variant.inventory_quantity}},{{variant.price}},{{product.title}} ({{variant.title}})
{% endfor %}{% endfor %}
{% endpaginate %}

Create a Collection of all the Products
- Go to Products -> Collections -> Add A New
- Title = All Products
- Conditions -> Automatically select products based on conditions
- Inventory Stock is greater than -1
-
Template -> collection.csv
-
Save Collection
Use the Collection as a Spark Shipping Inventory Feed
- Go to Products -> Collections -> All Product (click all products) -> View (top right)
-
That will take you to your new inventory feed!
-
Copy this URL. You will paste it into Spark Shipping in the next step, then map its columns: after saving the Inventory Update, click Reset Column Mappings and Pull Inventory Example, set Vendor SKU Field to the Sku column and Quantity Field(s) to the Qty column, and save. The update does not run until the Vendor SKU Field is set.
-
When creating a new Inventory Update in Spark Shipping select the HTTP as the Inventory Method and use the URL from above as the HTTP URL