Recreating an inventory history

47 views
Skip to first unread message

Ken Temkin

unread,
Apr 9, 2014, 2:35:15 PM4/9/14
to merchantos-a...@googlegroups.com

Customer has asked me to develop a report that will recreate their inventory history in a specialized format.

Can someone critique my logic?

For any item, its inventory history is the sum of:

1) from the Account.OrderLine control, the quantity from the [checkedin] field with a datetime of the [timestamp] field, taken as a positive number.
2) from the Account.SaleLine control, the quantity from the [unitquantity] field with a datetime of the [timestamp] field, taken as a negative number.
3) from the Account.InventoryCountReconcile control, the quantity from the [qohchange] field with a datetime of the [createTime] field, taken as it exists in the field, either positive or negative.

So, for any item, I would have a transactional history with quantities and datetimes.

Does this look correct?
 
Thanks.

dan.s...@lightspeedretail.com

unread,
Apr 14, 2014, 3:40:47 PM4/14/14
to merchantos-a...@googlegroups.com
Hi Ken,

You should also consider updates to ItemShops in the Account.Item control for manual adjustments to inventory, breaking down boxes of items into singles (if they are using those), and I'm sure other miscellaneous adjustments. You will need to load the relation for ItemShops and somehow account for the new [qoh] value being compared to the previous value, if you need to show a difference.

There may be other situations I'm not recalling, but if you have access to a Cloud account you should definitely do some testing and see what kind of entries you see in the History tab for items and get an idea of what areas of the API you need to look at for those. Some aren't recorded nicely like you are seeing in Account.OrderLine/SaleLine, but rather just change the ItemShop entry directly.

Hope this helps!

Sandeep Balagopal

unread,
Jul 17, 2017, 9:45:25 AM7/17/17
to Lightspeed Retail API Developers
Hi Dan, 

I am trying to get full inventory details in my account. The api for listing inventory gives me inventoryID and the api for detail also give me inventoryID only. How can I get the 'qty_in' data ?. This is the api doc I am using now. http://developers.lightspeedhq.com/retail/endpoints/Inventory/
Reply all
Reply to author
Forward
0 new messages