You can attach configurations to any of your treatments on a split's Targeting tab to dynamically control components of your features, such as:
- Color, size and other visual components of your application
- The copy or text in different areas of your application
- Backend configurations such as weights set for search algorithms
- Number of retries and time until timeouts to handle failed connections
- Pagination limits for an API return
- Throughput, number of threads for performance thresholds
You can edit configurations for your treatments using two different methods. You can set Key-Value pairs for simpler configurations, but if you have a more advanced use case with a need for nested objects you can also use our JSON format. These configurations give you the ability to make modifications to your features on-the-fly so you can experiment with different variations of a feature with your customers without the need for a code change.
Key Value Pairs
Select Key-Value Pairs as your format. You then have the option to attach one or more configurations to each of your treatments, as needed.
A. Select a format - You can switch to the format that's the most intuitive for you.
B. Input Keys - Input keys that you want your code to check for. (e.g. color, font size, message copy)
C. Input Values - Input values for each of your keys. (e.g. green, size 16, Buy now!)
D. Add/Remove Key-Value Pairs for each treatment - You can attach as many key-value pairs as necessary for each of your treatments by clicking the plus/minus buttons for each treatment.
Note: All Keys and Values will be interpreted as Strings when configurations are saved in this format (e.g. 5 will be stringified and sent as "5") so your code will need to convert from that format at runtime.
Select JSON as your format. You then get a JSON editor for each of your treatments.
A. Select a format - You can switch to the format thats the most intuitive for you.
B. JSON Editor - You can insert valid JSON into the editor. Basic JSONlinting will be done. Nested JSON objects are permitted
C. Click to Expand/Collapse - If you have a large JSON object inserted as a configuration, you'll need to expand/collapse it when editing.
The Split platform will stringify the JSON you enter and provide it as a string to each of our SDKs when downloading split plans.
SDK Usage and Programmatic Configuration updates
To find out how to use the configurations can be leveraged in your code, take a look through the documentation for the language for your project:
- Android docs
- GO docs
- iOS docs
- Java docs
- .NET docs
- Node.js docs
- PHP docs
- Python docs
- Ruby docs
All the configurations that are configurable in our UI are also editable via our Admin API. See examples on how to include configurations in changes to split roll out plans here
Data Validation and Switching Formats
Split will validate that the inputted configs are valid JSON and won’t allow you to save until you have inputted valid JSON.
Additionally, You can switch between Key-Value and JSON editing when configuring your plan. However, if moving from JSON to Key-Value Pairs, you need to make sure all keys and values in the JSON object are strings. Nested objects, arrays, numbers, or booleans will not be accepted and our UI will prevent you from switching.
Configuration Size Limit
To make sure configurations are not too large, the configurations for each Split are limited at 1KB in size. If you need a larger set of configurations, please reach out to email@example.com