Products

Wellbeing Score

The Wellbeing Score offers a comprehensive assessment of an individual's overall wellbeing by combining insights from both activity and sleep data. By analyzing factors such as physical activity levels and sleep quality, it provides a holistic view of the user's health and lifestyle balance. This score helps users understand how their daily habits contribute to their overall wellbeing and identify areas for improvement.

At-a-Glance: Wellbeing Score

Aspect Details
Score type wellbeing
score range 0.0 - 1.0
Possible states minimal, low, medium, high
Contributing factors steps, active_hours, active_calories, intense_activity_duration, extended_inactivity, floors_climbed, sleep_duration, sleep_regularity, sleep_continuity, sleep_debt, circadian_alignment, physical_recovery, mental_recovery
Supported dataSources age, gender, activity, exercise, sleep
Latest version 1.0
Status PRODUCTION

Example JSON Response

{
"id": "a1b2c3d4-e5f6-1234-efgh-ij1234567890",
"profileId": "p1q2r3s4-t5u6-7890-vwxy-z1234567890",
"accountId": "x1y2z3a4-b5c6-7890-dfgh-i1234567890",
"externalId": "e1f2g3h4",
"type": "wellbeing",
"score": 0.85,
"state": "high",
"factors": [
{ "name": "steps", "value": 9000, "goal": 10000, "unit": "count", "score": 0.90, "state": "high" },
{ "name": "active_hours", "value": 10, "goal": 12, "unit": "hour", "score": 0.83, "state": "high" },
{ "name": "active_calories", "value": 450, "goal": 500, "unit": "kcal", "score": 0.90, "state": "high" },
{ "name": "intense_activity_duration", "value": 100, "goal": 150, "unit": "minute", "score": 0.67, "state": "medium" },
{ "name": "extended_inactivity", "value": 2, "goal": 0, "unit": "hour", "score": 0.80, "state": "high" },
{ "name": "floors_climbed", "value": 7, "goal": 10, "unit": "floor", "score": 0.70, "state": "medium" },
{ "name": "sleep_duration", "value": 480, "goal": 480, "unit": "minute", "score": 1.00, "state": "high" },
{ "name": "sleep_regularity", "value": 85, "goal": 100, "unit": "percent", "score": 0.85, "state": "high" },
{ "name": "sleep_continuity", "value": 5, "goal": 0, "unit": "minute", "score": 0.90, "state": "high" },
{ "name": "sleep_debt", "value": 0, "goal": 0, "unit": "minute", "score": 1.00, "state": "high" },
{ "name": "circadian_alignment", "value": 90, "goal": 100, "unit": "percent", "score": 0.90, "state": "high" },
{ "name": "physical_recovery", "value": 120, "goal": 100, "unit": "minute", "score": 1.00, "state": "high" },
{ "name": "mental_recovery", "value": 110, "goal": 100, "unit": "minute", "score": 1.00, "state": "high" }
],
"dataSources": ["age", "activity", "exercise", "sleep", "vitals"],
"scoreDateTime": "2023-11-11T00:00:00+02:00",
"createdAt": "2023-11-11T11:05:41.644Z",
"version": 1.0
}

For a breakdown of each field in the JSON response, please refer to the output schema on the health scores homepage.


Understanding the Wellbeing Score

The Wellbeing Score measures an individual's overall health by integrating insights from both activity and sleep data. It reflects the interplay between physical activity and sleep quality, providing a holistic view of the user's health and lifestyle balance.

Important Note

For a detailed explanation of how the Wellbeing Score works and recommendations to improve it, please refer to Wellbeing Score Explained .


Interpreting the Score

The higher the Wellbeing Score, the better the overall health and lifestyle balance.

  • 0.81 - 1.00 (High) : Excellent sleep quality and physical activity levels.
  • 0.66 - 0.80 (Medium) : Good sleep and activity patterns with some room for improvement.
  • 0.51 - 0.65 (Low) : Suboptimal sleep or activity levels; attention needed to enhance wellbeing.
  • 0.00 - 0.50 (Minimal) : Poor sleep and activity patterns; significant changes required for health improvement.

Factors in Wellbeing Score

The Wellbeing Score is calculated using several factors from both the Activity and Sleep Scores, providing an integrated view of behavioral health:

Factor Description Data Sources Requires Wearable
Steps Total number of steps taken throughout the day. Activity No
Active Hours Number of hours with recorded activity or exercise. Activity, Exercise No
Active Calories Total calories burned during active periods. Activity, Exercise No
Intense Activity Duration Duration of moderate to vigorous physical activity. Activity, Exercise No
Extended Inactivity Amount of time spent sedentary without breaks. Activity No
Floors Climbed Number of floors climbed throughout the day. Activity No
Sleep Duration Total amount of sleep obtained during the night. Sleep No
Sleep Regularity Consistency of bed and wake times across days. Sleep No
Sleep Continuity Measure of how uninterrupted and restful the sleep period is, assessed by restlessness and awakenings. Sleep Yes
Sleep Debt Accumulated shortfall of sleep relative to an individual's sleep needs over time. Sleep No
Circadian Alignment Alignment of sleep timing with an individual's circadian rhythm. Sleep No
Physical Recovery Duration and timing of deep sleep cycles (slow-wave sleep). Sleep Yes
Mental Recovery Duration and timing of REM sleep cycles. Sleep Yes

