ZoHo Desk - Custom Function - Retrieving Latest Comment

ZoHo Desk - Custom Function - Retrieving Latest Comment

Hello All,

I currently have a custom function that searches the most recent thread within a ZoHo ticket for specific keywords.


See below excerpt where latestThread is defined

  1.     latestThread = invokeurl
        [
            url :deskURL + "/api/v1/tickets/" + ticketId + "/latestThread?include=plainText"
            type :GET
            headers:{"featureFlags":"blockQuoteContent"}
            connection:"deskconnection"
        ];

In the API documentation, i do see a section on latestThread




I'm wondering if there is similar code that I could use to retrieve the most recent comment on a thread.


I see documentation to list all comments, maybe there is a way to sort by latest comment and limit to 1?


would something like the below achieve this?

    1.     latestComment = invokeurl
          [
              url :deskURL + "/api/v1/tickets/" + ticketId + "/comments?&limit=1&include=plainText&limit=1"
              type :GET
              headers:{"featureFlags":"blockQuoteContent"}
              connection:"deskconnection"
          ];

Thanks,
Chris
    Zoho Desk Resources

    • Desk Community Learning Series


    • Digest


    • Functions


    • Meetups


    • Kbase


    • Resources


    • Glossary


    • Desk Marketplace


    • MVP Corner


    • Word of the Day


      Zoho CRM Plus Resources

        Zoho Books Resources


          Zoho Subscriptions Resources

            Zoho Projects Resources


              Zoho Sprints Resources


                Zoho Orchestly Resources


                  Zoho Creator Resources


                    Zoho WorkDrive Resources



                      Zoho Campaigns Resources

                        Zoho CRM Resources

                        • CRM Community Learning Series

                          CRM Community Learning Series


                        • Tips

                          Tips

                        • Functions

                          Functions

                        • Meetups

                          Meetups

                        • Kbase

                          Kbase

                        • Resources

                          Resources

                        • Digest

                          Digest

                        • CRM Marketplace

                          CRM Marketplace

                        • MVP Corner

                          MVP Corner




                          Zoho Writer Writer

                          Get Started. Write Away!

                          Writer is a powerful online word processor, designed for collaborative work.

                            Zoho CRM コンテンツ




                              ご検討中の方