---
sourceDocument: Brazil Build or modify applications
sourceDocumentLink: https://www.servicenow.com/docs/r/application-development

 Release :

    - brazil

ft:locale :

    - en-US

ft:publication_title :

    - Brazil Build or modify applications

ft:clusterId :

    - cadev

bundleId :

    - cadev

workflow :

    - Development, Data, and Analytics


---

# Event handler generation

# Event handler generation {#ariaid-title1}

Release version: Brazil  
Updated November 19, 2026  
![](https://www.servicenow.com/docs/portal-asset/ico-clock) 3 minutes to read
Summarize  
![AI sparkle icon](https://servicenow.com/docs/portal-asset/ai-sparkle-icon) Summarized using AI  
This content was generated using new OpenAI-powered functionality. Results are provided on an as is basis and are not guaranteed to be accurate or complete.  

## Summary of Event handler generation

ServiceNow Otto event handler generation simplifies the configuration of event handlers for UI components in UI Builder by allowing you to use natural language instead of manually setting complex routing parameters and binding expressions.
This feature interprets your plain-language descriptions to generate accurate event handler configurations, which you can preview, edit, and apply easily.
Show full answer Show less  

## Key Features

* **Natural language input:** Replace manual form-filling with plain language prompts to quickly define how components respond to user interactions.
* **Automatic routing and binding:** Otto intelligently interprets your intent to set destination pages, URLs, and parameter bindings without needing developer expertise in routing syntax.
* **Dynamic parameter binding:** Bind page parameters dynamically from state parameters or event payloads, enabling context-aware navigation without static values.
* **Contextual sample prompts:** Receive relevant example prompts based on your current experience's pages and components to help you get started.
* **Human review and editing:** Preview generated configurations in read-only mode before applying, with options to edit or reject for accuracy.
* **Support for common handlers:** Supports Open page or URL, Open and close modal dialog, and Viewport load requested event handlers.

## How It Works

When adding an event handler in UI Builder, open the ServiceNow Otto panel and enter a natural language description or select a sample prompt. Otto processes this input against your experience's pages, parameters, and event payloads to generate a configuration preview. You then review and accept or reject the generated handler, with the ability to further edit fields before saving.

## Supported Event Handlers

* **Open page or URL:** Navigate users to internal pages or external URLs, supporting static or dynamic parameter bindings and options like opening in a new tab.
* **Open and close modal dialog:** Control modal dialogs within the current experience based on natural language descriptions of which dialog to open or close and when.
* **Viewport load requested:** Trigger loading of specific viewports in response to specified events, configured via natural language prompts.

## Event Payloads and Parameter Binding

Some component events emit payloads containing data fields. Otto can automatically map these payload fields to destination parameters, enabling fully dynamic navigation (for example, opening the correct record when clicking a reference link). For events without payloads, parameters can be bound from state or entered as static values.  
ServiceNow Otto event handler generation enables you to configure event handlers for UI components using natural language, eliminating the need for manual configuration of complex routing parameters and binding
expressions.

In UI Builder, event handlers define how a component responds to user interactions, such as a button select or a reference link selection. Configuring these handlers manually requires knowledge of specific
parameters, page routing structures, and binding syntax --- all of which can be time-consuming and error-prone, particularly for developers who are new to the platform.

With the event handler generation, you describe the desired behavior in plain language. ServiceNow Otto interprets the prompt, identifies the correct destination page or URL, maps any required parameters, and generates a complete configuration. You review the result before applying it, and you can edit any
field using the standard form controls before saving.

## Benefits {#concept-event-handler-generation__section_benefits}

The event handler generation provides the following benefits:

Faster configuration
:   Natural language input replaces manual form-filling, significantly reducing the time needed to set up event handlers.

Reduced complexity
:   ServiceNow Otto interprets intent and populates routing parameters, destination pages, and bindings automatically.

Intelligent parameter binding
:   ServiceNow Otto can bind page parameters dynamically from state parameters or event payloads, enabling context-aware navigation without manual binding expressions.

Contextual sample prompts
:   The ServiceNow Otto panel displays relevant sample prompts based on the pages and components available in the current experience, so you can start quickly without composing a prompt from scratch.

Human review before applying
:   Generated configurations are presented as a read-only preview before being committed. Developers can accept and edit, or reject and re-prompt, ensuring accuracy at every step.

## How ServiceNow Otto generates event handler configurations {#concept-event-handler-generation__section_how_it_works}

When you add an event handler to a component in UI Builder and open the ServiceNow Otto configuration panel, the system presents a text field where you describe the behavior you want. You can enter your own prompt or select from the sample prompts displayed.

ServiceNow Otto processes the prompt against the available pages, parameters, and event payloads in the current experience and generates a configuration. The result is displayed as a read-only preview. You review the
destination, parameter bindings, and trigger settings, then choose to accept and edit, or reject the result.

If you accept, the configuration is applied to the component. You can continue editing individual fields using the standard form controls before selecting Add to save the handler.

## Supported event handlers {#concept-event-handler-generation__concept-event-handler-generation-supported}

The event handler generation supports the three most commonly used event handlers in UI Builder:

Open page or URL

:   The Open page or URL event handler navigates the user to a page when a component event triggers. The destination can be a page within the current experience or an external URL.

    For pages in the current experience, you select the target page and provide any required parameters, such as a table name or sys_id. For external URLs, you enter the full URL. Both destination types support an Open in new tab option.

    Parameters can be bound statically or dynamically from state parameters or event payload fields. Advanced mode exposes additional binding fields for route, fields, and params.

Open and close modal dialog

:   The Open and close modal dialog event handler opens or closes a modal dialog in the current experience when a component event triggers. ServiceNow Otto can configure this handler based on a natural language description of which dialog to open or close and under what conditions.

Viewport load requested

:   The Viewport load requested event handler triggers the loading of a specific viewport within the experience when a specified event triggers. ServiceNow Otto can configure this handler based on a natural language description of the target viewport and the triggering event.

## Event payloads and parameter binding {#concept-event-handler-generation__section_event_payload}

Some component events dispatch a payload --- a set of data values emitted by the source component when the event triggers. When a payload is available, ServiceNow Otto can bind destination parameters directly to payload fields, enabling fully dynamic navigation without any static values.

For example, the Reference link clicked event on a list component dispatches the following payload fields: `listTable`, `nativeEvent`, `record_id`, `row`,
`sys_id`, and `table`. ServiceNow Otto can map these fields to the corresponding parameters of a record page destination automatically, so that selecting any reference link in the list opens the correct record.

When an event has no payload --- such as the Button clicked event --- parameters must be bound from state parameters or entered as static values.
**Related concepts**   

* [Use case: Configure an event handler with ServiceNow Otto](https://www.servicenow.com/docs/fIvfVlNL7G14ElCd6cNZow "Automate event handler configuration without writing manual binding expressions.")  
**Related tasks**   

* [Configure an event handler with ServiceNow Otto](https://www.servicenow.com/docs/ibbRTE4QBudvUA3yDWRWSQ "Use ServiceNow Otto in UI Builder to configure event handlers. At present, you can configure Open page or URL, Open or close modal, and View load requested event handlers.")

