Skip to content

Flag.evaluate

POST /{namespace}/flags/{flag}/evaluate

Evaluate returns the Variant a Flag assigns one unit, the same one every time, and records the Exposure with every option and its propensity.

Noun
Flag
Mode
do
Event
Flag.evaluated

Inputs

InputTypeRequiredDescription
flagFlagrequiredThe Flag to evaluate, by key.
unitstringrequiredThe id of the Visitor, Customer, Contact, Conversation or request being assigned.
defaultstringThe Variant key returned when the Flag is off or the value may not be varied.

Outputs

OutputTypeRequiredDescription
variantVariantrequiredThe Variant assigned to the unit.
exposureExposureThe Exposure recorded; none in Mode try.

Effects

  • Emits Flag.evaluated.
  • Records no Exposure in Mode try, so a preview never counts toward a Readout.
  • Returns the default, and records why, when the value is on the never-randomized list.

Refuses when

CheckErrorFixThen call
The key is valid, but its scopes do not allow this operation.forbiddenUse a key whose scopes cover the operation, or ask an owner of the namespace to grant them.Flag.evaluate

When it waits

GateDefault
Decision classLow: two-way, nothing at stake
Delay windowNone: it runs once review passes.
LimitThe call Limit of the Permission it runs under.
Over the LimitIt waits pending for an Approval from the Founder. Approved, it runs; refused, it ends refused with limit-exceeded; unanswered by its deadline, it ends canceled.