You can track important events using the Freshchat Extract APIs. In addition to the default In-product reports, you can download reports for various other key metrics and your support SLAs within minutes as customized raw reports.


Types of Raw Reports 

You can download the following reports with Extract API,

  1. Conversation Created

  2. Conversation Agent Assigned

  3. Conversation Group Assigned

  4. Message Sent

  5. First Response Time

  6. Response Time

  7. Resolution Time

  8. Conversation Resolution Label

  9. Conversation Resolved

  10. Agent Activity

  11. Agent Intelliassign Activity

  12. CSAT Score

  13. Team performance report

  14. Interaction report


How to Download Raw Reports using Extract API?

  1. Access the API Endpoint
    Replace your domain name in the Endpoint API
    https://<Domain Name>.freshchat.com/v2/reports/raw/
    For example, if the endpoint is, https://mercasto.freshchat.com/v2/reports/raw/, ‘Mercasto’ is the domain name.
  2. Pass API Payload
    You must pass the Bearer token (API Token) in the header. To know how to get your API Token, Click here.
    Post request 
    This is the payload to be used for the Get request. For example, to get the conversation created between 12.00 AM to 11.59 PM UTC, the payload will be
{

"start": "2020-09-03T00:01:00.000Z",

"end": "2020-09-03T23:59:00.000Z",

"event": "Conversation-Created",

"format": "csv"

}


Event names to be used in the payload

Payload Event Name

Description

Conversation-Created

New conversations created

Conversation-Agent-Assigned

Conversations assigned to an agent

Conversation-Group-Assigned

Conversations assigned to a group

Message-Sent

Messages sent by agents

First-Response-Time

First response time of the conversations

Response-Time

First response time of a conversation

Resolution-Time

Resolution time of a conversation

Conversation-Resolution-Label

Conversations resolved Label

Conversation-Resolved

Conversations resolved

Agent-Activity

Agent activity in Freshchat 

Agent-Intelliassign-Activity

Agent activity in Intelliassign

CSAT-Score

CSAT Score

agent-performance

Overall view of agent performance across time periods
classic
A comprehensive view of all the details related to every interaction


Get request

To process the get request, update the Job ID in your Endpoint API.

{

“Id”: “dhc1e5bb-27sb-4d64-b20d-c7f6q63a7927”,

“link”: {

“rel”: “extracts”,

“Href”: “/reports/raw/dhc1e5bb-27sb-4d64-b20d-c7f6q63a7927”

}


In this example, “dhc1e5bb-27sb-4d64-b20d-c7f6q63a7927” is the job ID and the endpoint API will be https://mercasto.freshchat.com/v2/reports/raw/dhc1e5bb-27sb-4d64-b20d-c7f6q63a7927


After the GET request is processed, you can download the report from the URL from the code that is returned.

{

"id": "dhc1e5bb-27sb-4d64-b20d-c7f6q63a7927",

"status": "COMPLETED",

"interval": "2020-09-14 00:01:00.0 2020-09-14 23:59:00.0",

"links": [

{

"link": {

"rel": "extraction",

"href": "https://csat-reports.s3-us-east-2.amazonaws.com/extraction/52a6f9sfd9sdf553d2c8bkjhkh896b5b1203afd250f6cb3LiKQkphA09ML%2F3gfsFOusBsdfdsg%fdhgfd&dgdfg2%2BvqB64CkVv2gQMzOxjSsmEqTI%2ByMS1T0UW3G8cOKmesDhaCredential=ASIA2RGYHGREDSFSDFUCOUYXCCZ24%2F20200915%2Fus-west-2%2Fs3%2Faws4_request&X-Amz-Signature=2234e3f85d10c2d3ec434b5a97d5j8d83f6df4gf6b9f9f03d372e7026b9e3d699026abe0694730c0dd4"

},

"from": "2020-09-14T00:01:00.000Z",

"to": "2020-09-14T23:59:00.000Z",

"status": "COMPLETED"

}

]

}


Notes:

  • Raw Reports can be downloaded in CSV format only

  • The time zone used in the payload should be UTC

  • It may take an hour for reports to be generated

  • Only one POST request can be processed per minute