assign_experiment_unit
Change one unit's (player's or server's) place in an experiment: pin it to a group (assign), remove a pin (clear_override), take it out of the experiment (unenroll), or put it back (reactivate). Use for QA (put a tester in the treatment) or to exclude a unit. Applies when this runs and takes effect on the unit's next configuration fetch. Only works on scheduled or active experiments. Check the unit's current state with list_experiment_members first. Load the manage-experiments skill (load_skill("manage-experiments")) first.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| action | Yes | `assign`: pin the unit to groupId, overriding the automatic group. `clear_override`: remove a pin so the automatic group applies again. `unenroll`: take the unit out of the experiment (it gets the base configuration). `reactivate`: undo an unenroll. | |
| reason | Yes | Why this is being done, in one or two sentences a reviewer can judge it by. Shown to the approver. | |
| groupId | No | Required for `assign` only. | |
| unitType | Yes | Must match the experiment's unit type. | |
| projectId | Yes | The project (application) id to scope this call to. Use list_projects to discover valid ids. | |
| distinctId | Yes | The unit id: the player's user id for user experiments, the server's JobId for server ones. | |
| environment | Yes | The environment name to scope this call to (e.g. 'production'). Use list_projects to discover the names available to this token. | |
| experimentId | Yes | ||
| ignoreExclusion | No | For `assign` and `reactivate`: place the unit even though it is enrolled across an experiment-exclusion boundary. Only when the user explicitly asks to override it. | |
| ignoreTargeting | No | For `assign`: pin the unit even if it does not match the targeting. |