Welcome to Portal

?Unknown\pull-down

Welcome to Zoho Cares

Bienvenido a Soporte de Zoho

Search our knowledge base, ask the community or submit a request.



Hi everyone,

Today, we'll look at how to integrate your Zoho Creator app with Zoho Books. This is one of the most popular Zoho integrations that our customers use. 

You can use this integration to automate processes like:

  • Creating quotes and invoices in Zoho Books from within Zoho Creator
  • Accessing quotes, bills, and invoices from within Zoho Creator
  • Linking bills and invoices to a project and performing profit calculations

With Deluge, you can use the built-in integration task to connect with the different modules in Zoho Books. Here are the different Zoho Book modules that we support:

  • Contacts
  • Invoices
  • Customer Payments
  • Items
  • Estimates
  • Recurring Invoices
  • Expenses

Add data to Zoho Books


You can add a record when submitting a Zoho Creator form and have it simultaneously added in Zoho Books, without re-entering the data a second time in Books. You can do this with the zoho.books.createRecord() Deluge task.

Syntax:
  1. <response> = zoho.books.createRecord(<module>, <orgID>, <params>);
Use case:

Let's say you're collecting details about your resellers using a Creator form, and you need to pass this information on to Books to send them an estimate or a sales order. That is, whenever a new reseller is added to Creator, we'd need to create a new contact in Books.

The "Add New Reseller" form has the following fields:

  • Name (single line field type)
  • Company Name (single line field type)
To create this record simultaneously in the Contacts module of Zoho Books, you need to execute the zoho.books.create() task in the On Success actions block of the "Add New Reseller" form. Thus, whenever you fill in the "Add New Reseller" form and submit it, it automatically creates a record in Zoho Books with the relevant details.

You can achieve this using the following script:

  1. resellerInfo = Map();
  2. resellerInfo.put("contact_name",input.Name);
  3. resellerInfo.put("company_name",input.Company_Name);
  4. response = zoho.books.createRecord("Contacts","<ORG ID OF ZOHO
  5. BOOKS>,resellerInfo);
For more details click here.

Fetch data from Zoho Books:

Similarly, you can fetch data from Zoho Books and have it populate a Zoho Creator form. You can achieve this by using the zoho.books.getRecords() task in Zoho Creator.

Syntax:
  1. <response> = zoho.books.getRecords (<module>, <orgID>,<search>);
Use case:

This task works if you want to fetch the list of all your product items stored in Zoho Books and populate them in a drop-down field in Zoho Creator.

The "Customer Details" form has the following fields:

  • Customer Name (single line field type)
  • Items (dropdown field type)
You can fetch the name of each item from the Items module and populate the items field using the ui.add() task. All you need to do is write the below script in the On Load action block of the Zoho Creator form.

  1. response = zoho.books.getRecords("Items",<ORG ID OF ZOHO BOOKS> );
  2. itemList= response.get("items").toJSONList();
  3. for each item in itemList
  4. {
  5. input.Items:ui.add(item.getJSON("item_name"));
  6. }
For more details on this task please click here.

Update Data in Zoho Books

Next, let's look at how to update records in Zoho Books by simply submitting a form with the relevant details in Creator. You can achieve this by using the zoho.books.updateRecord() task in Creator.

Syntax:

  1. <response> = zoho.books.updateRecord(<module>, <orgID>, <contactID>, <params>);
Use case:

Let's say you're updating the reseller information that you entered earlier using the Zoho Creator form. Now, you need to update this information in Zoho Books as well.

The "Add New Reseller" form has the following fields:

  • Name (single line field type)
  • Company Name (single line field type)
We can trigger this task with the "On Validate" action of the form.

