Skip to main content
Version: 5.7.0

SysAddQuestTask

Adds a new task to the specified quest. The id of the newly added task will be returned in the data.newTask field of the JSON result.

Note that tasks are essentially milestones that are embedded within a quest.

An example taskJson object:

{
"title": "Egg Crusher",
"description": "Crushing Eggs lifetime milestone",
"category": "mission",
"extraData": {
"secretMission": false,
"actionIndex": 4
},
"unlockThresholds": {
"playerStatistics": {
"experienceLevel": 2,
"experiencePoints": 10,
"statistics": {
"foodc": 5
}
},
"globalStatistics": {
"food_unlock": 1
}
},
"thresholds": {
"playerStatistics": {
"experienceLevel": 1,
"experiencePoints": 10,
"statistics": {
"returningDay": 7
}
}
},
"rewards": {
"experiencePoints": 30,
"globalStatistics": {
"globalxp": 30
},
"statistics": {
"a3": 1,
"secretMissions": 1
},
"achievement": "ACH001",
"currency": {
"coins": 5
}
}
}
ServiceOperation
gamificationSYS_ADD_QUEST_TASK

Method Parameters

ParameterDescription
questIdThe quest to add to
versionThe current revision of the quest
taskJsonThe data defining the task
beforeTaskIdThe id of the task to insert before. Pass in null to add to end

Usage

http://localhost:3000
// S2S call: to view example, switch to the Cloud Code or Raw tab.
JSON Response
{
"status": 200,
"data": {
"quest": {
"questId": "QUEST_CRUSH52",
"questType": "unorderedMinimal",
"questData": "0",
"title": "Crush 50 Eggs",
"description": "This is an updated description",
"category": "mission",
"extraData": {
"difficulty": 1
},
"rewards": {
"experiencePoints": 1000
},
"createdAt": 1574802052796,
"updatedAt": 1574820663145,
"version": 3,
"tasks": ["17"]
},
"newTask": "17",
"tasks": {
"17": {
"questId": "QUEST_CRUSH52",
"title": "Winner Winner",
"description": "Get 50 wins",
"category": "loyalty",
"extraData": {
"secretMission": false,
"actionIndex": 4
},
"rewards": {
"experiencePoints": 1000
},
"thresholds": {
"playerStatistics": {
"statistics": {
"wins": 50
}
}
},
"createdAt": 1574820663140,
"updatedAt": 1574820663140,
"version": 1,
"taskId": "17"
}
}
}
}