Skip to main content
Version: 6.0.0

SysUpdateScenarioJson

Updates only the free-form scenarioJson custom payload on a campaign scenario. No other scenario field can be modified through this call — in particular the scenario's overrides (global properties, cash product prices, item definitions) are left untouched, as is its description.

The owning campaign must not have ended. The updated payload is picked up by already-authenticated players on their next GetMyCampaigns call — they do not need to re-authenticate.

ServiceOperation
campaignSYS_UPDATE_SCENARIO_JSON

Method Parameters

ParameterDescription
campaignCodeThe campaign code that owns the scenario.
scenarioCodeThe scenario code whose scenarioJson is being updated. Pass "_" for the control scenario.
versionVersion of the scenario being updated. Pass -1 to update regardless of the current version.
scenarioJsonThe new scenarioJson custom payload. This replaces the existing payload entirely — it is not merged. Pass null to clear it. Oversized payloads are rejected; see the note below.
info

scenarioJson is returned to every player assigned to this scenario, so keep it to the data your client actually needs. The maximum serialized size is governed by an application property — contact support if you need the limit adjusted.

caution

scenarioJson is part of what distinguishes one variant from another. Changing it while the campaign is running changes what that variant means, but the campaign's accumulated A/B statistics continue to pool participants from before and after the change as a single group. Prefer to finalize variant payloads before the campaign starts, and treat mid-flight edits as something to note when interpreting the results.

Usage

http://localhost:3000
// Cloud Code only. To view example, switch to the Cloud Code tab
JSON Response
{
"data": {
"campaignCode": "CHRISTMAS2026",
"scenarioCode": "a",
"version": 2,
"updatedAt": 1786737600000
},
"status": 200
}

The returned version is the scenario's new version after the update. Feed it into your next call's version parameter if you want to detect a concurrent change rather than overwrite it.

Common Error Codes

Status Codes

CodeNameDescription
40345MISSING_RECORDNo campaign exists for the specified campaignCode, or no scenario exists for the specified scenarioCode.
40001INVALID_REQUESTThe owning 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.
41064CAMPAIGN_JSON_TOO_LARGEThe serialized scenarioJson exceeds the maximum size allowed for the app.
40731FEATURE_NOT_SUPPORTED_BY_BILLING_PLANBilling plan does not include the Campaign feature. Requires a plan that includes Enterprise features.