Product Inventory Upload
Description
Allows you to update inventory in a multi-location Shopify Store.
Update Mode
Insert
Writeback Fields
None
Sample Integration & How To Guide
This guide describes how to update inventory following the Multi-Location changes to Shopify.
The following link describes those changes.
https://help.shopify.com/api/guides/inventory-migration-guide
Assumptions
This assumes you have a Shopify connector which supports Product Inventory updates and the Shopify lookup.
Shopify Permissions
You will need to alter the permissions assigned to the Realisable Private App to allow IMan to read & write to the inventory locations.
To do this you need to Login to the Shopify Admin Panel, go to Apps, then Private Apps, select the Private App for the IMan application, and allow Read/Write Access found towards the bottom of the screen.
IMan Sample Integration
The sample can be downloaded here.
The sample integration allows you to update inventory in a Shopify store and is comprised of three transforms. The premise is to gather most of the data required to perform the update by firstly querying Shopify, adding the missing values via the Map transform, and finally writing the inventoty back to Shopify.
- Read Transform
- The read transform pulls down ALL the product variants from your Shopify store. The primary purpose to is to obtain the inventory_item_id for each product variant as this field is required by Shopify.
- Map Transform
-
This performs the Lookup (see below) against your Sage data to obtain the available inventory.
A query is performed against Shopify to obtain the location_id. It is important to note this query obtains the first location from Shopify, as it’s expected that this is an in place replacement of an existing inventory update AND multiple locations have not been introduced.
If you have multiple locations and wish to update one of those locations you will need to alter the query in the Location field.
-
This performs the Lookup (see below) against your Sage data to obtain the available inventory.
- Shopify Connector
- This posts the inventory update. The inventory update replaces the existing inventory value.
Inventory Lookups
This section provides examples of the Inventory Lookups used on the Map transform across the different Sage products. You should change these as needed.
-
Sage200
- ID - SHOPINV
- Select Clause - WI.ConfirmedQtyInStock + WI.UnconfirmedQtyInStock - WI.QuantityAllocatedSOP - WI.QuantityAllocatedBOM as "QtyAvailable", I.Code, W.Name
- From Clause - WarehouseItem WI inner join Warehouse W on W.WarehouseID = WI.WarehouseID inner join StockItem I on I.ItemID = WI.ItemID
- Where Clause - W.Name = 'Newcastle' and Code = '%1'
-
Sage300
- ID - SHOPINV
- Select Clause - QTYONHAND - QTYSHNOCST + QTYRENOCST + QTYADNOCST as QtyAvailable
- From Clause - ICILOC L inner join ICITEM I on I.ITEMNO = L.ITEMNO
- Where Clause - LOCATION = '1' and FMTITEMNO = '%1'
-
SageX3
- ID - SHOPINV
- Select Clause - PHYSTO_0 - PHYALL_0 As QtyAvailable
- From Clause - ICILOC L inner join ICITEM I on I.ITEMNO = L.ITEMNO
- Where Clause - LOCATION = '1' and FMTITEMNO = '%1'
Request Throttling
Please note that updates to inventory are still made one-at-a-time so the connector is still subjected by Shopify’s throttling. Updating large inventory sets will still take considerable time.