Page 1 of 1

Stock changed event

PostPosted: Tue May 01, 2018 3:18 pm
by minhhieu106
Hi Mike,

Are there have any event to capture the change of stock on Jiwa? Same webhooks event.

Thanks,
Hieu

Re: Stock changed event

PostPosted: Sun May 06, 2018 3:21 pm
by Mike.Sheen
Hi Hieu,

We don't currently have a simple way of detecting stock level changes as we don't have any central stock adjustment logic - but I'm working on providing something which will hopefully suit your needs. It involves intercepting the business logic save events of any business logic which involves stock movements (sales orders, GRN, transfers, et cetera) - so stay tuned.

In the meantime you can periodically poll for the stock levels for all products if that is any help?

Mike

Re: Stock changed event  Topic is solved

PostPosted: Wed May 16, 2018 5:42 pm
by Mike.Sheen
Hi Hieu,

I've added a webhook to 07.01.01 for stock levels changing - DEV-6617 - I had to modify everywhere in Jiwa which alters stock levels to raise a specific event so a webhook could be invoked - so it's not something you can implement before 07.01.01.00.

Mike

Re: Stock changed event

PostPosted: Wed May 16, 2018 8:47 pm
by minhhieu106
That's great!

Thank you Mike

Re: Stock changed event

PostPosted: Tue Jan 15, 2019 1:58 am
by minhhieu106
Hi Mike,

Now i got the new webhook event inventory.stocklevel but on this event only return Inventory ID and Warehouse ID.

Can we return more information such as stock in, stock out, stock onhand for this product? This information is used for integration with iVend system.

Thank you.
Hieu

Re: Stock changed event

PostPosted: Tue Jan 15, 2019 9:08 am
by Mike.Sheen
minhhieu106 wrote:Now i got the new webhook event inventory.stocklevel but on this event only return Inventory ID and Warehouse ID.

Can we return more information such as stock in, stock out, stock onhand for this product?


Not without making some significant changes.

Most of the time when we adjust stock resulting in the webhook inventory.stocklevel being invoked we don't know the stock level ourselves - we simply adjust stock levels upwards or downwards - eg:
Code: Select all
UPDATE IN_WarehouseSOH SET QuantityLeft = QuantityLeft - {0} WHERE InventoryID = {1} AND IN_LogicalID = {2}


What you can do, however, is when you receive the webhook perform a GET on our API to retrieve the stock level or any other information you are interested in.

Mike