loadAgent takes one object that controls how the web widget looks and starts on your page. The agent’s prompt, voice and tools stay in the dashboard. Settings from the Appearance tab in Web widget overview are written into the copied snippet as these same fields.
Options marked 2.0 need a 2.0.0-beta CDN version. See Pick a CDN version.
CDN bundles
The CDN exposesloadAgent on window once the script has loaded. Two builds are published:
The ES build loaded as a plain
<script> puts its internals on window and can overwrite globals such as jQuery’s $. The snippet copied from the dashboard loads the ES build as a plain script, so on a non-module page change the file name to dv-agent.umd.js.
Full example
Core options
variables, the key and everything else in this object are readable in the page source. Never put passwords, internal tokens or personal data in them.
string
required
The agent to load.
string
required
Bearer <webcall-public-key>, from the dashboard snippet."audio" | "text"
default:"audio"
"audio" opens on voice, "text" on chat.boolean
default:"false"
true shows only the defaultTab mode.boolean
default:"false"
A trigger click starts the
defaultTab conversation directly. From 1.0.20.boolean
default:"false"
Skips the rating screen after a conversation. 2.0
boolean
default:"false"
Opens the panel on page load. 2.0
string
default:"Ringg AI Support"
Start-screen heading.
string
Start-screen text under the title. Defaults to Ringg’s copy.
string
Logo in the header. From 1.0.10.
{ text, links }
Replaces the privacy and terms text shown before a conversation. Words in
text that match a key in links link to that URL.string[]
Words cycled while a reply is pending. 2.0
object
Panel size, 400 × 456 px by default (95% of the screen width on mobile). See Window size.
object
Ringg copy and 5 stars by default. See Feedback screen.
{ enabled, showIds }
default:"{ enabled: false }"
Shows a pill in the chat each time an agent action fires. 2.0
Theme
Every color accepts a hex value or a CSS gradient string. Components inherit these values.string
Buttons, selected states, the trigger and the typing shimmer.
string
Text on
primaryColor.string
Panel background.
string
Cards, inputs and the visitor’s message bubble.
string
Puts agent messages in a bubble of this color. Unset, they render as plain text. 2.0
string
Body text.
string
Secondary text.
string
Borders and dividers.
string
Error states.
string
Success states.
string
Corner radius of the panel, cards and inputs, for example
"20px"."rounded" | "pill" | "square"
Button corner style.
Buttons
object
CSS properties for the floating trigger.
string
Trigger icon image. Defaults to the Ringg phone icon.
number
default:"24"
Icon width and height in pixels. 25 on 1.0.
string
default:"Start Call"
Label on the start-call button.
string
default:"Start Chat"
Label on the start-chat button.
Position
From 1.0.19."fixed" | "absolute"
default:"fixed"
"fixed" floats over the viewport. "absolute" places the widget inside the ringg_ai_container element.string
default:"bottom-right"
"center", "top-left", "top-right", "bottom-left" or "bottom-right".string
default:"bottom-right"
"bottom-left", "bottom-center" or "bottom-right".boolean
default:"true"
Hides the trigger while the panel is open.
loadAgent runs and give it a height. Without it, the widget creates ringg_ai_container at the end of <body>.
Window size
innerWindowProps sets the open panel’s width, height and borderRadius. Numbers are pixels; strings pass through as CSS. The Size controls in Appearance allow width 280–600 px, height 300–700 px and radius 0–40 px.
Feedback screen
Shown after a conversation ends, unlessbypassFeedbackScreen is true. A submitted or skipped rating fires ringg:feedback_status; see Events.
string
Heading above the stars.
string
Text under the heading.
number
default:"5"
Number of stars. Appearance offers 3 to 5.
{ filledColor, emptyColor }
Star colors.
string
Comment box placeholder.
string
Submit button label.