Flagship - Target Flagship feature flags with structured evaluation context
- Announced
- Tags
- Flagship
- Severity
- info, set by
reef/rss-rule-v1 - Source
- https://developers.cloudflare.com/changelog/post/2026-10-23-structured-evaluation-context/
<p><a href="https://developers.cloudflare.com/flagship/">Flagship</a> supports nested objects, arrays, and <code>null</code> in evaluation context. Pass user profiles and tag lists directly, then target nested attributes without flattening your application data.</p> <p>For example, pass a profile and tags when evaluating a flag through the Workers binding:</p> <div><div data-nb-tabs data-nb-sync-key="workersExamples" class><div class="relative flex border-b border-border" role="tablist" data-nb-tabs-list><span class="bg-primary pointer-events-none absolute -bottom-px h-0.5 rounded-t-sm transition-[left,width] duration-200 ease-out" data-nb-tabs-indicator aria-hidden="true"></span></div><div class="mt-3"><div role="tabpanel" data-nb-tabs-content data-nb-tab-label="JavaScript" class><figure class="nb-code-figure" data-nb-lang="js"><pre class="astro-code astro-code-themes github-light github-dark nb-shiki-c6xiwz" tabindex="0" data-language="js" data-nb-lang="js"><code><span class="line"><span class="nb-shiki-1itgoe">const</span><span class="nb-shiki-dzsirb"> enabled</span><span class="nb-shiki-1itgoe"> =</span><span class="nb-shiki-1itgoe"> await</span><span class="nb-shiki-140thh"> env.</span><span class="nb-shiki-dzsirb">FLAGS</span><span class="nb-shiki-140thh">.</span><span class="nb-shiki-1t8gfj">getBooleanValue</span><span class="nb-shiki-140thh">(</span><span class="nb-shiki-mdbnqw">"new-checkout"</span><span class="nb-shiki-140thh">, </span><span class="nb-shiki-dzsirb">false</span><span class="nb-shiki-140thh">, {</span></span> <span class="line"><span class="nb-shiki-140thh"> targetingKey: </span><span class="nb-shiki-mdbnqw">"user-42"</span><span class="nb-shiki-140thh">,</span></span> <span class="line"><span class="nb-shiki-140thh"> profile: { plan: </span><span class="nb-shiki-mdbnqw">"enterprise"</span><span class="nb-shiki-140thh"> },</span></span> <span class="line"><span class="nb-shiki-140thh"> tags: [</span><span class="nb-shiki-mdbnqw">"beta"</span><span class="nb-shiki-140thh">, </span><span class="nb-shiki-mdbnqw">"early-access"</span><span class="nb-shiki-140thh">],</span></span> <span class="line"><span class="nb-shiki-140thh">});</span></span></code></pre></figure></div><div role="tabpanel" data-nb-tabs-content data-nb-tab-label="TypeScript" class><figure class="nb-code-figure" data-nb-lang="ts"><pre class="astro-code astro-code-themes github-light github-dark nb-shiki-c6xiwz" tabindex="0" data-language="ts" data-nb-lang="ts"><code><span class="line"><span class="nb-shiki-1itgoe">const</span><span class="nb-shiki-dzsirb"> enabled</span><span class="nb-shiki-1itgoe"> =</span><span class="nb-shiki-1itgoe"> await</span><span class="nb-shiki-140thh"> env.</span><span class="nb-shiki-dzsirb">FLAGS</span><span class="nb-shiki-140thh">.</span><span class="nb-shiki-1t8gfj">getBooleanValue</span><span class="nb-shiki-140thh">(</span><span class="nb-shiki-mdbnqw">"new-checkout"</span><span class="nb-shiki-140thh">, </span><span class="nb-shiki-dzsirb">false</span><span class="nb-shiki-140thh">, {</span></span> <span class="line"><span class="nb-shiki-140thh"> targetingKey: </span><span class="nb-shiki-mdbnqw">"user-42"</span><span class="nb-shiki-140thh">,</span></span> <span class="line"><span class="nb-shiki-140thh"> profile: { plan: </span><span class="nb-shiki-mdbnqw">"enterprise"</span><span class="nb-shiki-140thh"> },</span></span> <span class="line"><span class="nb-shiki-140thh"> tags: [</span><span class="nb-shiki-mdbnqw">"beta"</span><span class="nb-shiki-140thh">, </span><span class="nb-shiki-mdbnqw">"early-access"</span><span class="nb-shiki-140thh">],</span></span> <span class="line"><span class="nb-shiki-140thh">});</span></span></code></pre></figure></div></div></div><script type="module" src="https://developers.cloudflare.com/home/runner/work/cloudflare-docs/cloudflare-docs/src/components/ui/tabs/Tabs.astro?astro&type=script&index=0&lang.ts"></script></div> <p>A targeting rule can combine <code>profile.plan equals "enterprise"</code> with <code>tags has "beta"</code> to serve the feature to enterprise users in the beta group. Use dot-separated paths for nested attributes and the <code>has</code> and <code>not_has</code> operators for array membership. Percentage rollouts can also use a nested identifier, such as <code>profile.id</code>, for consistent user assignment.</p> <p>Structured context works through the Workers binding, the evaluation REST API with a JSON <code>POST</code> body, and the TypeScript, Python, and Go OpenFeature SDKs from version <code>0.6.0</code>. The SDKs automatically use <code>POST</code> when HTTP evaluation requires structured context.</p> <p>Refer to <a href="https://developers.cloudflare.com/flagship/targeting/">targeting rules</a>, the <a href="https://developers.cloudflare.com/flagship/reference/evaluation-api/">evaluation API</a>, and <a href="https://developers.cloudflare.com/flagship/sdk/#context-support">SDK context support</a> for usage and supported values.</p>
The text above is the source's. reef added the severity, the dates it could read from the text, and the endpoints and scopes named in code.