Beam Help
Get help now

How-to · Zoho CRM

How to get a purchase order in Zoho CRM

Retrieve detailed purchase order information by ID.

Purchase orders are not a native feature of Zoho CRM itself — they live in Zoho Books/Inventory — but you can surface them inside your CRM workflow through automation and integration.


Why this matters


Zoho CRM manages your sales pipeline, quotes, and deals, while purchase order creation belongs to Zoho Books or Zoho Inventory. Sales teams often need visibility into procurement without leaving CRM, and manually switching between apps to raise POs wastes time. Setting up the right automation means POs are generated the moment a sales order is confirmed, keeping inventory levels healthy and fulfillment on track. [4]


---


Step-by-step


The most reliable path is to trigger purchase order creation automatically from a sales order in Zoho Books, using a custom function and workflow rule. Here is how our team at Beam Help (independent expert support for Zoho — not official Zoho support) recommends approaching it.


---


Step 1. Enable Purchase Information on your items


In Zoho Books, open each item record and make sure the Purchase information section is enabled. This unlocks the Preferred Vendor field, which the automation relies on to decide which vendor receives each PO. Without a preferred vendor assigned, the function cannot route items correctly. [7]


---


Step 2. Create a checkbox custom field called "Generate PO"


Navigate to your Zoho Books item settings and create a checkbox-type custom field named *Generate PO*. This field must be configured to appear in the item table of sales orders. When a sales order is being created, the user ticks this checkbox against any line item that needs to be procured, signalling the automation to act on that item. [7]


---


Step 3. Create a connection named "zbooks"


Go to Settings → Automation → Connections in Zoho Books and create a new connection. Name it exactly *zbooks* — the custom function references this connection name directly, so a different name will cause the function to fail. [7]


---


Step 4. Add the custom function


Navigate to Settings → Automation → Workflow Actions → Custom Functions and click + New Custom Function. Paste in the function code available from the official Zoho Finance automation samples repository on GitHub (referenced in the Zoho community post for Function #25). The logic works as follows: it reads all line items in the sales order that have the *Generate PO* checkbox ticked, looks up the preferred vendor for each item, and then consolidates items sharing the same vendor into a single purchase order rather than creating duplicates. [2] [7]


---


Step 5. Create a workflow rule to trigger the function


Go to Settings → Automation → Workflow Rules and click + New Workflow Rule. Set the rule to fire on the relevant sales order event (for example, when a sales order is created or confirmed). In the final step of the rule configuration, associate the custom function you created in Step 4, then save. From this point, Zoho Books handles PO generation automatically whenever the rule fires. [7]


---


Step 6. Connect Zoho CRM to the workflow (optional visibility)


If your team works primarily in Zoho CRM and needs to see the resulting purchase orders, you can extend visibility by integrating Zoho CRM with Zoho Books. Once a sales order flows from CRM into Zoho Books (via the native CRM–Books integration), the automation above fires and the PO is created. Customer details, products, quantities, and pricing all move from CRM through to your operations team without manual re-entry. [4]


For field-service scenarios, Zoho FSM can also feed into this chain: a work order in FSM can automatically generate a sales order in Zoho Books, which in turn triggers the PO workflow described above. [3]


---


Common pitfalls


  • Missing preferred vendor: If the *Preferred Vendor* field is blank on an item, the function has no vendor to assign the PO to and will skip that line item. Always populate preferred vendors before relying on this automation. [7]
  • Wrong connection name: The connection must be named *zbooks* exactly. A typo or different capitalisation will break the custom function execution. [7]
  • Checkbox not ticked at order creation: The *Generate PO* checkbox must be ticked on each relevant line item at the time the sales order is saved. Editing the sales order afterwards and ticking the box will not retroactively fire the workflow unless the rule is also configured to trigger on edits. [2]
  • Inventory tracking not enabled: The sales-order-to-PO path requires inventory tracking to be active in Zoho Books (Settings → Module Settings → General → Items → Enable Inventory Tracking). Without it, stock-level logic will not function correctly. [3]

---


What to check


  • Confirm that every item involved has a Preferred Vendor assigned and that Purchase Information is enabled on the item record. [7]
  • Verify the workflow rule is in Active status and that the custom function is correctly associated as the final workflow action. [7]
  • After a test sales order is created with the *Generate PO* checkbox ticked, check Purchases → Purchase Orders in Zoho Books to confirm the PO was generated and the vendor assignment is correct. [2]

Sources cited

  1. [1] Zoho FSM | Zoho CRM | Knowledge Base
  2. [2] Function #25: Automatically generate purchase orders from a sales order
  3. [3] Work Order to Sales Order Conversion
  4. [4] Convert your shoppers to customers
  5. [5] Zoho FSM | Zoho Books | Knowledge Base
  6. [6] Hi, how can we help?
  7. [7] What's new on Zoho Marketplace in October 2022
Get Purchase Order in Zoho CRM | Beam Help