You can achieve this using the following script:

  1. if(old.Name != input.Name // check if the Name is changed when you edited the record
  2. {
  3. search=encodeUrl(old.Name);
  4. sp1 = zoho.books.getRecords("Contacts",<ORG ID FROM
  5. BOOKS>,"contact_name=" + search);
  6. contact_id = sp1.get("contacts").get(0).getJSON("contact_id");
  7. Update_Map = Map();
  8. Update_Map.put("contact_name",input.Name);
  9. resp = zoho.books.updateRecord("Contacts",<ORG ID FROM
  10. BOOKS>,contact_id,Update_Map);
  11. }
For more details, please check here.

 

We hope this post on Zoho Books integration was useful to you. If you have any questions, feel free to add them as comments below. We'll be happy to address them all for you!

5 users like this announcement.
28 Replies
Reply
13 more

Hi Team,
Do we have option for purchase receives API integration 

  • Zoho MVP
  • 6 months ago

Hi
 ,

Thanks for the response. I have created the code as per documentation.
But facing error as below :


Purchase receives should be associated with purchase order. But I am providing the purchase order id in the json.

If possible could any provide me with the code sample?


  • 6 months ago

Hi
 ,
 

     I am facing issue with purchase receives. I have attached the error below.
  1. string PushPurchaseReceive(int id)
  2. {
  3. //getting purchase receives entry details
  4. poReceives = Procured_Material_Entry[ID == id];
  5. //getting purchase order ddetails
  6. poDetails = Purchase_Order[ID == poReceives.Purchase_Order_ID];
  7. //creating parameter for api call
  8. paramMap = Map();
  9. paramMap.put("purchaseorder_id","4442757000000350016");
  10. paramMap.put("date","2024-07-21");
  11. paramMap.put("vendor_id",poDetails.Vendor.Books_ID);
  12. itemList = List();
  13. //looping the list of items in the purchase receives
  14. for each  itemEntry in poReceives.Item_Selection
  15. {
  16. items = Map();
  17. items.put("item_id",itemEntry.Item_Name.Books_ID);
  18. orderedQty = ifNull(itemEntry.Received_Qty,0) + ifNull(itemEntry.Pending_Qty,0);
  19. items.put("item_order",orderedQty.toLong());
  20. items.put("quantity",itemEntry.Qty);
  21. itemList.add(items);
  22. }
  23. paramMap.put("line_items",itemList);
  24. //calling the api
  25. response = invokeurl
  26. [
  27. url :"https://www.zohoapis.com/inventory/v1/purchasereceives?organization_id=829392324"
  28. type :POST
  29. parameters:paramMap.toString()
  30. connection:"inventory"
  31. ];
  32. info response;
  33. return 0;
  34. }

error image:

  • Zoho MVP
  • 6 months ago

Does the purchase order exist in Zoho Inventory?

  • 5 months ago

Is there a way to fetch more than 1000 records from zoho books into a dropdown field? GetRecords can do 200 only.

  • Zoho MVP
  • 4 months ago

You could do multiple fetches and add them to a list before adding them to the dropdown.

An alternative would be to have a hidden form in the Creator Application which holds a link to the Books record, it's basically a shadow copy for lookup purposes, and then just create a lookup to this form. It would be a one way push from books to create/update the records.

  • 4 months ago

Is there a way to show monthly sales report on a Zoho Creator page?

  • Zoho MVP
  • 4 months ago

You would need to have the data stored in Creator I think. Or if you use Zoho Analyatics it can be embedded in a Creator page.

  • 4 months ago

Is there a way to populate a dropdown(custom field) in purchase order module in zoho books whenever a  material is requested in material request form in zoho creator?
zoho books custom field: material_req_id (dropdown)
zoho creator field : material request id (auto generated number)
This is what I got:
      purchase = Map();
      purchase.put("cf_material_requisition_id",input.Material_Request_ID);
      data = zoho.books.createRecord("purchaseorders","org_id",purchase,"books");
I know this is wrong.So if anyone could help, that would be great!

  • 3 months ago

Is it possible to automatically generate a purchase order in zoho books on adding a record to a form in zoho creator?

  • 3 months ago

Hello Darshana,

You can use Zoho Books deluge integration task or API call to push the data to Zoho Books upon successful form submission in Creator. You can write the script under on successful form submission in creator to push the data to Zoho books.

Good Day !

  • 3 months ago

This is the best platforms

Is there a list which shows which Zoho One applcations can internally integrate with Zoho Creator, with or without needing to write a script for it?

  • Zoho MVP
  • 3 months ago

As far as I'm aware there's no definitive "list" which shows the integrations between Zoho Creator and other Zoho One applications.


  1. There's a list of integration tasks that can be called from Deluge
    https://www.zoho.com/deluge/help/integration-tasks.html

  2. There's also the possibility of using API's to create a custom integration where the prebuilt integration tasks are not suffient
    https://www.zoho.com/deluge/help/webhook/invokeurl-api-task.html
    https://help.zoho.com/portal/en/kb/creator/developer-guide/microservices/custom-api/articles/understand-custom-apis#1_What_Does_This_Page_Cover

  3. There are integration fields which can be added to a form
    https://help.zoho.com/portal/en/kb/creator/developer-guide/forms/add-and-manage-fields/articles/fields-integration-understand#Accessing_the_field_and_searching_for_data

  4. There are integrated Forms that can be added to an application
    https://help.zoho.com/portal/en/kb/creator/developer-guide/forms/integration-forms/articles/understand-integration-forms#Integration_Forms_in_Creator

Logo

Damien Cregan

M: +353 89 213 5056
E: bccloudtech@zoho.com
A: bcCloudTech , Limerick , Ireland

www.bccloudtech.com/

linkedin icon


Reply to Sejal DattaniA
/* */
  • 12
  • Insert
  • Plain text
Add Comment
(Up to 20 MB )
    Stats
    11 followers
    28 replies
    16550 views
    Follow

    Subscribe to receive notifications from this topic.