DEV Community

Nichole for ConfigCat

Posted on • Originally published at Medium

Targeting with ConfigCat: Releasing feature updates without risking your brand’s reputation

Don’t be a Snapchat, be an Instagram.

Redesigns can be risky - just ask Snapchat. When their redesign went live in 2018, users were unimpressed. There will always be users averse to change and you cannot please everyone. Staged rollouts, however, can be used to manage and minimise backlash.

ConfigCat streamlines feature flags, making user targeting and staged rollouts simpler.

Suppose we have created a new direct message feature for our existing photo app. Using ConfigCat’s management console, we can create a flag to enable and disable this feature.

Alt Text

We can then create a ConfigCat client in our python application. Using the feature flag key generated above, we can get the boolean value and use it in a conditional statement.

if __name__ == "__name__":
    configcat_client = configcatclient.create_client('<API Key>')
    direct_message_enabled =   configcat_client.get_value("directMessageEnabled"
        , false)
    if direct_message_enabled:

Let’s roll out the update internally, this can be done by filtering on email addresses.

Alt Text

Once we’re happy, we can release the feature to beta testers. ConfigCat allows us to create custom attributes for users. We can define an attribute ‘user_type’ and set it equal to ‘beta’ to identify beta testers.

The attribute ‘user_type’ should be included when user objects are instantiated.

example_user = User('<Some ID>', '', 'Germany',
                     {'user_type': 'beta'})

We can then filter in all beta testers.

Alt Text

Once we are ready to go live, it may be a good idea to release the feature to the public in stages, on the off chance something goes wrong. Sensitive users have been identified as the most at risk, it’s probably best to leave them for last. Let’s exclude sensitive users and target a portion of the remaining user base.

Alt Text

Let’s include all the remaining users.

Alt Text

And finally, let’s enable the feature for sensitive users

Alt Text

It’s worth noting, ConfigCat also allows for more than just boolean type comparisons. Navigate here for more information on the Python SDK and other documentation.

Top comments (0)