ActivityCompletedEvent
Emitted once per activity run when the student completes the activity. Carries completion metrics like questions answered, XP earned, and mastery.Activity metrics
Thegenerated.items array contains completion metrics. Each item has a type (string) and a value (number).
XP supplied by your app for this activity. Follow the XP policy agreed for your integration.
The SDK does not infer XP from elapsed time or question counts.
Number of new units (lessons) the student mastered during this activity. This is an
incremental count, not a cumulative total. When this value is positive, the SDK server can
combine it with historical enrollment facts and a configured positive
totalLessons to
compute pctCompleteApp, unless you supplied pctComplete explicitly. If enrollment or
historical facts cannot be resolved, computation can be skipped. Optional. See Course
progress for full details.Course completion percentage (0—100). Either passed directly via
pctComplete in the activity
payload, or auto-computed by the server from masteredUnits and
totalLessons. Sent
via generated.extensions.pctCompleteApp. See Course
progress.TimeSpentEvent
The SDK sends periodic heartbeats every 15 seconds by default and flushes measured time when an activity ends. The server uses that measured time to construct TimeSpentEvents. Each event reports a bounded time window; a heartbeat is not itself proof that a Caliper event or analytics fact was persisted.Time metrics
Thegenerated.items array contains time window metrics. Each item has a type (string), a value in seconds (max 86400), and optional fields.
Time categories
Per-item fields
Acceptance and delivery
An accepted Caliper request does not confirm XP, reporting, or progression completion. Preserve each event ID and the original payload across transport retries. A new event ID can represent new work to a downstream consumer. An activity’sCompleted action does not by itself assert that the whole course is complete.
Shared structure
Both event types share these top-level fields:The student who performed the action. See Identity.
Metrics collection. Shape depends on event type:
- ActivityCompletedEvent
- TimeSpentEvent
Type:
TimebackActivityMetricsCollectionAn Organization representing the group context. Can be a URL or an Organization entity object.
Custom Activities
How the SDK emits these events
Caliper API
Direct Caliper API access for custom event submission