Custom button to create an Estimate in Zoho Books from Zoho CRM

Custom button to create an Estimate in Zoho Books from Zoho CRM

HI, I want to create a custom button called "Estimate" in the View Page of Deals Module which will create an Estimate in Zoho books. I have integrated Zoho CRM and Zoho Books and have enabled Zoho Finance Suite. I have modified the Deals module by adding a subform for product details. The subform contains the following columns, "Product Name", "Quantity", "Price", "Total Price", "Order Status" & "Reason". I want the estimate to fetch only those products whose "Order Status" is set as "Ordered" and ignore "Not Ordered".

The estimate should automatically associate itself with the deal it was created in (aka Potentials in Zoho books).

Can someone help with the deluge code? I have very basic knowledge of deluge and this function seems a bit out of reach for me, therefore I am posting here. I hope this is possible to do. 

Thank You
Manav