Action fields
The field types available when defining how a care flow author configures a custom action in Studio.
Action fields are how a care flow author configures an action in Awell Studio: the interface between an extension and a non-engineer.
What each field declares
A field declares its key, label, description, type, and whether it's required.
Write the label and description for someone who doesn't know the API; they're all the author has to go
on. A field called dest_num with no description will be filled in wrongly.
The available field types
| Type | What the author gets |
|---|---|
string | A single line of text |
text | Longer, multi-line text |
numeric | A number |
boolean | A toggle |
date | A date picker |
html | Rich text, for content that gets rendered |
json | A JSON value, for structured input |
string_array | A list of text values |
numeric_array | A list of numbers |
Pick the narrowest type that fits. A boolean can't be filled in wrongly the way a string can, and a
date field avoids parsing arbitrary date formats.
Reach for json last: it accepts any value, including a wrong one, and Studio gives the author no help
filling it in. Use it where the shape genuinely varies.
A string field can also carry a set of options, so the author picks from a list instead of typing. Do
that whenever the valid values are known: 74 fields across today's marketplace extensions do.
Fields usually hold variables, not literals
Authors can put variables into field values, so a field can carry patient-specific data at run time rather than a fixed value. Design for that: a "phone number" field will usually hold a variable rather than a literal number.
Next steps
Next: The onEvent function, where the field values arrive.
Create an action
Define a custom action — its metadata, how a care flow author configures it in Studio, and the logic that runs when a care flow activates it.
The onEvent function
The function called when a care flow activates a custom action, with its payload, its callbacks, and the helpers available to it.