Authenticate livechat widget users via an email from your website or system. This links their full conversation history and data to their profile, making it accessible across devices. You can also enrich their profile with custom data, providing your agents with helpful context during conversations.
It's highly recommended to also enforce identity verification to prevent user impersonation by bad actors.
You can include user email and other information about them by including a snippet before loading livechat widget. This snippet defines a window.BeChatSettings
object containing the user's details. The chat widget then automatically reads this information when it loads.
This process eliminates the need for users to fill out a pre-chat form and for agents to ask for basic details like name and email.
To get started, you'll need to add the following JavaScript code to your website.
window.BeChatSettings = {
user: {
name: 'John Appleseed',
email: 'john.appleseed@email.com',
language: 'en',
subscriptionPlan: 'Premium',
company: 'Pixel Perfect Designs'
}
}
<script src="https://your-site.com/livechat-loader.js"></script>
This snippet must be placed before the main chat loader script (livechat-loader.js
).
user
Objectname
: (Optional) The full name of the logged-in user. This will be displayed to the agent as the visitor's name.
email
: The user's email address. This will be the main identifier for the user.
language
: Primary language for user. If not provided BeDesk will detect this based on user location, browser settings or message content.
other
: add any other custom key:value pairs to send any custom attributes you want. This is perfect for passing along key information that gives your support team more context. Common examples include:
Subscription level (e.g., 'Free', 'Premium')
Company name
Cart value
You'll need to dynamically populate the values for user object with the actual information of the currently logged-in user. This is typically done using a server-side language (like PHP, Python, or Node.js) to insert the user details into the JavaScript before the page is sent to the browser.
For Agents: Get instant context about who they're talking to. See important data like subscription plans or account IDs right in the conversation view, leading to quicker and more effective support.
For Users: Enjoy a seamless and frictionless experience. They don't have to waste time providing information they've already given you by logging in.