Beta functionality are typically released to select customers for early access. With Schematic, you can not only roll beta functionality out using Flags, but also subsequently entitle them into Plans you already offer your customers with no additional code changes.
Flags are the primary building block in Schematic, and they allow you to turn features on or off without modifying application code.
To set up a Flag, do the following:
check_flag endpoint (Follow the instructions here)Typically a beta group is a set of your customers that have opted into new functionality. To create one in Schematic, you will need to use Company traits.
Traits can be added to Company profiles using the Company upsert API.
Here’s an example of adding a beta trait to a company:
Once you’ve segmented companies within Schematic, you can set up a rule to target them.
To set up a Flag Rule, do the following:
Adding a beta flag from Schematic in your application is relatively straightforward. The following code performs a Flag check for a Flag with a key beta-flag. Schematic only requires a Company key and a Flag key to evaluate Flag conditions, and this is possible because context associated with companies is stored within Schematic (e.g. the trait we set up above). When a check_flag request is performed, Schematic will refer to the data already stored on the Company or User profile to evaluate Flag Rules.
Once you are ready to fully release a beta feature, you can easily convert it within Schematic so that you can add it to a plan to offer it more widely.
To convert a Flag into a Plan Entitlement, do the following:
You can optionally remove the Rule in the Flag view that is targeting your beta segment to ensure only those that should have access to the new functionality receive that access.