Milestones
Milestones are reward checkpoints attached to a parent record — a Streak or a Challenge. When a user's progress reaches the milestoneTargetValue, the platform automatically issues a Reward Log entry containing a coupon code for that user.
A single streak or challenge can have multiple milestones at different target values, creating a progressive reward ladder that keeps users motivated throughout the journey.
How it works
- Create a milestone — set a
milestoneTargetValueand link it to a parent streak or challenge vialinkedSchemaSlug+linkedSchemaRecordId. - User logs activity —
Streak LogorChallenge Logentries accumulate progress on the parent record. - Threshold crossed — when the user's
currentProgressValuereachesmilestoneTargetValue, theafterUpdatetrigger fires automatically. - Reward issued — a
Reward Logis created for the user with a coupon code,rewardIssuedAttimestamp, and optionalrewardExpiryAt.
Fields
Basic information
| Field | Type | Required | Max length | Description |
|---|---|---|---|---|
linkedSchemaSlug | string | ✅ | 32 | Slug of the parent schema this milestone belongs to — streak or challenge |
linkedSchemaRecordId | UUID | ✅ | — | ID of the specific streak or challenge record this milestone is attached to |
name | string | ✅ | 256 | Internal name of the milestone |
description | string | ✅ | 1 024 | Brief description of the milestone |
milestoneTargetValue | number | ✅ | — | The progress value at which this milestone is achieved |
status | enum | ✅ | — | draft · live · paused |
Linking a milestone to a parent
linkedSchemaSlug and linkedSchemaRecordId together identify the exact parent record:
Code
The same pattern applies for challenges:
Code
Real-world examples
🛍️ E-commerce — progressive spend streak milestones
A 7-day spend streak with two milestone reward checkpoints:
Code
☕ Food & Beverage — weekly visit challenge milestone
A challenge requiring 8 visits in a month, with a midpoint reward:
Code
🏋️ Fitness — monthly activity milestone ladder
A 3-month streak with monthly milestone checkpoints:
Code
End-user display (EUD)
All EUD fields are localisable — supply a languageCode query parameter when reading to receive the translated value.
Labels
| Field | Default | Max length | Description |
|---|---|---|---|
eudTitle | — | 48 | Title of the milestone shown to the end user |
eudDescription | — | 1 024 | Description of the milestone shown to the end user |
eudIcon | (default milestone icon) | — | Milestone icon. Allowed: PNG, JPEG, JPG, GIF, SVG · Max size: 100 KB |
eudMilestoneRewardTitle | — | 48 | Title of the reward shown when the milestone is achieved |
Messages
| Field | Default | Max length | Description |
|---|---|---|---|
eudMilestoneRewardInstructionMessage | Use the offer code at checkout to redeem your reward! Valid till {{rewardValidTill}}. | 1 024 | Instructions shown to the user after the milestone reward is issued |
Template variable
| Variable | Description | Example value |
|---|---|---|
{{rewardValidTill}} | The expiry date/time of the issued reward, formatted for display | 4/10/2026, 9:15:38 PM |
Rendered example — a user achieves a milestone and their reward expires on 30 April 2026:
Use the offer code at checkout to redeem your reward! Valid till 4/10/2026, 9:15:38 PM.
Access & permissions
| Caller | Allowed operations |
|---|---|
| Admin | CREATE · GET · LIST · UPDATE · DELETE |
| End user | (not directly accessible — milestones are surfaced via streak/challenge) |
Related resources
| Resource | Description |
|---|---|
| Streak | Parent streak that owns this milestone |
| Challenge | Parent challenge that owns this milestone |
| Reward Log | Reward entries automatically created when a milestone is reached |
API reference
See the API Reference for full request/response schemas and interactive examples for:
GET /schema/milestone/record— list milestonesPOST /schema/milestone/record— create a milestoneGET /schema/milestone/record/{id}— get a milestone by IDPATCH /schema/milestone/record/{id}— update a milestoneDELETE /schema/milestone/record/{id}— delete a milestone