Skip to main content
Use a user activity node to define interactive steps in your agentic workflow where users provide or receive information in one of two ways:
  • 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
Note:User activity nodes support multi-language configurations. Define target languages in your agentic workflow code and manage translations through CSV export and import. For complete details, see Multi-language support.
To add a user activity node to your agentic workflow, start by creating a userflow() object.

Multi-turn conversations user activity

To collect or deliver one piece of data at a time, call field() on the userflow() object. This method accepts the following input parameters:
name
string
required
Unique identifier for the node.
kind
UserFieldKind
required
Type of user activity. Supported types: Text, Date, DateTime, Time, Number, File, Boolean, Object, Choice.
display_name
string
Display name for the node.
description
string
Description of the node.
direction
string
required
Indicates whether the node is for input or output.
default
any
Default value for the node.
option
UserFieldOption
List of predefined options with their labels and values.
is_list
bool
Indicates whether the node accepts multiple values.
min
any
Minimum value or constraint.
max
any
Maximum value or constraint.
input_map
DataMap
Define input mappings using a structured collection of Assignment objects.
custom
dictionary
Dictionary for additional metadata or configuration.
Here is an example that shows how to use field():
Python

Forms user activity

To prompt for multiple pieces of data in a single turn, instantiate the form() object to create a form node. This method accepts the following input parameters:
name
string
required
The internal name of the form.
display_name
string
The display name shown on the form.
instructions
string
Instructions text for the form.
submit_button_label
string
The label for the submit button. Defaults to Submit if not set.
cancel_button_label
string
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:
Creates a text input field. Configure it as a single-line input or a multi-line text area.Parameters:
name
string
required
The internal name of the field.
label
string
Display label for the field.
required
bool
Whether the field is required. Defaults to False.
single_line
bool
Whether the field uses a single line. If False, creates a multi-line text area. Defaults to True.
placeholder_text
string
Placeholder text for the field.
help_text
string
Help text for the field.
default
any
Default value for the field, passed as DataMap.
regex
string
Regular expression pattern for input validation.
regex_error_message
string
Custom error message for failed regex validation. Defaults to: “Input does not match the required pattern”.
Creates a boolean input field. Render it as a checkbox or radio buttons.Parameters:
name
string
required
The internal name of the field.
label
string
Display label for the field.
single_checkbox
bool
Whether to display as a single checkbox. If False, displays as radio buttons. Defaults to True.
default
any
Default value for the field, passed as input_map.
true_label
string
Label for the true option. Defaults to True.
false_label
string
Label for the false option. Defaults to False.
Creates a date range input field with start and end date pickers.Parameters:
name
string
required
The internal name of the field.
label
string
Display label for the field.
required
bool
Whether the field is required. Defaults to False.
start_date_label
string
Label for the start date field.
end_date_label
string
Label for the end date field.
default_start
any
Default value for the start date, passed as DataMap.
default_end
any
Default value for the end date, passed as DataMap.
min_date
any
DataMap that sets the minimum date constraint and maps to self.input.min_date.
max_date
any
DataMap that sets the maximum date constraint and maps to self.input.max_date.
Creates a date input field.Parameters:
name
string
required
The internal name of the field.
label
string
Display label for the field.
required
bool
Whether the field is required. Defaults to False.
default
any
Default value for the field, passed as DataMap.
min_date
any
Minimum date value for the allowed range.
max_date
any
Maximum date value for the allowed range.
multiple_dates
bool
Whether the field supports selecting more than one date. Defaults to False.
Creates a datetime or time input field.
name
string
required
Internal name of the field.
label
string
Display label for the field.
required
bool
Whether the field is required. Defaults to False.
default
any
Default value for the field, provided through a DataMap.
min_time
any
Minimum allowed datetime or time value.
max_time
any
Maximum allowed datetime or time value.
inputType
UserFieldKind
Type of field, either DateTime or Time. Defaults to DateTime.
Creates a datetime or time range input field with start and end pickers.
name
string
required
Internal name of the field.
label
string
Display label for the field.
required
bool
Whether the field is required. Defaults to False.
start_date_label
string
Label for the start value.
end_date_label
string
Label for the end value.
default_start
any
Default start value, provided through a DataMap.
default_end
any
Default end value, provided through a DataMap.
min_time
any
Minimum allowed value for the range.
max_time
any
Maximum allowed value for the range.
Creates a number input field.Parameters:
name
string
required
The internal name of the field.
label
string
Display label for the field.
required
bool
Whether the field is required. Defaults to False.
is_integer
bool
Whether the field accepts only integers. If False, accepts decimal numbers. Defaults to True.
help_text
string
Help text for the field.
default
any
Default value for the field, passed as DataMap.
minimum
any
Minimum allowed value, passed as DataMap.
maximum
any
Maximum allowed value, passed as DataMap.
Creates a file upload field.Parameters:
name
string
required
The internal name of the field.
label
string
Display label for the field.
instructions
string
Instructions for the file upload.
required
bool
Whether the field is required. Defaults to False.
allow_multiple_files
bool
Whether multiple files can be uploaded. Defaults to False.
file_max_size
int
Maximum file size in MB. Defaults to 10.
supported_file_types
List[string]
List of supported file extensions, for example pdf and docx.
min_num_files
Any
Minimum number of files. Valid only when allow_multiple_files=True.
max_num_files
Any
Maximum number of files. Valid only when allow_multiple_files=True.
Creates a message output field to display static text.Parameters:
name
string
required
The internal name of the field.
label
string
Display label for the field.
message
string
The message text to display.
Creates a field output to display dynamic values.Parameters:
name
string
required
The internal name of the field.
label
string
Display label for the field.
value
any
The value to display, passed as DataMap.
Creates a list output field to display tabular data.Parameters:
name
string
required
The internal name of the field.
label
string
Display label for the field.
choices
any
The list of items to display, passed in a DataMap.
columns
dict[string, str]
Mapping of source property names to table column labels. Only those columns appear if present.
Creates a list input field to display tabular data.Parameters:
name
string
required
The internal name of the field.
label
string
Display label for the field.
isRowAddable
bool
Whether the user can add rows.
isRowDeletable
bool
Whether the user can delete rows.
default
any
The list of items to display, passed in a DataMap.
columns
dict[string, str]
Mapping of source property names to table column labels. Only those columns appear if present.
Creates a file download field.Parameters:
name
string
required
The internal name of the field.
label
string
Display label for the field.
value
any
The file to download, passed as DataMap.
Creates a single-choice input field. Display options as a dropdown or as radio buttons.Parameters:
name
string
required
The internal name of the field.
label
string
Display label for the field.
required
bool
Whether the field is required. Defaults to False.
choices
any
The list of available choices, passed as DataMap.
show_as_dropdown
bool
Whether to display options as a dropdown. If False, display as radio buttons. Defaults to True.
dropdown_item_column
string
Column name used for display text in dropdown.
placeholder_text
string
Placeholder text for the dropdown.
default
any
Default selected value, passed as DataMap.
columns
dict[string, str]
Mapping of source property names to display labels for complex choice objects.
Creates a multi-choice input field. Display options as a multi-select dropdown or as checkboxes.Parameters:
name
string
required
The internal name of the field.
label
string
Display label for the field.
required
bool
Whether the field is required. Defaults to False.
choices
any
The list of available choices, passed as DataMap.
show_as_dropdown
bool
Whether the field shows as a dropdown. If False, the field shows as checkboxes. Defaults to True.
dropdown_item_column
string
Column name for the display text in a dropdown.
placeholder_text
string
Placeholder text for the dropdown.
default
any
Default selected values, provided as a DataMap.
columns
dict[string, str]
Mapping of source property names to display labels for complex choice objects.
minItems
any
Minimum number of items the user must select.
maxItems
any
Maximum number of items the user can select.
Creates a user selection field in the form.Parameters:
name
string
required
Internal name of the field.
label
string
Display label for the field.
required
bool
Whether the field is required. Defaults to False.
multiple_users
bool
Whether the user can select more than one person. Defaults to False.
min_num_users
any
Minimum number of users to select. Applies only when multiple_users=True. Accepts an integer or a DataMap for dynamic configuration through expressions.
max_num_users
any
Maximum number of users to select. Applies only when multiple_users=True. Accepts an integer or a DataMap for dynamic configuration through expressions.
Here is an example that shows how to use 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:
Adds a visibility behaviour that shows or hides fields based on conditions.
name
string
required
Unique identifier for this behaviour.
on_change_to_field
string
required
Field that triggers evaluation of visibility rules when its value changes.
rules
list[dict]
required
List of visibility rules. Each rule specifies a condition and an impacted_field that changes visibility.
display_name
string
Display name for this behaviour.
Adds a label-changing behaviour that updates field labels based on conditions.
name
string
required
Unique identifier for this behaviour.
on_change_to_field
string
required
Field that triggers label evaluation when its value changes.
rules
list[dict]
required
List of label rules. Each rule includes a condition and an impacted_field whose label changes.
display_name
string
Display name for this behaviour.
Adds a value-source behaviour that populates a field using results from a tool. Supports a simplified API or a manual API.
name
string
required
Unique identifier for this behaviour.
on_change_to_field
string
required
Field that triggers execution of the tool when its value changes.
impacted_field
string
required
Field that receives values returned by the tool.

Simplified API parameters

tool_name
string
Name of the tool to call, for example get_states_or_provinces.
tool_id
string
UUID of the tool.
field_mappings
dict[string, string]
Mapping of tool parameters to field expressions. For example country maps to parent.field.country.
client
any
Client instance that enables automatic retrieval of the tool schema.

Manual API parameters

tool
string
Tool identifier in name colon UUID format.
tool_input_schema
dict
Schema that describes the expected inputs for the tool.
tool_input_map
dict
Mapping of input parameters to values or expressions used by the tool.

Common optional parameters

display_name
string
Display name for this behaviour.
Here is an example that shows how to configure dynamic forms:
Python