Data Requirements

The Wellbeing Score calculation relies on activity, exercise, and sleep data. Below are the detailed requirements:

Full Data Types Needed:

  • Activity Data: Steps, floors climbed.
  • Exercise Data: Exercise sessions (active calories burned, intense activity duration).
  • Sleep Data: Bed and wake times, sleep stages (light, deep, REM).

Minimum Data Required:

A minimum of four contributing factors from both activity and sleep data are required to compute a reliable Wellbeing Score. The essential data includes:

  • Activity Data: Steps.
  • Sleep Data: Bed and wake times.

Permissions Needed:

Platform Permissions
Apple HealthKit (HK) stepCount, HKWorkout, sleepAnalysis, flightsClimbed
Google Health Connect (HC) steps, ExerciseSession, SleepSession, floorsClimbed

Handling Missing Data:

  • If certain data points are missing (e.g., no sleep stage data), the related factors will be returned as null.
  • The Wellbeing Score adjusts for missing data when possible. However, if there aren’t enough factors to compute a reliable score (less than four factors available), the score itself will be returned as null.

Integrating the Wellbeing Score

To start receiving the Wellbeing Score, set up webhooks (recommended) or use the API. You can also display the score in your application using the UI widgets.

Webhooks

  1. In the dashboard , navigate to Webhooks > Create new Webhook > Health Scores > tick the Wellbeing Score box > paste in your destination URL.
  2. Once a Wellbeing Score is generated, the webhook will automatically forward the event to your data store.

API

Retrieve Wellbeing Scores for a profile within a specific time window:

  • Endpoint : GET /api/v1/profile/score

  • Authorization : Bearer token

  • Parameters :

    • types: list of types (e.g., wellbeing)
    • startDateTime: Start date-time (ISO format)
    • endDateTime: End date-time (ISO format)
    • version: version of the score algorithm (default: 1)
  • Responses :

    • 200 : Returns Wellbeing Scores with details like id, type, state, score, factors, dataSources, scoreDateTime.
    • 400 : Invalid profile ID.
    • 401 : Invalid token.
  • Example Request :

    curl -X GET "https://api.sahha.ai/v1/profile/score?types=wellbeing&startDateTime=2024-08-01T00:00:00Z&endDateTime=2024-08-31T23:59:59Z" \
    -H "Authorization: Bearer YOUR_ACCESS_TOKEN"

For further details, refer to the API reference .


UI Widgets

You can also make use of UI Widgets to display the Wellbeing Score.

  1. Configure your app to utilize the widgets using the UI Widgets Guide .

  2. Once configured, simply paste the URL for the widget of your choice, which can be any of:

    /arc − displays the score as an arc.

    /factors − displays a list of the factors.

    /chart − displays the scores over time.


Best Practices

Follow these best practices to ensure accurate interpretation and effective use of the Wellbeing Score:

  1. Data Accuracy : Encourage users to keep their activity and sleep tracking devices calibrated and used consistently.
  2. Wearable Devices : While not mandatory, wearables can provide more detailed data, enhancing the accuracy of the score.
  3. Personalized Feedback : Use the factors to provide personalized recommendations to users for improving their sleep and activity habits.
  4. Holistic Approach : Encourage users to consider the Wellbeing Score alongside other health indicators for a comprehensive view of their overall health.

Frequently Asked Questions (FAQs)

Q: Can I use the Wellbeing Score without a wearable device?

A: Yes, the Wellbeing Score can be calculated using data from a smartphone, such as steps and sleep patterns. However, some factors like physical and mental recovery require sleep stage data typically obtained from wearables. For a more comprehensive analysis, a wearable device is recommended.

Q: How can I improve my Wellbeing Score?

A: Enhance your Wellbeing Score by focusing on improving both your sleep quality and physical activity levels. Regular and consistent improvements in these areas will positively influence your overall wellbeing.

Q: What does a high Wellbeing Score signify?

A: A high Wellbeing Score signifies excellent sleep quality combined with a healthy, active lifestyle, indicating a positive state of overall health and wellbeing.

Q: Can the Wellbeing Score fluctuate based on one aspect (sleep or activity) more than the other?

A: Yes, the Wellbeing Score can fluctuate if there's a significant change in either sleep quality or physical activity levels. Both factors contribute to the overall score, emphasizing the importance of balance in maintaining holistic health.