Developing Application in ZOHO Creator Aditya Zutshi, MBA I Year, Vinod Gupta School of Management, IIT Kharagpur Problem Statement: Your company sells a fixed number of items each of which has a fixed price and at any point of time there is a certain quantity of each item in the inventory. Your salespersons are out in the market and meet clients to pick up orders. They can pick up an order if and only if the required amount is available in the inventory. When an order is picked up the quantity in the inventory has to be reduced. If the order falls below a certain quantity, a re-stocking mail has to be generated. After an order is placed, cash has to be collected against the order. Once the cash is collected, the order is tagged is paid. As the owner-manager you would like to know what are the orders that have been placed, what is the inventory? What is the accounts receivable position?
Step 1: Create an application.
Step 2: Import Data by clicking on the Import XLS Green Button. You can import an excel sheet or paste the tabular data directly.
Step 3: Make a Form by dragging and dropping page elements as required from the left column.
Step 4: Click on the “Script� Tab on the top. You can add your script for different events. Step 5: For Order to Cash Application, under the on Add event, on Load, you can mention the fields that you want to be visible, hidden, enabled or hidden.
For my application, the script is as follows: hide Quantity_Available; hide Salesperson_Name; hide Reorder_Point; hide Quantity_to_Order; hide Product_Price; hide ClientsName; hide Product_ID; disable Product_ID; disable Product_Price; disable Quantity_Available; disable Reorder_Point; disable Quantity_to_Order; disable ClientsName; disable Salesperson_Name;
Step 6: In the Field Actions, you can script how the applications behaves when the user enters an input.
The script for my application is as follows: if (input.Product_Name == "Lux Soap") { show Product_ID; show Product_Price; show Quantity_Available; show ClientsName; show Salesperson_Name; show Quantity_to_Order; Current = Order_To_Cash_Form [Product_Name == input.Product_Name]; input.Product_ID = Current.Product_ID; input.Product_Price = Current.Product_Price; input.Quantity_Available = Current.Quantity_Available;
input.Reorder_Point = Current.Reorder_Point; enable Quantity_to_Order; enable ClientsName; enable Salesperson_Name; } if (input.Product_Name == "Head & Shoulders Shampoo") { show Product_ID; show Product_Price; show Quantity_Available; show ClientsName; show Salesperson_Name; show Quantity_to_Order; Current = Order_To_Cash_Form [Product_Name == input.Product_Name]; input.Product_ID = Current.Product_ID; input.Product_Price = Current.Product_Price; input.Quantity_Available = Current.Quantity_Available; input.Reorder_Point = Current.Reorder_Point; enable Quantity_to_Order; enable ClientsName; enable Salesperson_Name; } if (input.Product_Name == "AXE Deo") { show Product_ID; show Product_Price; show Quantity_Available;
show ClientsName; show Salesperson_Name; show Quantity_to_Order; Current = Order_To_Cash_Form [Product_Name == input.Product_Name]; input.Product_ID = Current.Product_ID; input.Product_Price = Current.Product_Price; input.Quantity_Available = Current.Quantity_Available; input.Reorder_Point = Current.Reorder_Point; enable Quantity_to_Order; enable ClientsName; enable Salesperson_Name; } if (input.Product_Name == "Garnier Creame") { show Product_ID; show Product_Price; show Quantity_Available; show ClientsName; show Salesperson_Name; show Quantity_to_Order; Current = Order_To_Cash_Form [Product_Name == input.Product_Name]; input.Product_ID = Current.Product_ID; input.Product_Price = Current.Product_Price; input.Quantity_Available = Current.Quantity_Available; input.Reorder_Point = Current.Reorder_Point; enable Quantity_to_Order; enable ClientsName;
enable Salesperson_Name; } if (input.Product_Name == "Pepsodent Toothpaste") { show Product_ID; show Product_Price; show Quantity_Available; show ClientsName; show Salesperson_Name; show Quantity_to_Order; Current = Order_To_Cash_Form [Product_Name == input.Product_Name]; input.Product_ID = Current.Product_ID; input.Product_Price = Current.Product_Price; input.Quantity_Available = Current.Quantity_Available; input.Reorder_Point = Current.Reorder_Point; enable Quantity_to_Order; enable ClientsName; enable Salesperson_Name; }
Step 7: Similarly you can add the script to run when a user inputs the Quantity to Order.
The script for my application is as follows: //You can drag and drop tasks from the immediate left pane //Below is the SAMPLE script for dynamic, condition based field manipulation qtor = Order_To_Cash_Form [Product_Name == input.Product_Name]; //qtor.Quantity_to_Order = input.Quantity_to_Order; if (qtor.Quantity_Available < input.Quantity_to_Order) { alert("You don't have enough stock. You can buy only " + input.Quantity_Available + " items"); //qtor = Order_To_Cash_Form [Product_Name == input.Product_Name]; reload; } else { qtor.Quantity_to_Order = input.Quantity_to_Order; qtor.Quantity_Available = (input.Quantity_Available - input.Quantity_to_Order);
alert("Your order has been placed. Transaction Successful. A record has been created in the Order Book and the stock has been updated in Order To Cash Form."); if (qtor.Quantity_Available <= qtor.Reorder_Point) { alert("Your stock is very less. A request to replenish the stock has been sent."); alert("Stock Replenished by 30 Units"); qtor.Quantity_Available = (qtor.Quantity_Available + 30); } reload; amount = (input.Product_Price * input.Quantity_to_Order); insert into Order_Book [ Added_User = zoho.loginuser Client_s_Name = input.ClientsName Date_field = zoho.currentdate Payment_Status = "Not Paid" Product_ID = input.Product_ID Purchase_Amount = amount Quantity = input.Quantity_to_Order Salesperson_Name = input.Salesperson_Name ] }
Step 8: Once you have finished the scripting, click on the â&#x20AC;&#x153;Shareâ&#x20AC;? Tab on the top and make the application public.
Step 9: Get the embed code and publish it on your blog!
Step 10: And the final application looks like this:
Product Name * Product ID Product Price Quantity Available Client's Name Salesperson Name Quantity to Order Powered by
Submit
Reset
My application is running on: http://www.adityazutshi.com/2010/03/order-to-cash-application-sales.html View the application with this tutorial. Good Luck!