Skip to main content
Version: 5.7.0

SysReorderQuestTasks

Re-orders the tasks in the quest. If any tasks are missing from the new order, they will be deleted. The ids of any deleted tasks will be returned in the data.deletedTasks field of the JSON result.

ServiceOperation
gamificationSYS_REORDER_QUEST_TASKS

Method Parameters

ParameterDescription
questIdThe quest to reorder
versionThe current revision of the quest.
newTaskArrayAn ordered array of task ids. Note - any tasks not present in the array will be deleted from the quest.

Usage

http://localhost:3000
// Cloud Code only. To view example, switch to the Cloud Code 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": 1574866260391,
"version": 8,
"tasks": [
"19",
"17"
]
},
"deletedTasks": [],
"tasks": {
"17": {
"questId": "QUEST_CRUSH52",
"title": "Winner Winner",
"description": "An updated task description",
"category": "loyalty",
"extraData": {
"secretMission": false,
"actionIndex": 4
},
"rewards": {
"experiencePoints": 1000
},
"thresholds": {
"playerStatistics": {
"statistics": {
"wins": 50
}
}
},
"createdAt": 1574820663140,
"updatedAt": 1574863558901,
"version": 2,
"taskId": "17"
},
"19": {
"questId": "QUEST_CRUSH52",
"title": "Another task",
"description": "Crushing Eggs task",
"category": "mission",
"extraData": {},
"rewards": {
"experiencePoints": 30
},
"thresholds": {
"playerStatistics": {
"statistics": {
"returningDay": 7
}
}
},
"createdAt": 1574866217734,
"updatedAt": 1574866217734,
"version": 1,
"taskId": "19"
}
}
}
}