Skip to main content
راهنمای کاربری سکو صوفی
Console

Add the live-chat widget to your website

Updated 2026-11-09 · 3 min read

For users

What it is for

The live-chat widget puts a chat button on your site. Visitors click it and chat with your support team or a hooshvare (AI companion). The chat itself is a live-chat inbox in Customer Support (HelpDesk); the widget is only the button and window on your site.

Before you start

  • You need a HelpDesk project with a live-chat inbox. See Set up a live-chat inbox.
  • If the site is not on your console's own domain, add the site's address (for example https://www.example.com) to the inbox Allowed origins.

Steps

  1. Open Customer Support → Projects → your project → Project settings → live-chat tab → edit your inbox → Embed tab (fa: «جاسازی»).
  2. Choose where the chat should appear:
    • Every page: SufiCMS → Site settings → Site code → JavaScript. See Site code.
    • One page only: that page → Code → JS. Page JS is shared by all languages of that page. Use one place only. If the snippet is in both, the chat loads twice on that page.
  3. Paste the snippet, Save draft, re-open and check it, then Publish.
  4. Open the live site in a private window, in each language. Click the chat button and check that the chat opens and loads.

Change the look (optional)

The snippet sets a data-livechat-config value (JSON). Useful keys:

Key What it does
position Corner, for example "BottomRight"
primaryColor, textColor Button and header colours, for example "#0067A5", "#FFFFFF"
showLauncherLabel true shows a text pill next to the icon
theme "dark" makes the chat window dark (0.1.0-beta.9.0.0)
customCss Extra CSS for the widget frame
launcherLabel, headerTitle Fixed texts. Leave them out to get the built-in text in each language
panelWidthPx, panelHeightPx Window size. Leave out for the default 380 × 580

Other keys in the default snippet: offsetX, offsetY, zIndex, launcherSizePx, launcherIconUrl, launcherIconEmoji, panelBorderRadiusPx, starterText, contactFormTitle, contactFormHint, fontFamily.

Tips

  • Leave texts out to get every language right. If you set launcherLabel or headerTitle, that one text shows in every language. Without them, the widget shows its own text per page language (fa «گفتگو با پشتیبانی» / «پشتیبانی», en "Chat with support" / "Support").
  • The widget's stylesheet loads after your page CSS. To restyle it, use customCss, or selectors that start with body #sufi-lc-root.
  • After branding changes on the inbox, copy the snippet again.
  • If the chat window shows an error, it has a retry button. A slow connection can keep the spinner going for a while.
  • On phones the chat opens full screen.

Was this helpful?