Happiness Ratings Report

The happiness ratings report provides a company’s ratings for over a specified time range.

Note: The reporting endpoints are only available to Plus and Pro plans.

Request

GET /v2/reports/happiness/ratings HTTP/1.1
Authorization: Bearer oauth_token

URL Parameters

Parameter Type Examples Description
start date start=2019-05-02T12:00:00Z
Start of the interval
end date end=2019-06-02T12:00:00Z
End of the interval
previousStart date previousStart=2019-04-02T12:00:00Z
Start of the previous interval
previousEnd date previousEnd=2019-05-02T12:00:00Z
End of the previous interval
mailboxes number mailboxes=123
mailboxes=123,567
List of comma separated ids to filter on inboxes
tags number tags=99787
tags=5666,99787
List of comma separated ids to filter on tags
types enumeration types=email
List of comma separated conversation types to filter on, valid values are email, chat, phone
folders number folders=991
folders=991,992
List of comma separated folder ids to filter on folders
page number page=2
The page number
sortField enumeration sortField=number
Must be one of number, modifiedAt, rating
sortOrder enumeration sortOrder=ASC
Must be one of ASC or DESC
rating enumeration rating=great
Rating to filter on, valid values are: great, ok, all, not-good

Response

HTTP/1.1 200 OK
Content-Type: application/json

{
  "facets" : { },
  "results" : [ {
    "number" : 222043,
    "threadid" : 1169815634,
    "threadCreatedAt" : "2017-09-15T11:57:14Z",
    "id" : 432207336,
    "type" : "email",
    "ratingId" : 1,
    "ratingCustomerId" : 121198824,
    "ratingComments" : "Thanks for the clear reply, Amanda!",
    "ratingCreatedAt" : "2017-09-15T12:26:53Z",
    "ratingCustomerName" : "Alexander the Great",
    "ratingUserId" : 69013,
    "ratingUserName" : "Amanda Herrington"
  }, {
    "number" : 226983,
    "threadid" : 1169298612,
    "threadCreatedAt" : "2017-09-15T03:52:30Z",
    "id" : 432031326,
    "type" : "email",
    "ratingId" : 1,
    "ratingCustomerId" : 121972376,
    "ratingComments" : "Super helpful!",
    "ratingCreatedAt" : "2017-09-15T14:54:27Z",
    "ratingCustomerName" : "Mikey Mikelson",
    "ratingUserId" : 76859,
    "ratingUserName" : "Shawna Herring"
  } ],
  "page" : 1,
  "count" : 100,
  "pages" : 10
}

Response fields

Path Type Description
page Number The current page
pages Number The total number of pages
count Number Total number of ratings
results Array Collection of details about each rating for a given user for a given time range

Response fields

Path Type Description
number Number The conversation number
id Number The unique conversation identifier
type String The type of conversation, one of email, chat, phone
threadid Number Unique identifier for the thread associated with this rating
threadCreatedAt String Date and time when the conversation was created
ratingId Number Rating value. 1 corresponds to Great, 2 corresponds to OK, 3 corresponds to Not Good
ratingCustomerId Number Unique identifier of the customer who submitted this rating
ratingComments String Comments the customer submitted (if any)
ratingCreatedAt String Date and time when rating was created
ratingCustomerName String Name of the customer who submitted this rating
ratingUserId Number Unique identifier of the user associated with this rating
ratingUserName String Name of the user associated with this rating