Documentation Index
Fetch the complete documentation index at: https://docs.ringg.ai/llms.txt
Use this file to discover all available pages before exploring further.
Looking for widget state events (open/close, conversation start/end, feedback)? See Widget Lifecycle Events. This page covers events your agent fires on the page during a call.
window.
Where to set this up. In the Ringg dashboard, open your agent and go to Embed → Interactive Components → Execute DOM Action (
execute_dom_action). Each entry under Actions is one event the agent can dispatch.How it works
Each action you add in the dashboard has three fields:| Field | What it is |
|---|---|
| Event ID | The event name your page listens for on window via addEventListener. |
| Description | Helps the agent decide when to fire the action. |
| Default Payload (optional) | A JSON object delivered as event.detail when the action fires. |
- The agent decides during a call when to fire one of its configured actions.
- The widget dispatches a
CustomEventonwindowusing the action’s Event ID as the event name. - Your page’s listener for that Event ID runs.
Listening for an action
Use the Event ID exactly as configured in the dashboard:focus_search action during a call, your handler runs.
Reading the payload
The Default Payload you configured arrives asevent.detail. Destructure the fields you need:
event.detail is null.
React example
More examples
Show actions in the chat thread (optional)
Useful while you are wiring things up. Enable it on the widget config to see a small pill in the chat thread whenever an action fires.Naming and conventions
- Multiple listeners work. You can attach more than one handler to the same Event ID from different components, and all of them fire.
- One listener, many actions. Inside a single handler, use
event.typeto route on the Event ID if you want one place to handle several actions. - Listeners only run during a call. Nothing fires when the user is idle.
QA notes
Add an Event ID in the dashboard, attach a matching
addEventListener on your page, and confirm it fires during a test call.If you configured a Default Payload, verify
event.detail contains those fields with the expected values.Enable
eventLogs.enabled during integration to visually confirm each action fires.In single-page apps, remove listeners on unmount so navigation does not duplicate handlers.
