Skip to main content

Node Inputs

Missions Example

My example app is designed to help users run their first 10km by completing 1km runs. Each time a user completes a 1km run, we use the Reward XP node to complete the complete_run action. Once they complete the complete_run action a specific amount of times, they will complete a mission. We use the following mission configuration:
In this configuration:
  • First Mission: complete_first_run
    • Requirements: The user must complete their first run (complete_run action) once.
    • Rewards: Upon completion, the user earns 100 XP and receives a badge identified by BADGE_ID_FIRST_RUN.
  • Second Mission: run_5k
    • Requirements: The user must complete five runs (complete_run action) in total.
    • Rewards: Upon completion, the user earns 200 XP and receives a badge identified by BADGE_ID_RUN_5K.
  • Third Mission: run_10k
    • Requirements: The user must complete ten runs (complete_run action) in total.
    • Rewards: Upon completion, the user earns 1000 XP and receives a badge identified by BADGE_ID_RUN_10K.
Currently, the mission name must match the name of the rewarded badge in the mission configuration above.

Node Outputs

What’s next?

Hopefully, you now understand what missions are and how to check if a user has completed them. Why not try the Check and Reward template? This template checks whether a user has completed all the actions required for a mission, and if they have, it rewards them with the appropriate XP and badges.