Configuration Options
About Configuration Options
Configuration Options are the form fields that you can present to your users when they configure your adapter within a Flow Setup. They let you collect setup information from your users which will be sent to you with every call to your webhook.
Use cases for configuration options include:
- Capture authentication details so you know who is submitting the webhook
- Conversion tables for fields like mode, unit of measure, container size, etc
- Flags to alter how your webhook responds based on different customer needs
Submitting Configuration Options
When you register your adapter, you can provide a configuration_options
array to the Create Adapter or Update Adapter endpoints.
{
// other adapter fields go here
"configuration_options": [
{
"name": "customerNumber",
"label": "Customer Number",
"support_url": "https://docs.co2-co.sample/help#customerNumber",
"description": "Your CO2-Co customer number",
"config_type": "regex",
"required": false,
"regex_config": {
"regex": "^[0-9]{5}$",
"regex_error": "Your customer number must be exactly 5 digits."
}
},
{
"name": "customerSecret",
"label": "Secret Key",
"support_url": "https://docs.co2-co.sample/help#customerSecret",
"description": "Your CO2-Co shared secret",
"config_type": "password"
}
]
}
Configuration Types
Use the configType
to indicate the input type that the user should see. The table below explains the input types, how they will appear to the user, and the additional configuration details you must provide.
Config Type | HTML Input Type | Required Configuration Attribute | Notes |
---|---|---|---|
| Text | n/a | Standard text input |
| Password | n/a | Same as string except values will be masked like |
| Text |
| Same as string except values are validated against the regular expression you provide in the |
| Number |
| Accepts |
| Select |
| Accepts an |
| Checkbox | n/a | |
| Table |
| Creates a table where the user can add/remove rows. You provide a You cannot nest tables within other tables. |
Updated 17 days ago