Inventory Tracking

125 views
Skip to first unread message

Ryan Alyea

unread,
Sep 18, 2012, 8:56:36 PM9/18/12
to shopify-a...@googlegroups.com
Hey there Shopify API Team,

I'm getting to the point where nearly 100% of my feature requests are based on inventory tracking. That's great except for a few minor nitpicks and a major question:

Nitpicks:

* Does Shopify keep, if at all, any historical inventory_quantity changes other than orders themselves?
* Are all inventory_quantity changes available via webhook? (on orders and products)

Major Question:

When is inventory_quantity changed? I imagine that it looks something like this:

* Shopowner changes the variant via the admin.
* API changes the variant via API.
* Order's financial_status moved from "abandoned" (financial_status:nil) to either "pending", "authorized", or "paid". (guaranteed +quantity)
* Order's fulfillment_status is moved from nil, "partial", or "fulfilled" to "restocked".

Thanks!

Ryan Alyea

Ryan Alyea

unread,
Sep 24, 2012, 1:42:54 AM9/24/12
to shopify-a...@googlegroups.com
Any response to this?

John Duff

unread,
Sep 24, 2012, 8:05:29 AM9/24/12
to shopify-a...@googlegroups.com
Answers inline. For the most part what you have assumed is correct,
added a bit of clarification for one. If you notice anything different
than that let us know.

John Duff
Software Developer @ Shopify.com


On Tue, Sep 18, 2012 at 8:56 PM, Ryan Alyea <ry...@fangamer.com> wrote:
> Hey there Shopify API Team,
>
> I'm getting to the point where nearly 100% of my feature requests are based
> on inventory tracking. That's great except for a few minor nitpicks and a
> major question:
>
> Nitpicks:
>
> * Does Shopify keep, if at all, any historical inventory_quantity changes
> other than orders themselves?
> * Are all inventory_quantity changes available via webhook? (on orders and
> products)
>
> Major Question:
>
> When is inventory_quantity changed? I imagine that it looks something like
> this:
>
> * Shopowner changes the variant via the admin.
yes
> * API changes the variant via API.
yes
> * Order's financial_status moved from "abandoned" (financial_status:nil) to
> either "pending", "authorized", or "paid". (guaranteed +quantity)
when an order is confirmed inventory is taken. This happens when
fulfillment status is not nil, order is not claimed and order is not
cancelled
> * Order's fulfillment_status is moved from nil, "partial", or "fulfilled" to
> "restocked".
This happens when an order is cancelled and you choose to restock.
Only orders that have not been fulfilled or are partially fulfilled
are restocked. Only line items that are not fulfilled and under
inventory management are restocked.
>
> Thanks!
>
> Ryan Alyea
>
> --
>
>
>

Ryan Alyea

unread,
Sep 26, 2012, 10:12:59 PM9/26/12
to shopify-a...@googlegroups.com
Thanks. I'm confused by when you mean "order is not claimed". Do you mean inventory wasn't already taken out for that order? Or is that some other process?

John Duff

unread,
Sep 27, 2012, 7:53:49 AM9/27/12
to shopify-a...@googlegroups.com
Yes, inventory hasn't been claimed. I actually meant not 'confirmed'. So if an order has not been confirmed and financial status gets set and the order is not cancelled it will be confirmed and inventory will be claimed.

If you look in the API we have a confirmed flag, this means inventory was claimed for that order.


John Duff
Software Developer @ Shopify

Sent from my iPhone
--
 
 
 

Ryan Alyea

unread,
Sep 27, 2012, 7:04:15 PM9/27/12
to shopify-a...@googlegroups.com
Where is the confirmed or claimed flag? I don't see it in Orders or Transactions.

John Duff

unread,
Sep 27, 2012, 8:02:29 PM9/27/12
to shopify-a...@googlegroups.com
I lied, it isn't returned. Would it be useful to you if we did? If you say yes, what would it allow you to build that you can't build without it?


John Duff
Software Developer @ Shopify

Sent from my iPhone
--
 
 
 

Ryan Alyea

unread,
Sep 28, 2012, 1:23:47 AM9/28/12
to shopify-a...@googlegroups.com
I don't need it if the fulfillment_status and financial_status is a good enough detection method. My goal is to simply keep the Shopify inventory values in sync with the inventory values in my database. If I can have a reasonable guarantee that inventory numbers are correct on my side, I can do:

* Total cost of inventory - Instantly generate how much a total inventory is worth. (And how much it was in the past after rolling back previous sales.)

* Keep track of "days of inventory" left - many people want to know exactly when to reorder. It takes order history and current inventory numbers to calculate. Possibly even email shopowners on "your widget has 5 days of sales left, and it takes 5 days to get more!".

* Combo pack generator - Keep track of inventory for a variant that's just a "combination" of variants. Use DeepMine to setup combos, track unrolled combo sales, set inventory of combo variant to "deny" when one of it's parent variants is set to zero. Fangamer does this already, but inventory is tracked on the app's side and it's non-ideal, especially since Fangamer's now making a million products at once, the setup process needs to be a lot easier. (of course if I had a proper discount system, I wouldn't need extra 1000s of variants just to simulate a discount system ;) ;) ;) )

So while that value is kind of useful to have, it's much easier to signal to app developers when inventory is removed/added, just a detailed note of exactly when an order modifies inventory is good enough.

John Duff

unread,
Sep 28, 2012, 8:41:04 AM9/28/12
to shopify-a...@googlegroups.com
Fulfillment and financial status should do it.

Was there anything else missing? Second part of your email sort of made it sound like there was but didn't say what you actually wanted.


John Duff
Software Developer @ Shopify

Sent from my iPhone
--
 
 
 

Ryan Alyea

unread,
Oct 1, 2012, 11:34:56 PM10/1/12
to shopify-a...@googlegroups.com
No, that should be it. Here's a "state machine" of the inventory:


Those are the four conditions in which changes inventory and they're all listenable. I'm not missing a hidden method that inventory gets changed, like claimed inventory in the middle of checkout, customer doesn't eventually purchase or credit card fail or something?

For example with the combo pack example, it's imperative that if an item of a combo pack sells out, the combo pack is 'sold out' immediately, even if for that temporary transaction time.
Reply all
Reply to author
Forward
0 new messages