Skip to main content
Version: 6.1.0

SysUpdateScenario

Updates an existing variant scenario. Only the fields present in configJson are changed — omitted fields keep their current values. The control scenario (_) cannot be updated, and the campaign must not have ended.

Within overrides, each of globalProperties, cashProducts and items is handled separately: a map you include replaces that map entirely, and a map you omit is left unchanged. Pass {} to clear a map. The scenario must still contain at least one override after the update.

If none of the supplied fields differ from the current values, the scenario is returned unchanged and its version is not incremented.

ServiceOperation
campaignSYS_UPDATE_SCENARIO

Method Parameters​

ParameterDescription
campaignCodeThe campaign code that owns the scenario.
scenarioCodeThe scenario code to update — for example A or B. The control scenario (_) cannot be updated.
versionVersion of the scenario being updated. Pass -1 to update regardless of the current version.
configJsonFull or partial scenario configuration. Updatable fields are description, overrides and scenarioJson. overrides and its globalProperties, cashProducts and items maps cannot be set to null — use {} to clear them. See SysCreateScenario for the override format.

Usage​

http://localhost:3000
// Cloud Code only. To view example, switch to the Cloud Code tab
JSON Response
{
"data": {
"campaignCode": "SUMMER2026",
"scenarioCode": "A",
"scenarioCampaignCode": "SUMMER2026:A",
"description": "Beach #1",
"overrides": {
"globalProperties": {
"xpMultiplier": {
"name": "xpMultiplier",
"value": "2"
},
"ThemeJson": {
"name": "ThemeJson",
"value": "{\"season\":\"Summer\",\"extra\":\"Beach\"}"
}
},
"cashProducts": {
"coinBundle10": {
"itemId": "coinBundle10",
"notForSale": false,
"priceId": 1,
"showAsListPrice": false
}
},
"items": {
"beachHat": {
"defId": "beachHat",
"buyPriceDisabled": false,
"buyPrice": {
"coin": 200
},
"showAsListPrice": false
},
"summerHat": {
"defId": "summerHat",
"buyPriceDisabled": true,
"buyPrice": null,
"showAsListPrice": false
}
}
},
"scenarioJson": {
"customField1": "beach",
"customField2": {
"subtheme": "beachTheme"
}
},
"version": 2,
"createdAt": 1811725200000,
"updatedAt": 1811728800000
},
"status": 200
}
Common Error Codes

Status Codes​

CodeNameDescription
40345MISSING_RECORDNo campaign exists for the specified campaignCode.
40345MISSING_RECORDNo scenario exists for the specified campaignCode and scenarioCode.
40001INVALID_REQUESTThe campaign has ended and can no longer be modified.
41063CAMPAIGN_SCENARIO_VERSION_MISMATCHThe specified version no longer matches the scenario — it was updated by someone else. Re-read and retry.
40660INVALID_PARAMETER_VALUEThe update is invalid — for example, scenarioCode is the control scenario, a non-nullable field was set to null, no overrides would remain, or an override refers to something that does not exist. The error message describes the specific problem.
41054CAMPAIGN_UPDATE_ERRORThe scenario could not be updated.
40616CLOUD_CODE_ONLY_METHODThe method was called from a client. It can only be called from Cloud Code or S2S.
40731FEATURE_NOT_SUPPORTED_BY_BILLING_PLANBilling plan does not include the Campaign feature. Requires a plan that includes Enterprise features.