Prerequisites
Before you begin, make sure you have:- An active Ringg AI account
- Your API key (X-API-KEY)
- An assistant configured for web calls
- Access to modify your website’s HTML
Execution
Step 1: Configure Your Assistant for Web Calls- Open your assistant in the Ringg AI dashboard
- Navigate to the assistant settings
- Configure the WebCall Settings section
- Add your website domain to the Whitelist Domains list
- Open your assistant in the Ringg AI dashboard
- Click the Embed button in the top right corner
- Copy the provided code snippet
</body> tag.
Step 5: Configure CDN Permissions
If your website uses Content Security Policy (CSP), add the following CDN links to your security policies:
- Visit your website
- Look for the Web Call button (typically in the bottom right corner)
- Click the button to start a call
- Speak to test the voice interaction
Widget Positioning
Control where the widget appears on your page. Supported from v1.0.19+.Fixed Mode (Default)
The widget floats over your page, fixed to the browser viewport. No additional setup required.Absolute Mode
Embed the widget inside a specific container on your page. Step 1: Add a container with the required ID| Option | Type | Default | Description |
|---|---|---|---|
triggerPlacement | string | "fixed" | "fixed" for viewport, "absolute" for container |
triggerAlignment | string | "bottom-right" | Trigger button position |
hideTriggerOnExpand | boolean | true | Hide trigger when widget is open |
widgetAlignment | string | "bottom-right" | Expanded widget position |
Trigger Button Customization
Customize the floating action button that opens the widget. Supported from v1.0.19+.Button Styles
Custom Icon
| Option | Type | Default | Description |
|---|---|---|---|
styles | CSSProperties | — | Button CSS styles (width, height, backgroundColor, etc.) |
icon.url | string | Ringg phone icon | Custom icon URL |
icon.size | number | 20 | Icon size in pixels |
Widget Events
Subscribe to widget events and perform your custom actions based on them. Supported from v1.0.17.| Event | Payload |
|---|---|
ringg:widget_status | status: "maximised" | "minimised"mode: "audio" | "text" |
ringg:conversation_status | status: "started" | "ended"mode: "audio" | "text"callId: string |
ringg:feedback_status | status: "submitted" | "skipped"callId: stringrating?: number |
Usage
Chat Agent (Text Mode)
The Ringg widget supports a text-based chat mode alongside voice calls. In chat mode, the AI assistant handles conversations through typed messages instead of audio, while still supporting interactive widgets like callback scheduling, form collection, and all configured tools.Setting Up a Chat Agent
To set up a chat agent:- Open the Ringg AI dashboard and navigate to your assistants.
- Clone your existing voice assistant (or create a new one).
- Update the cloned assistant’s prompt to be optimized for chat — e.g., include structured responses, markdown formatting, and instructions for when to present widgets like the callback scheduler.
- Configure any chat-specific tools or widgets (calendar for callback scheduling, forms for data collection).
- Use the cloned assistant’s
agentIdin the embed code withdefaultTab: "text".
Enabling Chat Mode
SetdefaultTab to "text" when loading the agent to open the widget in chat mode by default:
Chat-Only Mode
To create a chat-only widget with no voice tab, hide the tab selector:Dual Mode (Voice + Chat)
You can also offer both voice and chat in the same widget. Users can switch between tabs freely:How Chat Mode Works
The chat agent uses the same underlying assistant configuration as voice mode with these key differences:- Input/Output: Text messages instead of audio streams. Audio input and output are disabled; transcription-based text communication is enabled.
- Context Compression: Long chat conversations are automatically compressed to manage token limits, keeping the conversation flowing without hitting model context limits.
- RAG Summarization: Knowledge base query results are summarized in chat mode to reduce token usage and provide concise answers.
- Interactive Widgets: Chat mode is especially powerful with widgets — the assistant can present callback scheduling calendars, data collection forms, and other interactive components directly in the chat window.
- Same Tools: All configured tools (API integrations, knowledge base queries, widgets, etc.) work identically in chat mode.
| Option | Type | Default | Description |
|---|---|---|---|
defaultTab | "audio" | "text" | "audio" | Tab shown when the widget loads. Use "text" for chat mode. Supported from v1.0.8+ |
hideTabSelector | boolean | false | Hides the audio/text tab switcher for a single-mode experience. Supported from v1.0.8+ |
Chat Widgets
Chat widgets are interactive UI components that the AI assistant can present to users during a conversation. They render directly inside the chat interface, enabling structured interactions like scheduling a callback, collecting form data, or booking appointments — all without leaving the chat.Widget Types
The assistant supports two built-in widget types:- Calendar Widget — Ideal for callback scheduling, appointment booking, and demo scheduling. Presents available date and time slots for the user to select.
- Form Widget — Perfect for collecting structured data like contact details, lead information, support tickets, or survey responses.
How Widgets Work
The widget interaction follows a seamless round-trip flow:- During a conversation, the assistant determines it’s the right moment to present a widget (e.g., the user asks to schedule a callback) and calls the
send_widgetstool. - The widget renders directly inside the chat interface.
- The user interacts with the widget (selects a time slot, fills out a form).
- The user’s response is sent back to the assistant automatically.
- The assistant processes the response, optionally triggers an API call (e.g., to create a booking in your CRM), and continues the conversation with a confirmation.
Calendar Widget (Callback Scheduling)
The calendar widget is the go-to solution for callback scheduling and appointment booking. It displays available time slots over a configurable number of days, and past slots are automatically excluded so users only see valid options. Common use cases:- Schedule a callback from a human agent
- Book a product demo or consultation
- Set up a follow-up appointment
| Field | Type | Required | Description |
|---|---|---|---|
tool_type | string | Yes | Must be "calender_widget_tool" |
tool_id | string | Yes | Unique identifier for this widget instance |
slot_duration_days | integer | Yes | Number of days to show slots for (e.g., 7) |
slot_interval_minutes | integer | Yes | Minutes between each slot (e.g., 30) |
start_time_24_hour_format | string | Yes | Slot start time in HH:MM format (e.g., "09:00") |
end_time_24_hour_format | string | Yes | Slot end time in HH:MM format (e.g., "17:00") |
timezone | string | Yes | IANA timezone (e.g., "Asia/Kolkata") |
api_config | object | No | Optional API to call when the user selects a slot |
- The assistant presents the calendar widget with available slots.
- The user picks a date and time.
- The selected datetime and timezone are sent back to the assistant.
- If
api_configis provided, the booking data is automatically forwarded to your API (e.g., to create a callback entry in your CRM or scheduling system). - The assistant confirms the booking to the user in a human-readable format (e.g., “Your callback has been scheduled for Monday, March 2nd at 10:30 AM IST”).
Form Widget (Data Collection)
The form widget renders a dynamic form with multiple field types directly inside the chat. It is ideal for collecting structured information that would be tedious to gather through back-and-forth messages. Common use cases:- Collect contact details or lead information
- Gather shipping/billing addresses
- Capture support ticket details
- Run quick surveys or preference questionnaires
| Field | Type | Required | Description |
|---|---|---|---|
tool_type | string | Yes | Must be "form_widget_tool" |
tool_id | string | Yes | Unique identifier for this widget instance |
title | string | Yes | Title displayed at the top of the form |
submit_button_label | string | Yes | Text on the submit button (e.g., "Submit") |
form_fields | array | Yes | Array of field definitions (see below) |
api_config | object | No | Optional API to call when the form is submitted |
| Field | Type | Required | Description |
|---|---|---|---|
key | string | Yes | Unique field identifier |
type | string | Yes | Field type (e.g., "text", "email", "select", "number") |
description | string | Yes | Label/placeholder text for the field |
required | boolean | Yes | Whether the field is mandatory |
options | array | No | Options list for select/dropdown fields |
api_config is provided, the data is also forwarded to your API endpoint.
Complete Example: Chat Agent with Callback Scheduling
Here is a full example of embedding a chat-only assistant with callback scheduling enabled:Prompt Examples for Chat Agents
Your assistant’s prompt (configured in the Ringg AI dashboard) controls when and how it uses widgets. Below are ready-to-use prompt examples for common chat scenarios.Chat Agent with Callback Scheduling
Chat Agent with Form Collection
Chat Agent with Both Calendar and Form
Tips for Writing Chat Prompts
- Be explicit about when to use widgets — tell the assistant exactly which situations should trigger the calendar or form widget.
- Don’t duplicate widget fields in conversation — if the form collects the user’s email, don’t ask for it in chat first.
- Confirm after widget interactions — instruct the assistant to acknowledge bookings and form submissions clearly.
- Keep it conversational — chat prompts should produce shorter, more casual responses than voice prompts.
