New cost property on InventoryItem

Not yet seeing the "cost" on my store when I use the below format, with 12345 being inventory_item_id ... any ideas?
myshop.com/admin/inventory_items/12345.json
High ticket item store owner and Google Shopping Ads specialist.
Shopify App: Gravy is a sales and marketing app that lets you build social proof with photo reviews, sales/cart pop-ups and referrals.
0 Likes
Shopify Partner
660 0 104

Repricer Admin, we noticed the same thing when hitting the url in your browser, but if you use the API, the cost property will be returned. It seems pretty inconsistent...

It's missing in webhooks though. I'm waiting for a fix on that one...

1 Like

Ah, thanks for confirming that... maybe/hopefully this is by design, to protect costs of shop owners. :)

So, just to confirm I have this right... this should work?  On my dev store I'm still having no luck after iterating through $cost ...

$inv_request = $shop->api()->rest('GET', '/admin/inventory_items/12345.json');  
$cost = $inv_request->body->inventory_item->cost;

High ticket item store owner and Google Shopping Ads specialist.
Shopify App: Gravy is a sales and marketing app that lets you build social proof with photo reviews, sales/cart pop-ups and referrals.
0 Likes
Shopify Staff (Retired)
Shopify Staff (Retired)
22 0 11

Hi all,

For those implementing product cost in their apps we have just released a guide to supporting the new feature: https://help.shopify.com/en/api/guides/supporting-product-cost

Also, regarding the webhook issue Clement raised, we have just pushed an update which resolves this issue and also exposes the cost property to admin authenticated requests in the browser. Thanks for your patience while this was resolved.

1 Like
Shopify Partner
660 0 104

Thanks Kieran, I can see the cost in the webhook now.

0 Likes
Shopify Partner
76 1 11

Hi Kieran,

I noticed when merchants update the cost per item field with CSV product import, the inventory_items/update webhook is not triggered. Is this by design? If it is, what do you recommend apps should do to detect changes in costs? 

Thanks.
Sam

SimplyCost - Add costs and track profit (https://apps.shopify.com/simplycost)
0 Likes
Shopify Staff (Retired)
Shopify Staff (Retired)
22 0 11

Hi Zapfor Solutions, thanks for the heads up on this, we're investigating the issue and will report back as soon as it's solved.

0 Likes
New Member
2 0 0

Hey guys!

 

Is there any way to record cost of previous goods sold prior this feature was introduced? 

 

Thanks!

0 Likes
Shopify Partner
76 1 11

Hi Keiran,

Hi Zapfor Solutions, thanks for the heads up on this, we're investigating the issue and will report back as soon as it's solved.

I'd like to check if you have got any update regarding bulk import costs does not fire inventory_items/update webhooks?

Sam

SimplyCost - Add costs and track profit (https://apps.shopify.com/simplycost)
0 Likes
Shopify Partner
660 0 104

We have deprecated our own cost field in favor of this new built-in field.

However, some merchants have reported to us that the field doesn't allow $0 cost.

It might seem strange at first but there are some valid scenarios that warrant a $0 cost, such as items on consignment or free items.

Is it possible to change the field to allow for this?

UPDATE:

It's worth noting that it is possible set a product price at $0 so it only makes sense to allow for the cost to be $0 as well.

1 Like