- In a multi-turn conversation, where the user provides or receives one piece of data at a time
- Through a form, which prompts the user for several pieces of data in a single conversational turn
userflow() object.
Multi-turn conversations
To collect or deliver one piece of data at a time, callfield() on the userflow() object. This method accepts the following input parameters:
| Parameter | Type | Required | Description |
|---|---|---|---|
| name | string | Yes | Unique identifier for the node. |
| kind | UserFieldKind | Yes | Type of user activity. Supported types: Text, Date, DateTime, Time, Number, File, Boolean, Object, Choice. |
| display_name | string | No | Display name for the node. |
| description | string | No | Description of the node. |
| direction | string | Yes | Indicates whether the node is for input or output. |
| default | Any | No | Default value for the node. |
| option | UserFieldOption | No | List of predefined options with it labels and values. |
| is_list | bool | No | Indicates whether the node accepts multiple values. |
| min | Any | No | Minimum value or constraint. |
| max | Any | No | Maximum value or constraint. |
| input_map | DataMap | No | Define input mappings using a structured collection of Assignment objects. |
| custom | dictionary | No | Dictionary for additional metadata or configuration. |
field():
Python
Forms
To prompt for multiple pieces of data in a single turn, instantiate theform() object to create a form node. This method accepts the following input parameters:
| Parameter | Type | Required | Description |
|---|---|---|---|
| name | string | Yes | The internal name of the form. |
| display_name | string | No | The display name shown on the form. |
| instructions | string | No | Instructions text for the form. |
| submit_button_label | string | No | The label for the submit button. Defaults to Submit if not set. |
| cancel_button_label | string | No | The label for the cancel button. If set to None, hides the button. |
text_input_field
text_input_field
Creates a text input field. Configure it as a single-line input or a multi-line text area.
| Parameter | Type | Required | Description |
|---|---|---|---|
| name | string | Yes | The internal name of the field. |
| label | string | No | Display label for the field. |
| required | bool | No | Whether the field is required. Defaults to False. |
| single_line | bool | No | Whether the field uses a single line. If False, creates a multi-line text area. Defaults to True. |
| placeholder_text | string | No | Placeholder text for the field. |
| help_text | string | No | Help text for the field. |
| default | any | No | Default value for the field, passed as DataMap. |
boolean_input_field
boolean_input_field
Creates a boolean input field. Render it as a checkbox or radio buttons.
| Parameter | Type | Required | Description |
|---|---|---|---|
| name | string | Yes | The internal name of the field. |
| label | string | No | Display label for the field. |
| single_checkbox | bool | No | Whether to display as a single checkbox. If False, displays as radio buttons. Defaults to True. |
| default | any | No | Default value for the field, passed as input_map. |
| true_label | string | No | Label for the true option. Defaults to True. |
| false_label | string | No | Label for the false option. Defaults to False. |
date_range_input_field
date_range_input_field
Creates a date range input field with start and end date pickers.
| Parameter | Type | Required | Description |
|---|---|---|---|
| name | string | Yes | The internal name of the field. |
| label | string | No | Display label for the field. |
| required | bool | No | Whether the field is required. Defaults to False. |
| start_date_label | string | No | Label for the start date field. |
| end_date_label | string | No | Label for the end date field. |
| default_start | any | No | Default value for the start date, passed as DataMap. |
| default_end | any | No | Default value for the end date, passed as DataMap. |
date_input_field
date_input_field
Creates a date input field.
| Parameter | Type | Required | Description |
|---|---|---|---|
| name | string | Yes | The internal name of the field. |
| label | string | No | Display label for the field. |
| required | bool | No | Whether the field is required. Defaults to False. |
| default | any | No | Default value for the field, passed as DataMap. |
number_input_field
number_input_field
Creates a number input field.
| Parameter | Type | Required | Description |
|---|---|---|---|
| name | string | Yes | The internal name of the field. |
| label | string | No | Display label for the field. |
| required | bool | No | Whether the field is required. Defaults to False. |
| is_integer | bool | No | Whether the field accepts only integers. If False, accepts decimal numbers. Defaults to True. |
| help_text | string | No | Help text for the field. |
| default | any | No | Default value for the field, passed as DataMap. |
| minimum | any | No | Minimum allowed value, passed as DataMap. |
| maximum | any | No | Maximum allowed value, passed as DataMap. |
file_upload_field
file_upload_field
Creates a file upload field.
| Parameter | Type | Required | Description |
|---|---|---|---|
| name | string | Yes | The internal name of the field. |
| label | string | No | Display label for the field. |
| instructions | string | No | Instructions for the file upload. |
| required | bool | No | Whether the field is required. Defaults to False. |
| allow_multiple_files | bool | No | Whether multiple files can be uploaded. Defaults to False. |
| file_max_size | int | No | Maximum file size in MB. Defaults to 10. |
message_output_field
message_output_field
Creates a message output field to display static text.
| Parameter | Type | Required | Description |
|---|---|---|---|
| name | string | Yes | The internal name of the field. |
| label | string | No | Display label for the field. |
| message | string | No | The message text to display. |
field_output_field
field_output_field
Creates a field output to display dynamic values.
| Parameter | Type | Required | Description |
|---|---|---|---|
| name | string | Yes | The internal name of the field. |
| label | string | No | Display label for the field. |
| value | any | No | The value to display, passed as DataMap. |
list_output_field
list_output_field
Creates a list output field to display tabular data.
| Parameter | Type | Required | Description |
|---|---|---|---|
| name | string | Yes | The internal name of the field. |
| label | string | No | Display label for the field. |
| choices | any | No | The list of items to display, passed in a DataMap. |
| columns | dict[string, str] | No | Mapping of source property names to table column labels. Only those columns appear if present. |
file_download_field
file_download_field
Creates a file download field.
| Parameter | Type | Required | Description |
|---|---|---|---|
| name | string | Yes | The internal name of the field. |
| label | string | No | Display label for the field. |
| value | any | No | The file to download, passed as DataMap. |
single_choice_input_field
single_choice_input_field
Creates a single-choice input field. Display options as a dropdown or as radio buttons.
| Parameter | Type | Required | Description |
|---|---|---|---|
| name | string | Yes | The internal name of the field. |
| label | string | No | Display label for the field. |
| required | bool | No | Whether the field is required. Defaults to False. |
| choices | any | No | The list of available choices, passed as DataMap. |
| show_as_dropdown | bool | No | Whether to display options as a dropdown. If False, display as radio buttons. Defaults to True. |
| dropdown_item_column | string | No | Column name used for display text in dropdown. |
| placeholder_text | string | No | Placeholder text for the dropdown. |
| default | any | No | Default selected value, passed as DataMap. |
| columns | dict[string, str] | No | Mapping of source property names to display labels for complex choice objects. |
multi_choice_input_field
multi_choice_input_field
Creates a multi-choice input field. Display options as a multi-select dropdown or as checkboxes.
| Parameter | Type | Required | Description |
|---|---|---|---|
| name | string | Yes | The internal name of the field. |
| label | string | No | Display label for the field. |
| required | bool | No | Whether the field is required. Defaults to False. |
| choices | any | No | The list of available choices, passed as DataMap. |
| show_as_dropdown | bool | No | Whether to display options as a dropdown. If False, display as checkboxes. Defaults to True. |
| dropdown_item_column | string | No | Column name used for display text in dropdown. |
| placeholder_text | string | No | Placeholder text for the dropdown. |
list_output_field
list_output_field
Creates a multi-choice input field. Display options as a multi-select dropdown or as checkboxes.
| Parameter | Type | Required | Description |
|---|---|---|---|
| name | string | Yes | The internal name of the field. |
| label | string | No | Display label for the field. |
| choices | any | No | The list of available choices, passed as DataMap. |
| columns | dict[string, str] | No | Whether to display options as a dropdown. If False, display as checkboxes. Defaults to True. |
form():
Python

