Advanced Use Cases
Logged-in User Experience
One of the biggest distinguished features that separate Chat Data from other competitors is that our AI chatbot can answer questions based on the logged-in user's information to create a personalized experience for each user.
Setting Up
You need to use the Chat Data SDK to send user information to the chatbot. Follow the instructions in the Send User Information From Website to Chatbot section to set things up.
To implement the SDK, add the following script to your website:
<script src="https://www.chat-data.com/static/chatbotsdk.min.js" data-chatbot-id="YOUR_CHATBOT_ID"></script>
Then, send your user's information using the SDK:
window.chatbot.sendUserInfo({
name: "Customer Name",
email: "[email protected]",
phone: "1234567890",
info: "Additional user information like plan type, account status, etc."
}).then(response => {
console.log("User info sent successfully");
}).catch(error => {
console.error("Error sending user info:", error);
});
For a complete implementation example, check out our Chat Data SDK documentation.
Customizing the Chatbot Initial Message
You can customized the initial message of the chatbot with the user's name by following the Initial Message template in the Customize the Chatbot Interface section.
Example
You can experience the logged-in user personalization by visiting https://www.chat-data.com/ and asking the chatbot about your name, current message credits, and the current plan you subscribed to. Our AI chatbot creates personalized answers based on your information, as shown in the example below.
SDK Demo Example
You can also visit our SDK demo page to explore how the website can send user information and listen for events from the chatbot widget using the SDK.
Watch our video tutorial that demonstrates how to implement and use the Chat Data SDK:
To try out a live demo of the Chat Data SDK, visit our SDK Demo Page.