Function #25: Automatically generate purchase orders from a sales order
Function #25: Automatically generate purchase orders from a sales order
Coming to today's function, you're likely familiar with the feature in Zoho Books that allows you to raise multiple purchase orders from a sales order when item quantities are running low or depleted. If your sales order has several low-stock items that must be procured from different vendors, manually creating separate purchase orders for each vendor can become quite a time-consuming task. To streamline and simplify this process, you can set up a workflow rule that will trigger the automatic creation of purchase orders.
Here's how it works: Let's take the example of John, a retail business owner who has received an order. While he's in the process of creating the sales order, he notices 2 items whose stock levels need to be replenished to fulfill future orders. During the sales order creation in Zoho Books, John can simply use a checkbox-type custom field (specifically created for this purpose) to mark the items that need to be ordered. From that point, Zoho Books takes over.
The custom function is executed to generate purchase orders for all the marked items. The choice of vendor in the purchase orders is based on the preferred vendor assigned to each item. If there are multiple items in the sales order with the same preferred vendor, the system will consolidate these items and add them to a single purchase order.
Prerequisites:
1. Create a check box-type custom field for the items by the name "Generate PO" to be displayed in the item table of sales orders. When creating a sales order, it's necessary to tick this checkbox to initiate the creation of a purchase order for the item.
2. It's important to fill in the "Preferred vendor" field in the item details screen so that the purchase orders are raised for the corresponding vendor. Do note that the "Preferred vendor" field will be displayed only when the Purchase information of the item is enabled.
3. Create a Connection named "zbooks" to successfully execute the function. You can watch the GIF attached below to know how to create the connection.
Custom Function:
Navigate to Settings -> Automation -> Workflow Actions -> Custom Functions -> +New Custom Function > Add the function code from this
GitHub link.
Workflow Rule:
Go to Settings -> Automation -> Workflow Rules -> +New Workflow Rule and set up the workflow rule as shown below:-
In the final step of this workflow rule, associate the custom function you created and then hit Save.
This function will not just be a time-saver but also help you maintain optimum inventory levels required to fulfill customer orders.
Related Articles
Apply unused credits automatically to bills
In our ongoing series, we previously shared a custom function that automates the application of unused credits to your invoices. We've been listening to your feedback, and many of you have asked for a similar function to be applied to bills. And here ...
Navigating Zoho Books (Sales)
Zoho Books Welcome Guide Navigating Zoho Books To make it easier for you, we've put together the shortest route to navigate your way around Zoho Books. Before we get into the specifics, see where you'll find what. 1. The Navigation Panel on the ...
Price Lists
Price Lists Businesses have different strategies to sell products, some of which include giving discounts to loyal customers, or providing seasonal discounts on products. With Price Lists, you can set custom rates for the items that you buy from your ...
Tasks
Tasks Tasks are the to-dos that you and your users have to complete. In Zoho Books you can create, assign finance-related tasks to your users, mark them by priority, and send reminders. Notes: This feature is available only for certain plans of Zoho ...
Tax Settings
In Zoho Books, you can configure how the taxes should be tracked. Let’s take a look at them. TDS Tax Deducted at Source (TDS) is applied to a transaction when you deduct tax from the amount that must be paid to the vendor or collected from the ...