Date of slack thread: 7/29/24
Anonymous: Hey folks. I’m looking for documentation on how to create custom criteria to use in my feature gate targeting rules. A Google search turns up links to FAQs that no longer exist and I’m having trouble finding it in the developer docs. Thanks in advance!
tore (Statsig): The custom condition is documented here: https://docs.statsig.com/feature-flags/conditions#custom. You can create those rules on a flag, but they depend on a key:value pair that you set in the StatsigUser object for that check - so I’m not sure if your question is about the console setup piece or the sdk check part.
Anonymous: Thanks. Can we pass in additional k/v pairs when doing a gate check as well (additional context at the call site) or does it all need to be configured on the user object?
Vineeth Madhusudanan (Statsig): It needs to be configured in the user object - but you can update the user object at anytime. If you’re doing this on a server SDK, it’s effective immediately with no round trips to Statsig. Most people build something like the viewerContext back at FB to make this simple.