Loyalty Events Schema
Optimove's Loyalty & Gamification module emits a set of events as players progress through missions, earn rewards, gain experience, and level up. This reference documents each event and its attributes.
All events share a common set of base attributes:
| Attribute | Type | Description |
|---|---|---|
ls_createdat | number | Unix timestamp of when the event was created. |
ls_brandid | string | Identifier of the brand the event belongs to. |
ls_playerid | string | Identifier of the player the event relates to. |
Mission progress vs. completionIf a mission is completed, only
ls_mission_completedis emitted — nols_mission_progressevents are emitted for that completion.
ls_mission_progress
Emitted as a player makes progress toward a mission objective.
| Attribute | Type | Description |
|---|---|---|
ls_createdat | number | Unix timestamp of when the event was created. |
ls_brandid | string | Identifier of the brand. |
ls_playerid | string | Identifier of the player. |
ls_objectiveid | string | Identifier of the mission objective. |
ls_objectivename | string | Display name of the mission objective. |
ls_progress | number | Current progress value toward the goal. |
ls_goal | number | Target value required to complete the objective. |
ls_mission_completed
Emitted when a player completes a mission objective.
| Attribute | Type | Description |
|---|---|---|
ls_createdat | number | Unix timestamp of when the event was created. |
ls_brandid | string | Identifier of the brand. |
ls_playerid | string | Identifier of the player. |
ls_objectiveid | string | Identifier of the mission objective. |
ls_objectivename | string | Display name of the mission objective. |
ls_status | string | Completion status of the mission. |
ls_rewardsjson | string (optional) | JSON-encoded details of any rewards granted on completion. |
ls_reward_claimed_from_mission
Emitted when a player claims a reward earned from a mission.
| Attribute | Type | Description |
|---|---|---|
ls_createdat | number | Unix timestamp of when the event was created. |
ls_brandid | string | Identifier of the brand. |
ls_playerid | string | Identifier of the player. |
ls_objectiveid | string | Identifier of the mission objective the reward came from. |
ls_rewardsjson | string | JSON-encoded details of the claimed reward(s). |
ls_reward_claimed_from_leaderboard
Emitted when a player claims a reward earned from a leaderboard.
| Attribute | Type | Description |
|---|---|---|
ls_createdat | number | Unix timestamp of when the event was created. |
ls_brandid | string | Identifier of the brand. |
ls_leaderboardid | string | Identifier of the leaderboard the reward came from. |
ls_rewardsjson | string | JSON-encoded details of the claimed reward(s). |
ls_badge_earned
Emitted when a player earns a badge.
| Attribute | Type | Description |
|---|---|---|
ls_createdat | number | Unix timestamp of when the event was created. |
ls_brandid | string | Identifier of the brand. |
ls_playerid | string | Identifier of the player. |
ls_ruleid | string (optional) | Identifier of the rule that triggered the badge, if applicable. |
ls_objectiveid | string (optional) | Identifier of the associated objective, if applicable. |
ls_badgeid | string | Identifier of the earned badge. |
ls_badgename | string | Display name of the earned badge. |
ls_virtual_currency_added
Emitted when virtual currency is added to a player's balance.
| Attribute | Type | Description |
|---|---|---|
ls_createdat | number | Unix timestamp of when the event was created. |
ls_brandid | string | Identifier of the brand. |
ls_playerid | string | Identifier of the player. |
ls_ruleid | string (optional) | Identifier of the rule that triggered the award, if applicable. |
ls_objectiveid | string (optional) | Identifier of the associated objective, if applicable. |
ls_currencyid | string | Identifier of the virtual currency. |
ls_currencyname | string | Display name of the virtual currency. |
ls_amount | number | Amount of currency added. |
ls_experience_points_gained
Emitted when a player gains experience points.
| Attribute | Type | Description |
|---|---|---|
ls_createdat | number | Unix timestamp of when the event was created. |
ls_brandid | string | Identifier of the brand. |
ls_playerid | string | Identifier of the player. |
ls_ruleid | string (optional) | Identifier of the rule that triggered the award, if applicable. |
ls_objectiveid | string (optional) | Identifier of the associated objective, if applicable. |
ls_leaderboardid | string (optional) | Identifier of the associated leaderboard, if applicable. |
ls_rewardid | string | Identifier of the experience-point reward. |
ls_rewardname | string | Display name of the reward. |
ls_amount | number | Amount of experience points gained. |
ls_additional_reward_claimed
Emitted when a player claims an additional reward from a mission, leaderboard, or level.
| Attribute | Type | Description |
|---|---|---|
ls_createdat | number | Unix timestamp of when the event was created. |
ls_brandid | string | Identifier of the brand. |
ls_playerid | string | Identifier of the player. |
ls_ruleid | string (optional) | Identifier of the rule that triggered the reward, if applicable. |
ls_objectiveid | string (optional) | Identifier of the associated objective, if applicable. |
ls_leaderboardid | string (optional) | Identifier of the associated leaderboard, if applicable. |
ls_rewardid | string | Identifier of the claimed reward. |
ls_rewardname | string | Display name of the claimed reward. |
ls_shortcode | string (optional) | Short code associated with the reward, if applicable. |
ls_source | string | Source of the reward. One of mission, leaderboard, or level. |
ls_player_level_up
Emitted when a player advances to a new level.
| Attribute | Type | Description |
|---|---|---|
ls_createdat | number | Unix timestamp of when the event was created. |
ls_brandid | string | Identifier of the brand. |
ls_playerid | string | Identifier of the player. |
ls_levelconfigid | string | Identifier of the level configuration. |
ls_levelid | string | Identifier of the level reached. |
ls_levelnumber | number | Numeric position of the level reached. |
ls_levelname | string | Display name of the level reached. |