Retrieving Contact Comments and History

Zoho Books API v3: Retrieving Contact Comments and History

Zoho Books API v3: Retrieving Contact Comments and History

The List Comments API is a powerful auditing tool. It returns a chronological list of all interactions and internal notes associated with a specific customer or vendor. This is essential for building "Timeline" views in custom CRMs or helpdesk integrations where support staff need to see the financial history of a contact.

At Kalki LLP, we use this endpoint to help businesses bridge the gap between their Sales and Accounts teams, ensuring everyone is aware of recent notes or automated status changes.


1. The Listing Request (GET)

To fetch the comments for a contact, you perform a GET request targeting the contact's unique ID.

Endpoint: GET /contacts/{contact_id}/comments?organization_id={organization_id}

Mandatory Headers

Header NameValueDescription
AuthorizationZoho-oauthtoken {access_token}Requires ZohoBooks.contacts.READ scope.

2. API Response Structure

The response returns a contact_comments array. Each object contains the comment text, the user who created it, and a timestamp.

Sample JSON Response:

JSON
{
"code": 0,
"message": "success",
"contact_comments": [
{
"comment_id": "460000000026101",
"contact_id": "460000000026049",
"description": "Customer requested a credit limit increase to $10,000.",
"comment_type": "manual",
"created_by": "Kalki Admin",
"date": "2023-10-25",
"date_description": "Oct 25, 2023",
"time": "14:30:00"
},
{
"comment_id": "460000000026105",
"contact_id": "460000000026049",
"description": "Email Statement sent for the period 01 Oct 2023 to 31 Oct 2023.",
"comment_type": "system",
"created_by": "System",
"date": "2023-11-01",
"date_description": "Nov 1, 2023",
"time": "09:00:00"
}
]
}

3. Implementation in Deluge (Kalki LLP Audit Script)

This script fetches the most recent comment to check if a specific "Approval" note has been added by the accounts team.

Code snippet
// Target Contact ID
contactID = "460000000026049";
orgID = "123456789";

// Execute the GET request
response = invokeurl
[
url :"https://www.zohoapis.in/books/v3/contacts/" + contactID + "/comments?organization_id=" + orgID
type :GET
connection :"kalki_books_connection"
];

if(response.get("code") == 0)
{
comments = response.get("contact_comments");
for each note in comments
{
info "Date: " + note.get("date") + " | Note: " + note.get("description");
}
}
else
{
info "Kalki Error: Could not retrieve history. " + response.get("message");
}

4. Error Logs & Troubleshooting

Error CodeMeaningFix for Kalki LLP Developers
2Invalid IDThe contact_id provided does not exist.
57UnauthorizedYour OAuth token lacks the ZohoBooks.contacts.READ scope.
6024Invalid OrgThe organization_id does not match the contact's context.
Empty ListNo CommentsThe contact exists but has no manual notes or system history yet.

5. Strategic Advantage: The "Audit Trail"

For kalkillp.com clients, retrieving comments provides three key benefits:

  1. Compliance: Maintain a clear record of who modified a contact's tax details or payment terms.

  2. Internal Communication: Enable support staff to see if an invoice reminder was sent or if a customer was manually marked as inactive.

  3. Automation Intelligence: Use the existence of certain keywords in the history to trigger external workflows (e.g., if "Dispute" appears in a comment, notify a senior account manager).


Visualize Your Business History with Kalki LLP

Financial data is only half the story; the history of your interactions tells the rest. Kalki LLP specializes in extracting these logs to build comprehensive 360-degree views of your customers, ensuring your team has every detail they need to provide excellent service.

    • Related Articles

    • Zoho Books vs Tally: Which is Right for Your Business in 2025?

      Overview: Why Compare Zoho Books and Tally in 2025? In 2025, modern businesses are moving fast—and their accounting software needs to keep up. Two widely used solutions in India are Tally and Zoho Books, but they differ significantly in approach, ...
    • Zoho Books API v3: Retrieving Detailed Contact Information

      Zoho Books API v3: Retrieving Detailed Contact Information The Get a Contact API is the standard method for fetching the "Single Source of Truth" for a specific entity in your ledger. It returns a comprehensive JSON object that includes everything ...
    • Zoho Books API v3: Retrieving Unused Retainer Payments

      Zoho Books API v3: Retrieving Unused Retainer Payments The Get Unused Retainer Payments API returns a list of all retainer payments associated with a specific contact that have a remaining balance. This is essential for workflows where you want to ...
    • Trigger Assignment and Workflow Rules in Zoho CRM via Deluge & API

      How to Trigger Workflow Rules in Zoho CRM Using Deluge When working with Zoho CRM automation, records created, updated, or deleted via Deluge do not trigger workflow or assignment rules automatically. This is expected behavior. Zoho CRM separates ...
    • Zoho Books API v3: Listing Refunds for a Contact

      Zoho Books API v3: Listing Refunds for a Contact The List Refunds API allows you to retrieve a history of all payment refunds issued to a specific customer or received from a vendor. This endpoint provides granular details on refund dates, amounts, ...