Website widget

The website widget puts a “talk to us” button on your site. A visitor clicks it, allows the microphone, and speaks with your zlicx agent in the browser. No phone number or app is needed. Every call is recorded in your call logs like a phone call, with its transcript, summary, and extracted data.

How it works

  1. The widget script loads on your page and reads the widget's public settings (name, theme, consent notice).
  2. When the visitor starts a call, the widget asks for the microphone, then asks zlicx for a session. zlicx checks that the page's origin is allowed, applies rate limits, and confirms the account has credit.
  3. The browser connects its audio directly to the zlicx voice engine over WebRTC, and your agent greets the caller.
  4. When either side hangs up, zlicx writes the call log: transcript, post-call analysis, recording (if enabled), and your post-call webhook (if configured).

1. Create the widget

  1. In the console, open the agent and go to the Widget tab.
  2. Create a widget and add every site that will host it to Allowed origins, for example https://www.example.in. Origins must match exactly: scheme, host, and port. Wildcards are not accepted.
  3. Turn on Enabled. The agent must also be active and fully configured.

2. Add it to your site

Paste the snippet from the Widget tab before the closing </body> tag:

html
<zlicx-widget widget-id="YOUR_WIDGET_ID"></zlicx-widget>
<script async src="https://api.in.zlicx.ai/widget/v1/zlicx-widget.js"></script>

The script finds the zlicx API from its own URL. Set api-base-url only if you serve the script from somewhere else.

Attributes

Theme settings come from the console. You can override them per page with attributes on the <zlicx-widget> element:

  • widget-id (required): the widget's ID.
  • open: "true" shows the panel open on page load.
  • position: bottom-right, bottom-left, top-right, or top-left.
  • launcher-size: compact, comfortable, or large.
  • Colours: primary-color, accent-color, surface-color, text-color, muted-text-color, button-text-color, border-color.
  • Layout: panel-width (280–420), border-radius (0–32), default-open, show-avatar, avatar-image-url.
  • Text: brand-name, action-text, welcome-text, start-call-text, end-call-text, connecting-text, listening-text, speaking-text, ended-text.
  • nonce: style nonce for sites with a strict Content Security Policy (see below).

Sites with a Content Security Policy

The widget renders inside a shadow root and creates inline styles. On a strict CSP, put your page's per-response nonce on the script tag; the widget copies it to its styles. Also allow the script origin in script-src and the zlicx API in connect-src.

html
<zlicx-widget widget-id="YOUR_WIDGET_ID"></zlicx-widget>
<script async nonce="PER_RESPONSE_NONCE"
  src="https://api.in.zlicx.ai/widget/v1/zlicx-widget.js"></script>

Consent notice

With Consent required on, the visitor must tick a notice before the call starts. The default text is “This voice call may be recorded and transcribed.” Change it in the Widget tab to match your privacy notice, for example to cover your obligations under India's Digital Personal Data Protection Act, 2023.

What you get after each call

Widget calls appear under Call logs with the source WEB_WIDGET. Each record includes:

  • Transcript: every caller and agent turn.
  • Post-call analysis: a summary, the caller's intent, and the fields you defined on the agent's Analysis tab. Analysis is skipped when the caller said nothing.
  • Recording: the call audio, when the agent's privacy settings allow it.
  • Details: the page origin, an anonymous visitor ID kept in the visitor's browser, the widget and session IDs, and why the call ended.

If the agent has a post-call webhook, zlicx sends it for widget calls too, with the same payload as phone calls.

Privacy controls

The agent's privacy settings apply to widget calls exactly as to phone calls:

  • Store call audio off: no recording is made.
  • Zero-PII retention on: no recording, no transcript, and no extracted data are kept, and analysis is skipped.
  • Sensitive details are redacted from stored call logs unless your deployment turns redaction off.
  • Retention periods you set on the agent apply to widget calls.

Limits

  • Call length: each session lasts up to 15 minutes by default. The call ends automatically when the session expires, or earlier if the agent has a shorter maximum conversation length.
  • Per visitor: up to 2 new sessions per 15 minutes for the same page origin and IP address.
  • Per widget: up to 5 calls at the same time.
  • Credit: calls need wallet credit. Without it, new calls do not start and visitors see that the agent is temporarily unavailable. A call in progress ends if the account runs out.

Enterprise and self-hosted deployments can change these limits; see the self-hosting guide.

Browsers and networks

The widget works in current versions of Chrome, Edge, Firefox, and Safari on desktop and mobile. The page must be served over HTTPS for the browser to allow the microphone.

Audio travels over WebRTC (UDP). zlicx gives each session the network servers it needs, including a relay (TURN) on deployments that configure one, so callers behind strict corporate firewalls can still connect.

Billing

Widget calls are billed like other calls: speech and model usage plus a small markup, and the platform fee per connected minute. There is no telephony charge for browser calls. See pricing.

Troubleshooting

The widget does not appear
Check that the widget is enabled, the agent is active and configured, and the widget-id is correct. Open the browser console for errors loading the script.
“Origin is not allowed for this widget”
Add the page's exact origin to Allowed origins. A page on https://example.in and one on https://www.example.in need separate entries.
The microphone prompt never shows
The page must use HTTPS, and the site must not block microphone access with a Permissions-Policy header.
The call connects but there is no sound
Some browsers block audio until the visitor interacts with the page. The widget then shows an Enable sound button; one click fixes it.
“Too many widget sessions”
The per-visitor or per-widget limit was reached. Wait a few minutes, or ask your administrator about higher limits.
The call drops on an office network
The network blocks direct WebRTC traffic. Ask your zlicx administrator whether a TURN relay is configured.

Related