Whether Tickets API returns conversation_count data for each ticket

Hi Team,

Below are my queries,

  1. Whether list tickets API returns conversation_count data for each ticket Or Is there any other APIs where it shows the conversation_count metric for tickets ?

  2. How to know what are the new conversations added/updated for a ticket/tickets after certain timestamp via API ?

Kindly help

Hi Haritha,
Unfortunately I believe that the answer to the first question is no, the only way to recover the conversations and their number is to do it for each ticket by scrolling through the pages using /api/v2/tickets/{id}/conversations?page=1&per_page=100 or using /api/v2/tickets/{id}?include=conversations.

For the second question the sorting is given by the creation date, but you can use the created_at and updated_at fields to filter the items after executing the api request. Unfortunately, I believe it is not possible to add a parameter like ?_updated_since=...

2 Likes

Thanks for the response @Mattia_Piparo

Below are few more queries in related to my previous queries,

  1. When a conversation is added to a ticket, whether that ticket updated_at value also will be updated?
  2. Also if any activity happens in a ticket, whether that ticket’s updated_at field will be the last activity time ?
  3. Is there an API where we can view particular conversation of a ticket ?

Kindly help

Yes.

Yes.

No, in GET you can only retrieve them as a list, but in any case all the information necessary for any filters etc. is present.

[
    {
        "attachments": [
        ],
        "auto_response": false,
        "automation_id": null,
        "automation_type_id": null,
        "bcc_emails": null,
        "body": "<p>Hello World!<p>",
        "body_text": "Hello World!",
        "category": 2,
        "cc_emails": [
        ],
        "created_at": "2023-09-11T14:34:15Z",
        "email_failure_count": null,
        "from_email": null,
        "id": 101364303911,
        "incoming": false,
        "last_edited_at": null,
        "last_edited_user_id": null,
        "outgoing_failures": null,
        "private": true,
        "source": 2,
        "source_additional_info": null,
        "support_email": null,
        "thread_id": null,
        "thread_message_id": null,
        "ticket_id": 1646,
        "to_emails": [
        ],
        "updated_at": "2023-09-11T14:34:15Z",
        "user_id": 101432239577
    }
]
2 Likes

Hi,

Thanks for reaching out.

The list tickets API does not return the conversation_count data for each ticket. However, you can use the get ticket API to get the conversation_count data for a specific ticket.

To know what are the new conversations added/updated for a ticket/tickets after certain timestamp via API, you can use the following steps:

  1. Use the list tickets API to get a list of all tickets that were created or updated after the specified timestamp.
  2. For each ticket in the list, use the get ticket API to get the conversation_count data.

Here is an example of how you can use the list tickets API to get a list of all tickets that were created or updated after the specified timestamp:

curl -X GET https://api.freshworks.com/helpdesk/v2/tickets?updated_after=2023-09-13T00:00:00Z

Here is an example of how you can use the get ticket API to get the conversation_count data for a specific ticket:

curl -X GET https://api.freshworks.com/helpdesk/v2/tickets/1234567890

I hope this helps!

Let me know if you have any other questions.

Best, Syed Asgar Ahmed

Thanks @Mattia_Piparo , It helps.

Hi @syedasgarahmed, Thanks for your reply but I was looking for answers related to freshdesk not freshworks.

This topic was automatically closed 6 days after the last reply. New replies are no longer allowed.