SysTriggerCampaignForUser
Triggers a campaign scenario for a specific player, optionally bypassing normal eligibility constraints. The target player must have isTester=true on their profile. The campaign endAt is always respected.
| Service | Operation |
|---|---|
| campaign | SYS_TRIGGER_CAMPAIGN_FOR_USER |
Method Parameters
| Parameter | Description |
|---|---|
| profileId | The profile ID of the player to trigger the campaign for. Player must have isTester=true on their profile. |
| campaignCode | The campaign code to trigger for the player. |
| optionsJson | Optional control flags. ignoreEnabled (boolean, default false): allow triggering even if campaign is disabled. ignoreScheduleStart (boolean, default false): allow triggering before campaign startAt. ignoreControl (boolean, default false): exclude control scenario from weighted assignment. scenarioCode (string): if specified, assign this specific scenario instead of weighted assignment. |
Usage
http://localhost:3000
- C#
- C++
- Obj-C
- Java
- JavaScript
- Dart
- Roblox
- GDScript
- Cloud Code
- Raw
// Cloud Code only. To view example, switch to the Cloud Code tab
// Cloud Code only. To view example, switch to the Cloud Code tab
// Cloud Code only. To view example, switch to the Cloud Code tab
// Cloud Code only. To view example, switch to the Cloud Code tab
// Cloud Code only. To view example, switch to the Cloud Code tab
// Cloud Code only. To view example, switch to the Cloud Code tab
// N/A
N/A
var profileId = "aProfileId";
var campaignCode = "CHRISTMAS2026";
var optionsJson = {
"ignoreEnabled": false,
"ignoreScheduleStart": false,
"ignoreControl": false,
"scenarioCode": "a"
};
var campaignProxy = bridge.getCampaignServiceProxy();
var postResult = campaignProxy.sysTriggerCampaignForUser(profileId, campaignCode, optionsJson);
{
"service": "campaign",
"operation": "SYS_TRIGGER_CAMPAIGN_FOR_USER",
"data": {
"profileId": "aProfileId",
"campaignCode": "CHRISTMAS2026",
"optionsJson": {
"ignoreEnabled": false,
"ignoreScheduleStart": false,
"ignoreControl": false,
"scenarioCode": "a"
}
}
}
JSON Response
{
"data": {
"campaignCode": "CHRISTMAS2026",
"scenarioCode": "a"
},
"status": 200
}
Common Error Code
Status Codes
| Code | Name | Description |
|---|---|---|
| 41060 | CAMPAIGN_SYS_TRIGGER_CAMPAIGN_FOR_USER_ERROR | Trigger failed — campaign disabled, has not started, has ended, player is not a tester, or player is already enrolled in a different scenario. |
| 40206 | BILLING_PLAN_INCLUDES_CAMPAIGN | Billing plan does not include the Campaign feature. |