- 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 user activity
To collect or deliver one piece of data at a time, callfield() on the userflow() object. This method accepts the following input parameters:
Unique identifier for the node.
Type of user activity. Supported types: Text, Date, DateTime, Time, Number, File, Boolean, Object, Choice.
Display name for the node.
Description of the node.
Indicates whether the node is for input or output.
Default value for the node.
List of predefined options with their labels and values.
Indicates whether the node accepts multiple values.
Minimum value or constraint.
Maximum value or constraint.
Define input mappings using a structured collection of Assignment objects.
Dictionary for additional metadata or configuration.
field():
Python
Forms user activity
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:
The internal name of the form.
The display name shown on the form.
Instructions text for the form.
The label for the submit button. Defaults to
Submit if not set.The label for the cancel button. If set to None, hides the button.
Forms fields
After instantiating the form object, add fields to it. Each field type requires its own configuration. Supported field types include:text_input_field
text_input_field
Creates a text input field. Configure it as a single-line input or a multi-line text area.Parameters:
The internal name of the field.
Display label for the field.
Whether the field is required. Defaults to
False.Whether the field uses a single line. If
False, creates a multi-line text area. Defaults to True.Placeholder text for the field.
Help text for the field.
Default value for the field, passed as DataMap.
Regular expression pattern for input validation.
Custom error message for failed regex validation.
Defaults to: “Input does not match the required pattern”.
boolean_input_field
boolean_input_field
Creates a boolean input field. Render it as a checkbox or radio buttons.Parameters:
The internal name of the field.
Display label for the field.
Whether to display as a single checkbox. If
False, displays as radio buttons. Defaults to True.Default value for the field, passed as
input_map.Label for the true option. Defaults to
True.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.Parameters:
The internal name of the field.
Display label for the field.
Whether the field is required. Defaults to
False.Label for the start date field.
Label for the end date field.
Default value for the start date, passed as DataMap.
Default value for the end date, passed as DataMap.
DataMap that sets the minimum date constraint and maps to
self.input.min_date.DataMap that sets the maximum date constraint and maps to
self.input.max_date.date_input_field
date_input_field
Creates a date input field.Parameters:
The internal name of the field.
Display label for the field.
Whether the field is required. Defaults to
False.Default value for the field, passed as DataMap.
Minimum date value for the allowed range.
Maximum date value for the allowed range.
Whether the field supports selecting more than one date. Defaults to
False.datetime_input_field
datetime_input_field
Creates a datetime or time input field.
Internal name of the field.
Display label for the field.
Whether the field is required. Defaults to
False.Default value for the field, provided through a
DataMap.Minimum allowed datetime or time value.
Maximum allowed datetime or time value.
Type of field, either
DateTime or Time. Defaults to DateTime.datetime_range_input_field
datetime_range_input_field
Creates a datetime or time range input field with start and end pickers.
Internal name of the field.
Display label for the field.
Whether the field is required. Defaults to
False.Label for the start value.
Label for the end value.
Default start value, provided through a
DataMap.Default end value, provided through a
DataMap.Minimum allowed value for the range.
Maximum allowed value for the range.
number_input_field
number_input_field
Creates a number input field.Parameters:
The internal name of the field.
Display label for the field.
Whether the field is required. Defaults to
False.Whether the field accepts only integers. If
False, accepts decimal numbers. Defaults to True.Help text for the field.
Default value for the field, passed as DataMap.
Minimum allowed value, passed as DataMap.
Maximum allowed value, passed as DataMap.
file_upload_field
file_upload_field
Creates a file upload field.Parameters:
The internal name of the field.
Display label for the field.
Instructions for the file upload.
Whether the field is required. Defaults to
False.Whether multiple files can be uploaded. Defaults to
False.Maximum file size in MB. Defaults to
10.List of supported file extensions, for example pdf and docx.
Minimum number of files. Valid only
when allow_multiple_files=True.Maximum number of files. Valid only
when allow_multiple_files=True.message_output_field
message_output_field
field_output_field
field_output_field
list_output_field
list_output_field
Creates a list output field to display tabular data.Parameters:
The internal name of the field.
Display label for the field.
The list of items to display, passed in a DataMap.
Mapping of source property names to table column labels. Only those columns appear if present.
list_input_field
list_input_field
Creates a list input field to display tabular data.Parameters:
The internal name of the field.
Display label for the field.
Whether the user can add rows.
Whether the user can delete rows.
The list of items to display, passed in a DataMap.
Mapping of source property names to table column labels. Only those columns appear if present.
file_download_field
file_download_field
single_choice_input_field
single_choice_input_field
Creates a single-choice input field. Display options as a dropdown or as radio buttons.Parameters:
The internal name of the field.
Display label for the field.
Whether the field is required. Defaults to
False.The list of available choices, passed as DataMap.
Whether to display options as a dropdown. If
False, display as radio buttons. Defaults to True.Column name used for display text in dropdown.
Placeholder text for the dropdown.
Default selected value, passed as DataMap.
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.Parameters:
The internal name of the field.
Display label for the field.
Whether the field is required. Defaults to
False.The list of available choices, passed as DataMap.
Whether the field shows as a dropdown. If
False, the field shows as checkboxes. Defaults to True.Column name for the display text in a dropdown.
Placeholder text for the dropdown.
Default selected values, provided as a DataMap.
Mapping of source property names to display labels for complex choice objects.
Minimum number of items the user must select.
Maximum number of items the user can select.
user_input_field
user_input_field
Creates a user selection field in the form.Parameters:
Internal name of the field.
Display label for the field.
Whether the field is required. Defaults to
False.Whether the user can select more than one person. Defaults to
False.Minimum number of users to select. Applies only when
multiple_users=True. Accepts an integer or a DataMap for dynamic configuration through expressions.Maximum number of users to select. Applies only when
multiple_users=True. Accepts an integer or a DataMap for dynamic configuration through expressions.form():
Python
Dynamic form input
Form fields can change based on user actions. You define the dependencies between the user’s interactions and your tools to control dynamic behavior in the form. This includes progressive selection, showing or hiding widgets, and updating widget labels. Use the following methods to configure dynamic forms:visibility_behaviour_field
visibility_behaviour_field
Adds a visibility behaviour that shows or hides fields based on conditions.
Unique identifier for this behaviour.
Field that triggers evaluation of visibility rules when its value changes.
List of visibility rules. Each rule specifies a condition and an
impacted_field that changes visibility.Display name for this behaviour.
label_behaviour_field
label_behaviour_field
Adds a label-changing behaviour that updates field labels based on conditions.
Unique identifier for this behaviour.
Field that triggers label evaluation when its value changes.
List of label rules. Each rule includes a condition and an
impacted_field whose label changes.Display name for this behaviour.
value_source_behaviour_field
value_source_behaviour_field
Adds a value-source behaviour that populates a field using results from a tool.
Supports a simplified API or a manual API.
Unique identifier for this behaviour.
Field that triggers execution of the tool when its value changes.
Field that receives values returned by the tool.
Simplified API parameters
Name of the tool to call, for example
get_states_or_provinces.UUID of the tool.
Mapping of tool parameters to field expressions. For example country maps to
parent.field.country.Client instance that enables automatic retrieval of the tool schema.
Manual API parameters
Tool identifier in name colon UUID format.
Schema that describes the expected inputs for the tool.
Mapping of input parameters to values or expressions used by the tool.
Common optional parameters
Display name for this behaviour.
Python

