Articles

Zoho Deluge and Wordpress/WooCommerce API: Get All Products

What?
A quick article on retrieving all the products from a WooCommerce instance on a client's Wordpress website.

Why?
A client of ours wants the information entered against products in their WooCommerce to display on their estimates in Zoho Books; such as product image, product name, product description.

Granted that in some cases, the design should go in the other direction, as in enter the products in Zoho Inventory and this feeds the website. More than often, however, this request comes in when the customer has already been setting their Zoho environment up and the Wordpress site has the more information.

How?
So first, this article shows you how to setup an API connection, and then we'll include the code to count the total number of products, and then finallly show the code to loop through all the pages to retrieve every product from the WooCommerce system.
ZohoCreator: Using .toFile and Uploading to a Creator field

What?
This is a quick article on generating a file with the Zoho Deluge function .toFile() and uploading it to a file upload field within Zoho Creator.

Why?
The use-case here is that we want a file to be hosted within Zoho Creator for use by a JS widget that will download the CSV (in this case a Text *.txt) file for use by a dynamic auto-suggester dropdown; one of those fancy ones that includes photos and a bit of fuzzy logic.
ZohoCreator: Basic Widget with Zoho Data

What?
A follow on from my article Zoho Creator: Create a Widget which uses JavaScript back from 2020 with a few adjustments now in 2024.

This widget will only work within Zoho Creator. If you want a solution which sits on an external website and which talks to Zoho, then setup an externally hosted web app with the usual JavaScript frameworks and have it send AJAX commands to a server which reads/writes information to your Zoho instance via API. No need for the Zoho Widget SDK.
Why?
At time of print, I felt the documentation was a little sparse on how to connect a JS widget to the data held in Zoho Creator. Having this example for future use might save me some time. The following is the early version of a JS widget used for a customer and before I added all the layers of complexity, I want to have here an example that demonstrates a basic search on a table of data and returns one record as a result.

The use-case here is that we are enhancing a quote builder form in Zoho Creator. The JS widget (aka the Quote Builder) will need to post a new quote to the system as well as show previous orders.

How?
We're going to use the Zoho Extension SDK. You should refer to my previous linked article but the revised instructions here should also help. Then lastly, I'll post the snippet of code using in the widget to connect to Zoho based on a parameter passed in the URL that a Zoho Creator Page can receive and pass to the JS widget.
ZohoBooks: Error 7008: There are no contact persons associated with this Invoice

What?
A quick article on how to get around this error.

Why?
The use-case here is that I am using the send invoice API and I kept getting this error despite including the customer_id and there was a primary contact on the customer record.
This is from within ZohoCreator, requesting for an invoice in ZohoBooks to be sent.

How?
So the key here is that there were no contact persons on the customer record. Instead, when building the invoice, this had to be added (don't ever remember having to do this) as contact_ids (array/list). Instead the below script will show you how to use this API having a few email addresses as the recipients:
Zoho CRM: Client Script Confirmation Box and Popup Mailer

What?
This is an article just repeating a script from the Zoho Kaizen series allowing a confirmation box (something lacking in Zoho Creator - but that every app outside of Zoho has) as well as a popup to email from CRM with a rich-text interface.

Why?
The use-case here is non-existent. It's more of a play around to see what can be achieved and how much this can be customized. The task I've set for myself is as follows:
  • Trigger if the contact record has a tickbox called "Extra Confidential" ticked/checked=true
  • Popup a confirmation box to proceed or cancel.
  • Popup the email from CRM mailer with the to email address, bcc, subject and message content already populated.

How?
The example from the Kaizen series uses a record with canvas mode applied; but I wanted to try it without a canvas to see if we can have this functionality using the out-of-the-box ZohoCRM.
Zoho Creator: Get Images in Report to be Exported to PDF

What?
This is an article to document how to produce a report which when exported to PDF will display images without a user wall.

Why?
Our client needs to send a report to suppliers that include photos of the faulty products. These display fine in a Zoho Creator report and even show up on the preview when exporting to PDF. But when you download the PDF and view this outside of the Zoho instances, the photos don't display.

This is because the photos were just links in the Zoho Creator image field, links to another Zoho app that is behind a user wall (ie. login and password as a Zoho User).

How?
So I'll go over what happens in the real world process; then cover some technical information; and even include the function that makes it work:
ZCRM Client Script: Correct Decimal Fields OnLoad

What?
This is an article detailing the client script to fix any fields which exceed their decimal places limit in ZohoCRM.

Why?
So we have a customer that has some decimal fields on the products module that are calculated and will sometimes return numbers with more than 6 decimal places. As this is more than specified on the ZohoCRM field properties, as soon as the staff user tries to save the record, they will get a validation error on the decimal field even if that's not the field that is being changed:
Decimal places for the Unit Price field should be less than or equal to 6
.
Joellipman.com - Decimal places for the Unit Price field should be less than or equal to 6


How?
The workaround for staff is to round this up manually and then save the record. But this can be an annoying overhead, especially if it can be auto-corrected with a client script.
ZohoDesk & ZohoAnalytics: Display Ticket Attachments in Analytics Report

What?
A quick article with the code to download image attachments from a Zoho Ticket and then to upload the attachment to Zoho Analytics.

Why?
First of all, we couldn't find how to sync attachments from ZohoDesk to ZohoAnalytics using the integration. Other tables will sync but we couldn't find attachments, so our solution here is to create a data table and then to push the attachment from ZohoDesk to ZohoAnalytics using the API.

The use-case here is that a client wants customers to submit ZohoDesk tickets and upload photos of the problematic product to the ticket. They then want an Analytics report to show these photos.

How?
The following is simply the steps to create a data table in ZohoAnalytics, then the code to list a ticket's attachments and push them to the ZohoAnalytics data table.

Credit where Credit is Due:


Feel free to copy, redistribute and share this information. All that we ask is that you attribute credit and possibly even a link back to this website as it really helps in our search engine rankings.

Disclaimer: Please note that the information provided on this website is intended for informational purposes only and does not represent a warranty. The opinions expressed are those of the author only. We recommend testing any solutions in a development environment before implementing them in production. The articles are based on our good faith efforts and were current at the time of writing, reflecting our practical experience in a commercial setting.

Thank you for visiting and, as always, we hope this website was of some use to you!

Kind Regards,

Joel Lipman
www.joellipman.com

Please publish modules in offcanvas position.