Set Evaluation Context and Runtime Properties
masterContext is used for flag evaluation.
Important: Per-evaluation context (passing context as an argument to getBooleanValue, etc.) is not supported. You must set context globally using OpenFeature.setContext(). Setting context triggers a re-fetch of flag values from Mixpanel.
Using Runtime Properties
To use Mixpanel's Runtime Properties targeting rules, include a custom_properties key in your context. Values must be flat key-value pairs (no nested objects).
await OpenFeature.setContext({
email: 'user@example.com',
plan: 'premium',
custom_properties: {
tier: 'enterprise',
seats: 50,
industry: 'technology'
}
});