Inventory Update using Deluge

Inventory Update using Deluge

Hi,
Can someone share the code on how to update Stock after product is Dispatched automatically

Ex:
I have 
Design No., Shade and Meter 
in stock
and i would like to update them on Dispatch.

I tried but i am not able to find an answer for that.
Please help me ASAP