Skip to content

Points levels#38

Merged
cbrinicombe13 merged 4 commits intomainfrom
points-levels
Mar 25, 2026
Merged

Points levels#38
cbrinicombe13 merged 4 commits intomainfrom
points-levels

Conversation

@cbrinicombe13
Copy link
Member

  • Add docs for points levels
  • Update badge docs to also describe custom URL option

@mintlify
Copy link

mintlify bot commented Mar 24, 2026

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated (UTC)
trophy 🟢 Ready View Preview Mar 24, 2026, 11:48 PM

src="../assets/guides/example-apps/example-fitness-app/points-triggers.png"
/>
</Frame>

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if we're updating the guide here, we should also update the actual fitness platform repo right? were you gonna do that or should I

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess we can do yeah, do you wanna do it since you built it and probably know it better than me?


Points levels are discrete milestones you define on a points system in Trophy.

Each level has a threshold that when a user's total points in that system reaches (through the [points triggers](#points-triggers) you configure), Trophy assigns them that level automatically. You do not need to maintain tier logic in your own codebase.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Each level has a threshold. When a user's total points in the system exceeds this threshold, Trophy assigns them that level automatically. You do not need to maintain tier logic in your own codebase.


Each level has a threshold that when a user's total points in that system reaches (through the [points triggers](#points-triggers) you configure), Trophy assigns them that level automatically. You do not need to maintain tier logic in your own codebase.

Use levels for rank tiers, progression UI, messaging when someone advances, or analytics. Trophy keeps each user's current level in sync whenever they earn or lose points in that system.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use levels for rank tiers, progression UI, reward tiers, or analytics. Trophy keeps each user's current level in sync whenever they earn or lose points in that system.


### Configuring levels

To set up levels for a points system, open it from the [points page](https://app.trophy.so/points) in the Trophy dashboard and use the levels tab add manage levels.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

and use the levels tab to add or manage levels.


### Displaying Levels

Most teams combine three pieces: a static picture of every tier (for progression screens), the user’s current tier (for headers and profile), and immediate feedback when an action pushes them into a new tier.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pieces -> approaches ?


When you send a [metric change event](/api-reference/endpoints/metrics/send-a-metric-change-event), the response will include a `points` map keyed by your points system keys for each system that changed as a result of the event.

The data contains a `level` key only when the user’s tier changed because of this event. If their tier stayed the same, that key is omitted, so you can safely treat a present `level` as a level-up (or tier change) signal without extra bookkeeping.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we should never use "tier", it's confusing. when the user's level changed, if their level stayed the same

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seeing a bunch of references to tiers across this PR, IMO all should be updated to 'levels' except in the case of definitions ("Levels are a way to group users into tiers based on their points totals...")

```ts
const pts = response.points?.xp; // use your points system key

if (pts?.level != null) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

better is if (pts?.level) IMO


if (pts?.level != null) {
// Tier changed on this request — e.g. toast, modal, confetti
notifyLevelUp(pts.level.name, pts.total);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is not necessary a level up. Could be a level down.

Trophy also has APIs that allow you fetch user's points data whenever you want.

First, the [user points API](/api-reference/endpoints/users/get-a-users-points) returns the user's total points for a particular points system and up to 100 of the most recent events that awarded points to or deducted points from them.
First, the [user points API](/api-reference/endpoints/users/get-a-users-points) returns the user's total points for a particular points system, their current **`level`** (or `null` if levels are not in use or they have not reached a tier yet), and up to 100 of the most recent events that awarded points to or deducted points from them.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tier -> level

First, the [points summary API](/api-reference/endpoints/points/get-points-summary) returns aggregate points system data across your entire user base.

Use this data to display a histogram of points for a particular points system and show users how they compare to others on the platform.
Use this data to display a histogram of points for a particular points system and show users how they compare to others on the platform. When you use [Points Levels](#points-levels), the [level summary API](/api-reference/endpoints/points/get-points-level-summary) complements this with a per-tier user count.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tier -> level

@cbrinicombe13 cbrinicombe13 merged commit d8ea42c into main Mar 25, 2026
3 checks passed
@cbrinicombe13 cbrinicombe13 deleted the points-levels branch March 25, 2026 10:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants