Widget SDK Overview
The Fyncall Widget SDK lets you embed a customizable chat widget on your website, enabling real-time customer support powered by AI.
Features
- Lightweight - Only 17KB initial load with lazy loading for the full chat experience
- Shadow DOM Isolation - CSS and JavaScript completely isolated from your site
- Real-Time Messaging - WebSocket-based instant message delivery
- AI-Powered - Connects to your configured AI agents for automated responses
- Multi-Platform - Works on desktop and mobile browsers
- Customizable - Match your brand with colors, positioning, and behavior settings
- Rich Messages - Product carousels, quick replies, order status cards
- E-commerce Integration - Shopify cart operations and customer sync
Architecture
The widget uses a tiered loading architecture for optimal performance:
┌────────────────────────────────────────────────────┐
│ TIER 1: LOADER (2KB) │
│ • Fetches tenant configuration │
│ • Creates global Fyncall namespace │
│ • Cache: 5 minutes │
└────────────────────────────────────────────────────┘
↓
┌────────────────────────────────────────────────────┐
│ TIER 2: SHIM (15KB) │
│ • Web Component: <fyncall-widget> │
│ • Closed Shadow DOM for isolation │
│ • Cache: 1 year (immutable) │
└────────────────────────────────────────────────────┘
↓
┌────────────────────────────────────────────────────┐
│ TIER 3: APP (80KB, lazy loaded on open) │
│ • Full chat UI and messaging │
│ • WebSocket connection │
│ • Cache: 1 year (immutable) │
└────────────────────────────────────────────────────┘
Performance
| Metric | Value |
|---|---|
| Initial load | 17KB (gzipped) |
| Time to launcher | < 100ms |
| Full widget load | < 300ms (on open) |
Quick Start
Add this script to your website before the closing </body> tag:
<script async src="https://cdn.fyncall.com/widget/loader.js"
data-fyncall-widget="fw_your_widget_id"></script>
That's it! The widget will appear as a launcher button in the corner of your page.
Next Steps
- Installation - Detailed setup instructions
- Appearance - Customize colors and branding
- JavaScript API - Programmatic control
- Shopify Integration - E-commerce features