Beam Help
Get help now

How-to · Zoho CRM

How to retrieve products in Zoho

Fetch product catalog and inventory data from your Zoho account.

Retrieving products in Zoho CRM requires a valid OAuth connection and a properly refreshed access token before any API call is made — here is how our team at Beam Help (independent expert support for Zoho, not official Zoho support) walks through the process end to end.


Why this matters


When you need to pull product catalogue data from Zoho CRM — for reporting, syncing with an external system, or building a custom integration — you must first ensure your OAuth credentials are active and your API client is correctly initialised. A stale or missing token will silently block every downstream request, so understanding the token lifecycle is just as important as knowing which tool to call.


Step-by-step


Step 1. Verify your Zoho connection exists.

Before attempting to retrieve any records, confirm that a connection row exists for the relevant user in your data store. The getzohoconnection function queries zohoconnections by userid and returns None if no record is found — if that happens, the user must reconnect before proceeding. [3]


Step 2. Let the system refresh the access token automatically.

Access tokens expire, so the connection layer checks whether the current time is within 120 seconds of tokenexpiresat. If it is, ZohoOAuth.refreshtokens is called with the stored refreshtoken, and the new accesstoken plus updated tokenexpires_at are written back to the database before the connection object is returned to the caller. [3]


Step 3. Obtain a Zoho CRM API instance.

Pass the userid and apptype="crm" to getzohoapi. Internally this calls getzohoconnection (Step 1–2) and then constructs the API client using the apidomain and accesstoken from the connection record. A token_refresher callback is also wired in so that mid-request 401 errors can be recovered from without user intervention. [1]


Step 4. Execute the product retrieval tool.

With a valid API instance in hand, call executetoolwithrepair, passing the api object, apptype="crm", the appropriate tool name for products, and any filter params you need. The allowrepair=True flag lets the system attempt automatic parameter correction if the first call fails. The result is returned under the "result" key of the output dictionary. [2]


Step 5. Handle the response and build navigation links.

Once toolresult is populated, you can optionally call buildzoholinks with the result, the tool name, the params, apptype, and the dc / crmorgid values from the connection record. This produces direct "Open in Zoho" URLs that you can surface to end users alongside the product data. [8]


Step 6. Confirm OAuth scopes cover the Products module.

When the OAuth authorisation URL is first generated, the scope parameter is set from Config.ZOHO_SCOPES. If the Products module was not included in that scope string at the time the user authorised the app, API calls to that module will be rejected. You may need to revoke the existing grant and re-authorise with an updated scope list. [5]


Common pitfalls


  • Missing accesstoken after refresh. If ZohoOAuth.refreshtokens returns a dict without an "accesstoken" key, the refresh has failed (the method explicitly returns {"error": "No access token in response"} in that case). Check that your clientid, clientsecret, and refreshtoken are all correct and have not been revoked. [6]
  • apidomain mismatch. The apidomain returned during the initial OAuth code exchange (e.g. https://www.zohoapis.eu) must be stored and reused for every subsequent API call. Using the wrong regional domain will cause 404 or authentication errors even with a valid token. [5]
  • Desk orgid confusion. If you accidentally pass apptype="desk" instead of "crm", the system will attempt to initialise a ZohoDeskClient and look up a Desk organisation ID — a completely different code path that will not reach the CRM Products module. [1]
  • Concurrent request collisions. The chat endpoint uses a concurrency token (release_concurrency) to serialise requests per user. If a previous request did not release its token cleanly, subsequent product retrieval calls may queue or fail. [4]

What to check


  • Confirm the zohoconnections row for your user contains a non-empty accesstoken, a future tokenexpiresat, and the correct api_domain for your Zoho data centre. [3]
  • Verify that Config.ZOHO_SCOPES includes the necessary CRM Products scope before generating a new authorisation URL. [5]
  • After retrieval, inspect the raw tool_result dict for error keys before passing data downstream — a successful HTTP round-trip does not guarantee the payload contains product records. [2]

Sources cited

  1. [1] server.py: get_zoho_api
  2. [2] server.py: chat_plan_stream
  3. [3] server.py: get_zoho_connection
  4. [4] server.py: chat
  5. [5] zoho_oauth.py
  6. [6] server.py: chat_stream
How to retrieve products in Zoho | Beam Help — Beam Help