Create Stock metafields and populate them via API (SAP B1 - Shopify integration)

Billy5
Visitor
2 0 0

Hi all,

Is it possible to create product Meta fields to store in Shopify additional information about stock? (stock in transit/ coming soon vs stock available now) 

I would like to store information about stock in third party system (sap b1), and pull that information via the API and then store it in product metafields.

To give some context on the query, I would like to show stock available immediately and stock in transit on the product page. This would be displayed for information purposes only. Client would order based on the product quantity in the product master. But on the product page, they could also see how much stock is available now vs how much stock is in transit.

So if for a product there is 6 units available (6 can be ordered), I would like to show below as text information '''4 in stock'' and ''2 in transit''. Here the client could order 5 but would would know that only 4 units only are available now. How could this be managed? 

Reply 1 (1)

Jason
Shopify Expert
11190 225 2283

That's viable. The main task here is just making the API call to add/update a metafield on the product (or variant). With SAP I have to assume you've already got some middleware in place connecting the platforms so ideally this is pretty easy to add the data push back into Shopify.

I don't have the full context but I would only send over the in transit value unless you really need to send both.
The product liquid object will have inventory data available so the theme can do the math based to show the split of what amount is actually in transit or not.

 

★ I jump on these forums in my free time to help and share some insights. Not looking to be hired, and not looking for work. http://freakdesign.com.au ★