Launching Integrations with Remote Config
How Flagsmith used Remote Config to launch Integrations
We launched new integrations using our own Remote Config tools.
Introduction of Integrations
We’ve recently introduced some new integrations into our platform (you can check them out here) to enable our customers to get even more value out of Flagsmith.
On the back end, these integrations all work slightly differently, with different API formats for different third party services.
But on the front end, these integrations all follow a similar pattern:
- Select the integration service
- Add an API key from that service
- Hook the integration up to either an Environment or a Project
Given this reproducibility, we decided to use Remote Configuration to manage these user interface elements on our front end.
Introducing Integrations with Remote Config
To add a new integration on our front end, we don’t need to add any code whatsoever to our front end. No commits, no deploys. We wrote the general integration case once, and then use Remote Configuration to hook up that code.
So how do we do this? We rely on two Remote Configuration values, and they look like this:
So how does this work? The integrations config value defines which integrations show up. This is simply a JSON array of integration names.
The integrations_data contains the detailed information for each configuration; whether we bind the integration to an Environment or not, the logo, and the description of the integration.
Benefits of having used Remote Configuration
So why bother with using Remote Config at all? There are three main benefits:
- We can easily test these integrations in production. This is really important, as this sort of feature really relies on production data to be able to test effectively.
- We can add integrations on the front end purely from within Flagsmith.
- We can provide beta access to these integrations to an individual user or to a group of users based on a Flagsmith Segment.
The other thing to point out is that this is probably going to be a long term/permanent remote config setup. We will most likely be adding integrations into Flagsmith until the sun goes nova, and so it makes sense to keep this paradigm in the platform for the foreseeable future. We will no doubt need to add some configuration options for new integrations that require additional data, but that’s fine.