Before you start
A mounted widget
The controller only exists once the widget is installed and mounted in your app.
Get the controller
<RinggWidget config /> builds the controller for you. onReady hands it back:Lifecycle events
The React Native and Flutter widgets emit five lifecycle events on an in-memory event bus. The web widget uses the same names as browserCustomEvents, with two differences: it never emits ringg:component_acknowledgement, and its ringg:calendar_booking has no "failed" status. See web widget events.ringg:calendar_booking and ringg:component_acknowledgement only fire when the agent sends interactive components. An agent configured for plain voice or text never emits them.controller.eventBus.on returns an unsubscribe function.Controller methods
Call these to drive the widget from your own buttons, deep links or navigation events.Reading state
Each store has a hook that re-renders your component when its snapshot changes. Use these to build your own UI, or to mirror the widget’s state elsewhere in your app.name, message, isSelf, timestamp, an optional sourceUrl for retrieved sources, and componentType with componentData when the message renders a component instead of text.Interactive components
Agents can send interactive components into the chat thread instead of plain text. All six types render natively, with no work on your side beyond mounting the widget.Configure which components an agent can send from the dashboard. See Chat Components for authoring them.
Agent-triggered app actions
An agent can fire actions during a conversation, for example to open a screen or focus a field. On the web these become browser events. React Native has no ambient event bus, so you supply the handler throughports and receive the same payload.eventLogs: { enabled: true } in config to also show each fired action as an inline pill in the chat thread, which makes these easy to watch while building.Ports reference
ports overrides what the widget wires on its own. Every entry is optional: supply one and yours is used, leave it out and the default applies.ports is read once, when the widget builds the controller. Changing it later has no effect; changing config rebuilds the conversation from scratch.Own the lifecycle yourself
When the widget cannot own the transport, build the controller and pass that instead.defaultUrlResolver keeps the Ringg endpoints without you naming them:Verify your handlers
- Open and close the panel once, then confirm one
ringg:widget_statusevent per action. - Start and end one conversation, then confirm
ringg:conversation_statuscarries acallId. - Navigate away and back, then confirm listeners are not duplicated.
- Submit and skip feedback in separate runs if the feedback screen is enabled.
- Unmount the screen during a call and confirm the microphone indicator clears.
Next steps
Review conversations in Logs
Each conversation’s transcript and analysis, under call type Webcall.
Read Analytics
Totals and trends across every conversation.