User Happiness

The happiness report provides information about how many Great, Okay, and Not Good ratings a user received for each period in a specified time range. You may optionally specify two time ranges to see how happiness ratings changed between the two time ranges.

Request

GET /v2/reports/user/happiness 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

Response

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

{
  "filterTags" : [ {
    "id" : 123,
    "name" : "sample-tag"
  } ],
  "current" : {
    "ratingsPercent" : 35.77981651376147,
    "okay" : 30.909090909090907,
    "great" : 37.27272727272727,
    "happinessScore" : 5.454545454545457,
    "okayCount" : 34,
    "totalCustomersWithRatings" : 39,
    "notGoodCount" : 35,
    "ratingsCount" : 110,
    "notGood" : 31.818181818181817,
    "greatCount" : 41,
    "totalCustomers" : 109
  },
  "previous" : {
    "ratingsPercent" : 32.03047366677708,
    "great" : 31.65735567970205,
    "okay" : 36.49906890130354,
    "happinessScore" : -0.1862197392923619,
    "okayCount" : 392,
    "totalCustomersWithRatings" : 967,
    "notGoodCount" : 342,
    "ratingsCount" : 1074,
    "notGood" : 31.843575418994412,
    "greatCount" : 340,
    "totalCustomers" : 3019
  },
  "deltas" : {
    "okay" : -5.589977992212631,
    "great" : 5.615371593025223,
    "okayCount" : -91.3265306122449,
    "happinessScore" : 5.640765193837819,
    "notGoodCount" : -89.76608187134502,
    "notGood" : -0.02539360081259545,
    "greatCount" : -87.94117647058823
  }
}

Response fields

Path Type Description
filterTags Array All tags available for filtering in reports, including tag id=1, which represents conversations that are untagged
current Object Statistics about happiness ratings received for this user for the current time range
previous Object Statistics about happiness ratings received for this user for the previous time range
deltas Object Statistics about how happiness ratings received for this user changed between two time ranges

Happiness Ratings

Path Type Description
ratingsPercent Number Percentage of customers who submitted a rating
okay Number Percentage of Okay ratings received
great Number Percentage of Great ratings received
happinessScore Number This metric is calculated by subtracting the Not Good percentage from the Great percentage
okayCount Number Number of Okay ratings received
totalCustomersWithRatings Number Number of customers who submitted a rating
notGoodCount Number Number of Not Good ratings received
ratingsCount Number Number of ratings received
notGood Number Percentage of Not Good ratings received
greatCount Number Number of Great ratings received
totalCustomers Number Total number of customers, including those who did not submit a rating

Deltas

Path Type Description
okay Number Percentage change in the number of Okay ratings received
great Number Percentage change in the number of Great ratings received
happinessScore Number Percentage change in happiness score
notGood Number Percentage change in the number of Not Good ratings received
okayCount Number Percentage change in the number Okay ratings received
notGoodCount Number Percentage change in the number Not Good ratings received
greatCount Number Percentage change in the number Great ratings received