User Happiness drilldown

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

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

Request

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

URL Parameters

Parameter Type Examples Description
user number user=447723
User for whom the report is generated
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 mailboxes
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

{
  "results" : [ {
    "number" : 214705,
    "threadid" : 1149512066,
    "threadCreatedAt" : "2017-09-02T11:21:42Z",
    "id" : 424890237,
    "type" : "email",
    "ratingId" : 1,
    "ratingCustomerId" : 141147564,
    "ratingComments" : "Nice work!",
    "ratingCreatedAt" : "2017-09-02T11:23:43Z",
    "ratingCustomerName" : "david@loans.net",
    "ratingUserId" : 19,
    "ratingUserName" : "Denny Matthews"
  }, {
    "number" : 224713,
    "threadid" : 1149511394,
    "threadCreatedAt" : "2017-09-02T11:20:31Z",
    "id" : 424910211,
    "type" : "email",
    "ratingId" : 1,
    "ratingCustomerId" : 79911899,
    "ratingComments" : "Great job",
    "ratingCreatedAt" : "2017-09-02T11:28:47Z",
    "ratingCustomerName" : "Robert Johnson",
    "ratingUserId" : 4,
    "ratingUserName" : "Robert Swindle"
  } ],
  "page" : 1,
  "count" : 165,
  "pages" : 17
}

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