Beam Help
Get help now

How-to · Zoho DESK

How to access session analytics in Zoho Desk

Analyze user session data and engagement patterns.

Session analytics in Zoho Desk can be retrieved programmatically via a dedicated GET endpoint that returns engagement and interaction data for your support sessions. Here's what you need to know to call it correctly.


Why this matters


If you're building dashboards, auditing agent performance, or integrating Zoho Desk data into external reporting tools, pulling session analytics via the API is the most reliable approach. This is especially useful when you need to automate periodic data exports or surface metrics inside a custom portal. As independent expert support for Zoho (not official Zoho support), Beam Help walks you through the exact steps below.


Step-by-step


Step 1. Ensure your OAuth token includes the correct Zoho Desk scopes before making any API calls. At minimum you will need scopes such as Desk.basic.READ and Desk.settings.READ authorised for your integration. Review your OAuth configuration to confirm these are present alongside any ticket or contact scopes your app already uses. [8]


Step 2. Construct a GET request targeting the session analytics endpoint. The path you need is:


GET /api/v1/_doc/__session_analytics

This endpoint is dedicated to retrieving session analytics data from Zoho Desk. [1]


Step 3. Pass any query parameters using the p dictionary (or equivalent query string in your HTTP client). The endpoint accepts a p parameter object, which lets you filter or paginate the analytics results returned. [^1, ^2]


Step 4. In Python, the call follows this pattern:


result = client.get_session_analytics(p={"your_filter_key": "value"})

There is also a second registered operation (getsessionanalytics2) pointing to the same path — both operations issue a GET to /api/v1/doc/_sessionanalytics and accept the same p parameter structure. [2]


Step 5. Handle the response object returned by the request. The API response will contain your session analytics payload. If your integration also builds navigation links for the Zoho Desk portal, the response data can be enriched with direct portal URLs by passing the result through your link-building logic alongside the deskorgid and desk_portal identifiers. [^3, ^4]


Step 6. If you are working within a chat or assistant context, the session analytics result can be stored alongside a sessionid for later retrieval. The toolresult field in the response envelope is where the raw analytics data surfaces when called as part of a larger orchestration flow. [^4, ^6]


Common pitfalls


  • Missing OAuth scopes. The Zoho Desk OAuth scope list is extensive. If your token was generated without Desk.basic.READ or Desk.settings.READ, the analytics endpoint may return an authorisation error. Double-check your ZOHODESKSCOPES configuration and regenerate the token if needed. [8]

  • Duplicate operation names. Two operations (getsessionanalytics and getsessionanalytics2) are registered against the same endpoint path. If you are auto-generating a client from a spec, be aware that both resolve to GET /api/v1/doc/_sessionanalytics — calling either will produce the same result, but naming collisions in generated code can cause confusion. [^1, ^2]

  • Empty p parameter. The p parameter defaults to None, which is valid — the endpoint will return unfiltered results. However, if you expect paginated or date-scoped data, omitting filters may return a larger payload than anticipated. Pass explicit filter keys inside p to scope your results. [1]

  • Browser session vs. API session. Zoho Desk also maintains a browser-based session concept (tracked via zoho_tld and a saved browser session). This is separate from the analytics API session data — do not conflate the two when debugging. [7]

What to check


  • Scope coverage: Verify that your active OAuth token includes Desk.basic.READ and Desk.settings.READ at a minimum, and that the token has not expired. [8]
  • Endpoint response shape: Confirm the response body contains the analytics fields you expect; if tool_result is null or the payload is empty, check whether the p filter parameters are correctly formed. [4]
  • Organisation identifiers: Make sure deskorgid and desk_portal values are correctly set in your client configuration, as these are required for portal-linked responses to resolve properly. [3]

Sources cited

  1. [1] GET /api/v1/_doc/__session_analytics
  2. [2] GET /api/v1/_doc/__session_analytics
  3. [3] server.py: chat_plan
  4. [4] server.py: chat
  5. [5] server.py: me
  6. [6] server.py: browser_status
  7. [7] config.py
Session Analytics in Zoho Desk | Beam Help — Beam Help