From da9a03ad858407488ba843f21fedaa1b477c5d9e Mon Sep 17 00:00:00 2001 From: "mintlify[bot]" <109931778+mintlify[bot]@users.noreply.github.com> Date: Fri, 6 Feb 2026 20:19:54 +0000 Subject: [PATCH] Update sdks/how-evaluation-works.mdx Co-Authored-By: mintlify[bot] <109931778+mintlify[bot]@users.noreply.github.com> --- sdks/how-evaluation-works.mdx | 43 +++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) diff --git a/sdks/how-evaluation-works.mdx b/sdks/how-evaluation-works.mdx index 55ff77870..6676d2eef 100644 --- a/sdks/how-evaluation-works.mdx +++ b/sdks/how-evaluation-works.mdx @@ -22,6 +22,49 @@ For more details, check our open-source SDKs [here](https://github.com/statsig-i This is not generally recommended, but for advanced use cases - e.g. a series of related experiments that needs to reuse the control and test buckets, we now expose the ability to copy and set the salts used for deterministic hashing. This is meant to be used with care and is only available to Project Administrators. It is available in the Overflow (...) menu in Experiments. +## Evaluation order + +When evaluating gates, experiments, and layers, Statsig follows a specific order of operations. Overrides always take precedence, with ID overrides applying first, followed by conditional overrides in the order they are defined. + +### Experiments + +When you call `getExperiment`, evaluation follows this order: + +1. ID overrides +2. Conditional overrides (in order) +3. Holdouts +4. Experiment start status +5. Allocation percentage +6. Targeting gate +7. Bucketing and group assignment + +### Layers + +When you call `getLayer`, evaluation follows this order: + +1. Layer overrides +2. Conditional layer overrides (in order) +3. Layer holdouts +4. Experiment allocation (which experiment the user is assigned to) +5. Experiment start status +6. Targeting gate +7. Bucketing and group assignment + +### Holdouts + +Holdouts evaluate in this order: + +1. ID overrides +2. Population targeting gate +3. Holdout percentage + +### Gates + +When you call `checkGate`, evaluation follows this order: + +1. ID overrides +2. Rules (in order) + ## When Evaluation Happens Evaluation happens when the gate or experiment is checked on Server SDKs. To be able to do this, Server SDKs hold the entire ruleset of your project in memory - a representation of each gate or experiment in JSON. On client SDKs, we evaluate all of the gates/experiments when you call initialize - on our servers.