Can't get any usefull information on inventory vendors

raphaelraphael Member Posts: 18

Everywhere we have looked, even found an API call that is not documented, we can't get the information we need.


How can we get the item inventory PER vendor?

How can we know where the inventory was consumed on a Sale/Transaction?


In both situations, the API is missing some very useful information that would make our life so mush easier.


1) inventory per vendor : {{base_url}}/Item/{{item_id}}.json?load_relations=["ItemVendorNums", "ItemShops"]

Here, in the field ItemShop.qoh, we have the total inventory quantity but can't get it per vendor.

We also have a list of all the vendors configured in Vendor IDs interface (coming from the relation ItemVendorNums), but no quantity.

  • btw, what is this interface used for? I would like to prioritize inventory consumption on a vendor list, this seems to be a good place, does not do what we want...


2) inventory consumption on sale

When you check at the "Line" interface of a transaction (access that interface by clicking on a sale ID). The bottom grid "Inventory Lines", clearly shows where the inventory was taken. We can even click on the Inventory ID that brings us to an un-useful interface. I know that the inventory ID is linked to a vendor that was previously added to the product! But that information is not shown on the interface. Now, if I use the inventory ID and call the magic new API call

{{base_url}}/Inventory/{{inventory_id}}.json

I don't have any useful information neither. If I could get quantity and vendors, this would be great (but we would also need a way of getting the ID from the API which, for the moment is impossible).

So, there is no way we are able to know where the inventory was taken on a sale, neither how much inventory remains per vendors....

Just so you know, all of our problem would be resolved if we could a vendor in the inventory consumption instead of the hardcoded FIFO.

8 comments

  • sam123456sam123456 Member Posts: 49

    I have also had this problem (tracking inventory changes for GMROI and other calcs). I resorted to setting up a whole django backend to poll the API for any inventory/sale/order changes and log them as they occur. Either webhooks or access to the inventory logs that are available through the UI would be a huge benefit, but so far no response from lightspeed on those topics. If you find anything please @ me though.

  • gregaricangregarican Member Posts: 533 

    If the user doesn't subscribe to Lightspeed Analytics, then the canned Retail reports probably aren't sufficient for a lot of purposes. I'd imagine that via the API this is doable. Although it could take several API requests, then stitching what you need together based on the API response sets.

    What I usually recommend for most customers who require more advanced ways to slice and dice their data (and don't utilize LA) is to export out the whole shootin' match as a scheduled task --- pulling sales/refund/transfer/RTV transactions, pulling new stock entries, pulling vendors, pulling customers, etc. Dump the dataset into a local SQL DB and pull things however you'd like. Not the simplest solution, but certainly the one that gives you control over what you need to do. If we couldn't do this, then our simplest company that implemented LS Retail a few years back would've had to move off this solution...

  • raphaelraphael Member Posts: 18

    @gregarican ,

    Does Lighspeed Analytics gives more information in the APIs request? If so, that's probably our solution. Can you confirm?

    Our goal is to automate everything, so we NEED to use the available APIs/Webhook, either retail or ecom.

    When you say

    " I'd imagine that via the API this is doable. "

    My answer would be, we have explored every bit of information available in the API and no, it's not doable. That's the whole point of that post. We need more info.

  • gregaricangregarican Member Posts: 533 
    edited September 24

    We dropped our Lightspeed Analytics subscription awhile back, so I can't speak to all of its ins and outs. Although I do recall it is pretty powerful. I'd imagine a Lightspeed sales rep could walk you through a demonstration.

    As for the API, I can tell you from regular hands-on development experience most all scenarios are doable. I pull all products --- with all loaded relations for tags, vendors, item shops, etc. daily. Same with pulling all sales, refunds, RTV's, transfers, etc. on a daily basis. And so on. All of this data is dumped into a local SQL database and I can break out reports to heart's content.

    While pulling data with all relations is a time-consuming process in terms of API responsiveness, it does provide me with all of the reporting data sources I need. I read through your scenarios and they are all doable based on the SQL "pot" that I have sitting here. See below, where I have a few "custom" tables that link up against all of the Lightspeed-native ones. So that I can tell inventory turn per-vendor, on-hands per vendor, and whatnot.


  • raphaelraphael Member Posts: 18

    @gregarican ,

    Perfect than, it's what I am looking for.

    In retail add inventory to a product on two different vendors.


    1) Try to get this information via the API (impossible , you will only have the total)

    2 ) make a sale on that product and consume all qty ( in this example3).

    In the sale you can see that the inventory is consumed on two different places. Try to find which is linked to which vendor.

    If you can do one of those, then you are right " all scenarios are doable". Otherwise. As I said in my first message. API only misses a smaaalll bit of information to make a lot of things works.

    As a developer myself, I know that it's only adding a field in the request and it won't break anything to add it. Now, I know and understand that there is a big process to approve any change but, I am kindly asking you to put in on top of the pile as it's a non-breaking change. :)

  • gregaricangregarican Member Posts: 533 
    edited September 24

    Ahhh, I see what you are talking about now! Looking at the raw data, I can query my SQL tables to see the items associated with a particular vendor. Like this example below.

    This isn't a problem. The problem is that if an item can be stocked through multiple vendors. That's the part I was missing. If you look at the dataset for an item in the API, the only field that appears is the defaultVendorID. I don't see any place to query an item for any vendors other than the default one. Since we don't run into this as a production use case I never ran into the limitation.

    Now would be a good time for a Lightspeed staffer to perhaps chime in? 😀

  • raphaelraphael Member Posts: 18

    @gregarican ,

    you looked a lot like a LightSpeed staffer to me ! aren't you?

    If not, how do you assess that SQL raw data. I would love to get my hand on an access like that :)

    So what now, we just wait for one of them to step in?

    😒

Sign In or Register to comment.