Hey I want to set forced value for my feature using the sdk, how can I do it? Thanks.
I found this ref in the docs: https://docs.growthbook.io/lib/js
Still not clear about the implementation.
07/05/2023, 8:09 AM
Hi Punit, I'm not sure if I fully understand. You set up a force rule within the UI from /features/<YOUR FATURE NAME>. The forced rule will be checking whether the user has been assigned an attribute where the value matches some sort of pattern. You can set the attribute values like you can see in the link you sent when setting up
07/05/2023, 8:11 AM
I want to create a force rule from the sdk instead of the UI.
07/05/2023, 8:18 AM
I see. Then what you are probably looking for is not the SDK but the growthbook API: https://docs.growthbook.io/api/#tag/features. The SDK is used to integrate your app for the general user. It sounds like you want to make some sort of admin ability within your app.
Unfortunately I don't see a full post for feature rules as part of the API yet. Doing that is probably part of the roadmap.