Web embed

A web embed puts a talk 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 embed script loads on your page and reads the embed's public settings (name, theme, consent notice).
  2. When the visitor starts a call, the embed asks for the microphone, then asks zlicx to start a conversation. 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 embed

  1. In the console, open the agent and go to the Widget tab.
  2. Create an embed 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://in-api.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 embed's ID, which starts with wgt_.
  • 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 embed 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 embed copies it to its styles. Also allow the script origin in script-src and the zlicx API in connect-src. If the embed requires a CAPTCHA, also allow https://challenges.cloudflare.com in script-src and frame-src.

html
<zlicx-widget widget-id="YOUR_WIDGET_ID"></zlicx-widget>
<script async nonce="PER_RESPONSE_NONCE"
  src="https://in-api.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.

CAPTCHA

Allowed origins and rate limits stop casual misuse, but a script can fake the Origin header. Turn on Require CAPTCHA in the Widget tab to make visitors pass a Cloudflare Turnstile check before a call starts. Most visitors never see a puzzle. The Turnstile script loads only for embeds that require it. If the switch is unavailable, ask your zlicx administrator to configure Turnstile.

What you get after each call

Embed 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 embed and conversation IDs, and why the call ended.

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

Privacy controls

The agent's privacy settings apply to embed 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 embed calls.

Limits

  • Call length: each conversation lasts up to 15 minutes by default. The call ends automatically when it expires, or earlier if the agent has a shorter maximum conversation length.
  • Per visitor: up to 2 new conversations per 15 minutes for the same page origin and IP address.
  • Per embed: 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 accounts can have higher limits. Write to support@zlicx.com to discuss them.

Browsers and networks

The embed 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

Embed calls are billed on your plan for the agent's price tier, per connected minute, without the Indian telephony charge, since no phone line is used. See pricing and billing.

Common problems

The embed does not appear
Check that the embed 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 embed then shows an Enable sound button; one click fixes it.
“Too many widget sessions”
The per-visitor or per-embed limit was reached. Wait a few minutes, or ask your administrator about higher limits.
“Complete the security check” or “The CAPTCHA check failed”
The embed requires a CAPTCHA. Wait for the check to finish, or reload the page and try again. If it never appears, the page's CSP or a content blocker may be blocking challenges.cloudflare.com.
The call drops on an office network
The network blocks direct WebRTC traffic. Ask your zlicx administrator whether a TURN relay is configured.

Related

  • Embed browser API: the routes the embed script calls.
  • REST API: create and change embeds from your own code, under /agents/:agentId/embeds and /embeds/:embedId.