Reward-Driven Flags
How Versia's reward-driven flags learn what works
How Reward-Driven Flags Work
Reward-driven flags are regular feature flags with a superpower: they learn.
The Loop
- User evaluates a flag. Versia picks a variant.
- User interacts. Your app sends a reward if the user converts.
- Versia learns. Future evaluations favor variants that get more rewards.
- Repeat. Every interaction makes the flag smarter.
What You Need to Do
Define your variants
Create a flag with two or more options. A CTA with different text, a pricing page with different layouts, an onboarding flow with different steps.
Pick a reward
What does success look like? A click, a signup, a purchase? When it happens, send a reward event.
That’s it
Versia handles everything else. Traffic starts equal and automatically shifts toward whatever works best.
Rewards
A reward is a simple signal: “this variant worked for this user.”
// Pass the same context used during evaluation so Versia can personalize
const ctx = { targetingKey: 'user-123', plan: 'pro', device: 'mobile' };
client.track('conversion', ctx, { flagKey: 'banner-cta', value: 1.0 });
- 1 = success
- No event = neutral (handled automatically)
- You can also send a dollar amount for revenue optimization
What If Different Users Like Different Things?
Versia handles that too. Pass attributes in your evaluation context, like device type, plan, country, or anything else:
const variant = await client.getStringValue('banner-cta', 'sign-up-free', {
targetingKey: 'user-123',
plan: 'pro',
device: 'mobile',
country: 'de',
});
Versia learns that mobile users prefer one variant while desktop users prefer another, or that free-plan users convert better with a different CTA than enterprise users. No rules to configure. It figures it out from the data.
When to Use Reward-Driven Flags
- CTA optimization
- Pricing page variants
- Onboarding flows
- Landing page experiments
- Any decision with a measurable outcome
When to Use Regular Flags Instead
- Feature rollouts (no measurable outcome)
- Kill switches
- Simple on/off toggles