User Happiness drilldown

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

Request

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

URL Parameters

Parameter Description
user User for whom the report is generated
start Start of the interval
end End of the interval
previousStart Start of the previous interval
previousEnd End of the previous interval
mailboxes List of comma separated ids to filter on mailboxes
tags List of comma separated ids to filter on tags
types List of comma separated conversation types to filter on, valid values are email, chat, phone
folders List of comma separated folder ids to filter on folders
page The page number
sortFieldRatings Must be one of number, modifiedAt, rating
sortOrder Must be one of ASC or DESC
rating Rating to filter on, valid values are: great, ok, all, not-good

Response

HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8

{
  "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

Rating

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 Unique identifier of the rating
[].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