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
| Input | Type | Required | Description |
|---|---|---|---|
flag | Flag | required | The Flag to evaluate, by key. |
unit | string | required | The id of the Visitor, Customer, Contact, Conversation or request being assigned. |
default | string | The Variant key returned when the Flag is off or the value may not be varied. |
Outputs
| Output | Type | Required | Description |
|---|---|---|---|
variant | Variant | required | The Variant assigned to the unit. |
exposure | Exposure | The 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
| Check | Error | Fix | Then call |
|---|---|---|---|
| The key is valid, but its scopes do not allow this operation. | forbidden | Use a key whose scopes cover the operation, or ask an owner of the namespace to grant them. | Flag.evaluate |
When it waits
| Gate | Default |
|---|---|
| Decision class | Low: two-way, nothing at stake |
| Delay window | None: it runs once review passes. |
| Limit | The call Limit of the Permission it runs under. |
| Over the Limit | It 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. |