How to trigger workflow/Custom function on adding Line-Items/products in Quote module?

How to trigger workflow/Custom function on adding Line-Items/products in Quote module?

Hi, I am working on ZOHO CRM and currently want to handle Inventory and want to make some limitations/checks on Quote module i.e. on adding line-items in Quote module records.

I have many products in Product module and there is also a field Quantity.
Now I want to restrict the user, if Quantity field's value is zero, then user could not add the product in quote. 
Or if a product has been sold out, it could not be added in quotation again / or could not shown in products that are to be sold.

Is there any way to do this?
I hope there exits such method. 
Please help me to solve this problem.

Thanks