Web Chat
Embed chat in your website to allow users to ask for help where they need it
Last updated
Was this helpful?
Embed chat in your website to allow users to ask for help where they need it
Last updated
Was this helpful?
The ClearFeed Web Chat widget allows you to embed a direct support chat interface on your website, connecting your users with your support team via Slack.
Web Chat is accessible only to Parent Accounts with the Product Edition set as Internal Helpdesk or External Helpdesk.
Navigate to the Settings > on ClearFeed WebApp.
Click the toggle to Enable Chat Widget.
After enabling the widget, click on Setup Instructions in the same section (Settings > Chat Setup). This page contains your unique client_id
and client_secret
, along with the necessary code snippets.
Add the following script right before the closing <body>
tag of your site:
To securely identify logged-in users and provide them with a personalized, continuous chat history, you need to generate an HMAC hash on your server. This prevents users from impersonating others.
Retrieve your unique Client Secret from the Setup Instructions page in the ClearFeed WebApp.
Implement server-side code to generate an HMAC-SHA256 hash using your clientSecret
and the logged-in user's unique email address.
Add the initialization script to your website's HTML:.
Retrieve your unique Client ID from the Setup Instructions page in the ClearFeed WebApp.
Include the user
object only when a user is logged into your website. Pass their name, email, and the HMAC hash
generated in Step 4. Omit the user
object for anonymous visitors.
Ensure that the user information (name
, email
, hash
) passed in the user
object is not empty when provided.
How ClearFeed Web Chat identifies and handles users depends on the information provided during the widget initialization:
Logged-In Users: When you pass the user
object containing name
, email
, and the secure hash
for a signed-in user, ClearFeed can reliably identify them. This allows ClearFeed to:
Provide a personalized support experience across different devices and browsers.
Ensure users can access their past conversation history whenever they return and log in.
Anonymous Users: If the user
object is omitted during initialization (meaning the visitor is not logged into your website), ClearFeed treats them as an anonymous user. When an anonymous user starts a chat, ClearFeed will automatically prompt them to provide their Name and Email Address before they can begin the conversation. This ensures consistency for their session and allows agents to follow up if needed.
You can customize the look and feel of your web chat widget by passing a config
object within the window.ClearFeed("init", { ... })
call. This allows for tailoring the widget to match your website's branding and specific needs, even creating different configurations on various pages.
Add the config
object as shown below:
brand_color
string
Hex code (e.g., #RRGGBB
) to customize primary UI elements like backgrounds, icons, input fields, and attachments.
icon_logo_source
string
A direct SVG string or a URL pointing to your logo image (SVG or other image types supported).
icon_logo_color
string
Hex code or CSS color name to set the color for the default logo, button text, and close (X) icon on the button.
icon_type
string
Determines the appearance of the chat button. Options: "horizontal"
(shows text and icon) or "round"
(icon only).
icon_size
string
Sets the size of the widget button. Options: "small"
, "medium"
, or "large"
.
position
string
Specifies where the widget button appears on the screen. Options: "left"
or "right"
.
icon_text
string
The label displayed next to the icon when icon_type
is set to "horizontal"
. Ignored for "round"
type.
offset
object
Adjusts the button's position: { x: number, y: number }
(in pixels). x
is horizontal offset from the edge (left
or right
), y
is vertical offset from the bottom.
allow_dragging
boolean
If true
, users can drag and reposition the chat widget on desktop. Dragging is limited to stay on-screen.
All web chat widget configuration must be done manually by modifying the initialization script code. There is no user interface within the ClearFeed WebApp for changing these visual or behavioral settings.
When you enable the Chat Widget, a standard ClearFeed Collection named "Web Chat" is automatically created in your account. All incoming chats from your website will appear as requests within this collection. Below configurations can be done for Chat Collection:
Additional Collection Settings - Download request data and customize message classification settings.
– Define who from your organization should be treated as support agents/members in ClearFeed.
– Configure the channel for the support team to work from on Slack to handle incoming support requests.
– Define how requests or tickets are assigned, supporting round-robin or rule-based assignment.
- Select your integration and choose the trigger mode for ticket creation. Trigger mode for the ticket can be an emoji (e.g.. 🎟️) applied to the thread or tickets can be auto-created on every new message on the request channel.
- Enable AI-driven responses for common queries.
– Set up workflow automation based on triggers like request creation, status changes, or SLA breaches.
- Define working hours to ensure SLAs are calculated accurately & Configure service level agreements (SLAs) for response and resolution times.