Live Chat Widget
Two script tags on your site, and every visitor conversation lands in your Live Chat agent dashboard.
Integrator guide, document version 1.0.
1. How It Works
The snippet loads a small script that injects a chat bubble into your page as an iframe. No account, password, or SDK install is needed on your side — the widget figures out which company (tenant) it belongs to from your website's own domain.
| 1 | You add the snippet to your site's HTML. |
|---|---|
| 2 | A visitor opens the bubble and sends a message. |
| 3 | The message is saved and pushed in real time to your team's agent dashboard. |
| 4 | An agent replies from https://chat.enopsy.xyz — the visitor sees the reply instantly. |
2. Before You Install — Your Domain Must Be Registered
The widget identifies your company by matching your website's domain against a registered list — not by a login or an API key. Your domain has to already be added to your tenant's origin list before the widget will work.
3. The Snippet
Paste this right before </body> on every page you want the chat bubble to appear on:
<script>
window.LiveChatConfig = {
code: "your-site-name"
};
</script>
<script src="https://chat.enopsy.xyz/embed.js" async></script>
apiUrl unless you're explicitly told otherwise — the widget automatically uses the same domain the embed.js script tag itself was loaded from (https://chat.enopsy.xyz). Never set it to a backend-chat.enopsy.xyz address — that's the API server, not the widget frontend, and it will refuse to load in an iframe (you'll see a "refused to connect" error).
Config fields
| Field | Required | Notes |
|---|---|---|
code | Yes | Any non-empty label of your choosing (e.g. your company name). It doesn't need to match anything — it's just a required field the script checks isn't blank. |
apiUrl | No | Defaults to wherever embed.js itself was loaded from if omitted — that's correct for almost everyone. Only set it if EnOpSy explicitly tells you to point at a different widget frontend domain, and never set it to a backend-chat.enopsy.xyz address. |
4. How Your Company Is Identified
When the widget loads, it reads the domain it's running on (from the page's own origin, falling back to the referring page) and asks EnOpSy "who owns this domain?" That lookup is what your registered origin list (Section 2) answers. Nothing about which company you are comes from the snippet itself — swapping the code value to something else has no effect on this.
5. Verifying It Works
- Load your page and confirm the chat bubble appears in the corner.
- Send a test message from the widget.
- Log into chat.enopsy.xyz — the conversation should appear in the conversation list within a few seconds.
- Reply from the dashboard and confirm it shows up back in the widget.
6. The Agent Side
Your team doesn't need a separate account for this — signing into chat.enopsy.xyz uses the same login as the rest of your EnOpSy account. Once in, every visitor conversation across every one of your registered domains appears in one shared conversation list, with a live-visitors panel showing who's currently browsing.
7. Troubleshooting
| Symptom | Cause |
|---|---|
| Bubble never appears | Check the browser console for a script error — the code field is likely missing or blank. |
| Bubble appears, but sending a message fails / conversation never shows up on the dashboard | Your domain almost certainly isn't on the registered origin list yet (Section 2). Confirm with your EnOpSy account contact. |
| It worked before, now intermittently fails | This can happen during backend maintenance. If it persists, report it — it's not something fixable from your site's side. |
