Chat widget
The widget supports three modes: form (contact form only), chat (conversational UI), or both (tabs to switch between them). All modes send leads to the same project via the Lead API.
1. Three modes side by side
Set data-mode in your snippet to choose which panel opens.
data-mode="chat"
Conversational flow
2. Chat mode — desktop & mobile
The chat panel floats over your page. On mobile it expands to near full-screen width.
Desktop
Mobile
3. The snippet
Change one attribute from the standard install snippet to enable chat mode.
Chat only
<script
src="https://swiftcrm.in/widget/v1/widget.js"
data-key="YOUR_API_KEY"
data-mode="chat"
data-title="Chat with us"
data-accent="#E53935"
></script>
Form + Chat tabs
<script
src="https://swiftcrm.in/widget/v1/widget.js"
data-key="YOUR_API_KEY"
data-mode="both"
data-title="Talk to us"
data-accent="#E53935"
data-fields='[
{"name":"name","label":"Name","required":true},
{"name":"email","label":"Email","required":true}
]'
></script>
4. How chat leads appear in the dashboard
When the visitor completes the chat flow, a lead is created in your project — exactly the same as a form submission. The conversation is stored as the lead's message attribute.
Additional Info
Capture info
Via: Chat widget
5. How lead capture works in chat
Visitor opens the chat and answers prompts
The widget asks for name, email, and any custom fields you configured in data-fields.
Widget POSTs to the Lead API
Sends name, email, custom fields, source URL, referrer, and UTM params — same payload as the form.
Lead appears in your dashboard instantly
Status set to New. Email notification sent if enabled. Workflows triggered if configured.
Domain check
Make sure your site's domain is added to Project → Settings → Allowed domains. The widget will be blocked otherwise.
Configure forms to customise which fields the chat asks for · API reference for the full payload spec