Create and configure challenges
Overview
You can set up multiple challenges in the AccelByte Gaming Services (AGS) Admin Portal and control when they become active and how they're assigned to players.
This article walks you through how to create and configure a challenge in the AGS Admin Portal or with the AGS CLI, including its basic information, its active period and rotation cycles, goals, and rewards.
Prerequisites
- Access to the AGS Admin Portal.
- A publisher or a game namespace.
- Access to AccelByte Challenge service API documentation.
- An understanding of the key concepts of the Challenge service. See Introduction to Challenges.
- To follow the AGS CLI steps, you must have installed the AGS CLI and signed in with an account that has access to these features. See Install and sign in. The examples use a Bash shell.
View challenges
- Admin Portal
- AGS CLI
-
In the AGS Admin Portal, go to Engagement > Challenges. The Challenge page appears.
-
From the list of challenges, find and click on the challenge you want to view or edit. The details page of the challenge appears.
-
List the challenges in your namespace. To filter the list by challenge code, add
--keyword <ChallengeCode>.ags challenge challenges list --namespace <YourNamespace> -
Get the details of a challenge:
ags challenge challenges get --namespace <YourNamespace> --challenge-code <ChallengeCode>
Create a challenge
- Admin Portal
- AGS CLI
-
On the Challenge page, click on the + Create Challenge button at the top-right hand side of the page.
-
In the Basic Information section, fill in the required information:
-
Basic Information
- Challenge Name: type in a name for the challenge. This will be name of the challenge visible to your players in-game.
- Challenge Code: create a code to identify the challenge.
- Description: (optional) provide a description for the challenge.
-
Period
- Start Date: set the start date and time of the challenge. You also have the option to set this to any of the following:
- Never: the challenge will always be active and the player can complete goals at any time.
- After: the challenge will be inactive after several periods of rotation.
- Goals Rotation: set how the goals in the challenge will be rotated. The available options are: None, Daily, Weekly, and Monthly. For more information about these rotation options, see Goals rotation. After you configure this option, the Goals Assignment section will appear below it.
- Start Date: set the start date and time of the challenge. You also have the option to set this to any of the following:
-
Goals Assignment
- Assignment Rule: set how the goals will be assigned to players.
- Fixed assignment: you will have to manually select which goals to assign to players in each period of rotation or cycle. You can select the time period for each goal when you create or edit goals in a challenge. See Create goals and rewards.
- Randomized assignment: you will allow the service to randomly select which goals to assign to players in each period of rotation or cycle. For example, you've created 33 goals in a challenge and you want the Challenge service to randomly select three goals to assign to players each week.
- Unscheduled: all goals in the challenge will be accessible to players for them to start and complete at any time during the challenge period.
- Goals Visibility For Players: configure the visibility settings of the challenge to players.
- Goals visible in all rotations: players can see all available goals across the rotations period.
- Goals visible only in active rotation: players can only see available goals during active (current) rotation only.
- Total Goals For Each Rotation: set the number of goals that will be assigned to players for the specified time period. These goals will be accessible and achievable by players within the designated period. This configuration only takes effect under the Randomized assignment rule.
- Assignment Rule: set how the goals will be assigned to players.
-
-
Click Next to go to the Goals and Rewards section. At this point, the challenge is created and added to the Challenge list with an INIT (initializing) status. You can then start adding goals to the challenge. Proceed to Create goals and rewards.
-
Create a JSON file with the challenge's settings. Any file name works. This example uses
challenge.json, and creates a challenge with no rotation, whose goals players can complete at any time:{
"code": "<ChallengeCode>",
"name": "<ChallengeName>",
"description": "<Description>",
"startDate": "<StartDate>",
"rotation": "NONE",
"assignmentRule": "UNSCHEDULED",
"goalsVisibility": "SHOWALL"
}code: lowercase letters, numbers, and hyphens. It must start and end with a letter.startDate: a UTC time, such as2026-11-01T00:00:00Z.rotation:NONE,DAILY,WEEKLY, orMONTHLY. If you useNONE, setassignmentRuletoUNSCHEDULED, like the Admin Portal does.
These fields match the Admin Portal settings. To see every field, run
ags challenge challenges create --skeleton.Admin Portal setting Request body field Challenge Name nameChallenge Code codeDescription descriptionStart Date startDateNever (ends) Leave out endDateandendAfterAfter (ends) endAfter: the number of rotation periodsGoals Rotation rotationAssignment Rule assignmentRule:FIXED,RANDOMIZED, orUNSCHEDULEDGoals Visibility For Players goalsVisibility:SHOWALLfor goals visible in all rotations, orPERIODONLYfor goals visible only in the active rotationTotal Goals For Each Rotation activeGoalsPerRotation -
Create the challenge. After
@, pass the path to your JSON file:ags challenge challenges create --namespace <YourNamespace> --json @challenge.jsonThe challenge is created with the INIT status. You can then add goals to it. Proceed to Create goals and rewards.
Create goals and rewards
Each Challenge configuration can support a maximum of 100 Goal configurations.
- Admin Portal
- AGS CLI
-
In the Goals and Rewards section, click on the +Create Goals button. The Create Goals form appears.
-
On the Create Goals form, fill in the required information:
- Goal Name: type in a name for the goal.
- Goal Code: type in a code to identify the goal.
- Description: provide a description for the goal.
- Tags: create or select tags for the goal. Tags help you group and filters goals in challenges.
- Status: enable or disable the goal. You can change the status as needed later on.
- Requirements: add requirements for your goal. Requirements in a goal refer to what players have to complete in order to accomplish the goal. You can create combinations of requirements for a single goal using OR or AND logic. For more information about supported requirements, see Supported requirements for challenge goals.
noteDepending on your selected requirement, you may be required to specify parameters or conditions. For example:
- Account Linked requires you to select a third-party app to link to the account, which depends on the enabled third-party login methods in the namespace. To learn more about third-party login methods, see Authentication.
- Statistics requires you to add the goal value and code of the statistic that's available in the namespace. To learn more about statistics, see Statistics.
- Achievement requires you to add the code of your preferred achievements that are available in the namespace. To learn more about achievements, see Achievements.
-
In the Rewards section, add the Rewards you want to grant to a player after they meet the requirements. The available options are:
- Entitlement: select this to reward items.
- Statistics: select this to reward statistics.
-
Click Save. The goal will be added to the Goals and Rewards list of the challenge. Repeat steps 4 to 7 to create more goals and rewards.
-
After creating goals and rewards for the challenge, click Save.
The challenge and its goals will go live and assigned to players based on the active rotation and assignment rules you have set.
For a challenge with the Fixed assignment rule, use the Admin Portal tab, where you pick each goal's period. The steps below work for the other assignment rules.
-
Create a JSON file with the goal's settings. Any file name works. This example uses
goal.json:{
"code": "<GoalCode>",
"name": "<GoalName>",
"description": "<Description>",
"isActive": true,
"tags": ["<Tag>"],
"requirementGroups": [
{
"operator": "AND",
"predicates": [
{
"parameterType": "STATISTIC",
"parameterName": "<StatisticCode>",
"matcher": "GREATER_THAN_EQUAL",
"targetValue": 10
}
]
}
],
"rewards": [
{
"type": "ENTITLEMENT",
"itemId": "<ItemId>",
"itemName": "<ItemName>",
"qty": 1
}
]
}isActive: the Status of the goal. Usetrueto enable it.requirementGroups: add one object for each group of requirements. A player completes the goal by meeting all the predicates in any one group.parameterType:STATISTIC,STATISTIC_CYCLE,ACHIEVEMENT,ENTITLEMENT, orUSERACCOUNT. ForSTATISTIC_CYCLE, also setstatCycleId.parameterName: the code of the statistic or achievement, or the other value to track, depending onparameterType.matcher:EQUAL,GREATER_THAN,GREATER_THAN_EQUAL,LESS_THAN, orLESS_THAN_EQUAL.rewards:typeisENTITLEMENTorSTATISTIC. ForSTATISTIC, setitemIdto the statistic code anditemNameto its name.
To see every field, run
ags challenge goals create --skeleton. -
Create the goal. After
@, pass the path to your JSON file:ags challenge goals create --namespace <YourNamespace> --challenge-code <ChallengeCode> --json @goal.jsonRepeat this step with a new file for each goal.
-
If the challenge's
assignmentRuleisRANDOMIZEDand itsrandomizedPerRotationistrue, randomize its goals after you add them:ags challenge challenges randomize --namespace <YourNamespace> --challenge-code <ChallengeCode>
Edit or delete a challenge
- Admin Portal
- AGS CLI
-
On the Challenge page, find and click on the challenge you want to edit or delete. The details page of the challenge appears.
-
At the top-right of the details page, do the following:
- To edit the challenge, click Edit. The Edit Challenge form appears. To learn how to configure the challenge or its goals, see step 2 of the Create a challenge section and the Create goals and rewards.
- To delete the challenge, click Delete and again on the pop-up to confirm the deletion. The challenge is deleted from the namespace.
To edit a challenge:
-
Save the challenge's current settings to a file:
ags challenge challenges get --namespace <YourNamespace> --challenge-code <ChallengeCode> --format json > challenge.json -
Edit the settings you want to change in
challenge.json. Keep the other settings as they are, because the update replaces the whole configuration. To change a goal, see Create goals and rewards. -
Send the edited file:
ags challenge challenges update --namespace <YourNamespace> --challenge-code <ChallengeCode> --json @challenge.jsonnoteIf a challenge has active goals, you can't change its rotation, assignment rule, repeat setting, or end settings.
To delete a challenge, run:
ags challenge challenges delete --namespace <YourNamespace> --challenge-code <ChallengeCode>