บริบทผู้ใช้ช่วยให้คุณส่งข้อมูลเกี่ยวกับผู้ใช้ที่ล็อกอินไปยัง AI เมื่อคุณให้บริบทผู้ใช้ AI สามารถทักทายผู้ใช้ด้วยชื่อ อ้างอิงรายละเอียดบัญชี และให้การตอบกลับที่เป็นส่วนตัวโดยไม่ต้องถามข้อมูลที่คุณมีอยู่แล้ว
สิ่งนี้สร้างประสบการณ์ที่ราบรื่นซึ่ง AI "รู้" เกี่ยวกับผู้ใช้อยู่แล้ว - แผนสมาชิก สถานะคำสั่งซื้อ คะแนนสะสม หรือข้อมูลที่เกี่ยวข้องอื่นๆ ที่คุณเลือกแชร์
// After user logs in or data loadswindow.Asyntai = window.Asyntai || {};
window.Asyntai.userContext = {
"Customer name": currentUser.name,
"Email": currentUser.email,
"Subscription plan": currentUser.subscription.planName,
"Cart total": cart.total,
"Loyalty points": currentUser.loyaltyPoints
};
// You can update it anytime - changes apply to the next messagewindow.Asyntai.userContext["Cart total"] = newTotal;
// Define a function to fetch user contextwindow.Asyntai = window.Asyntai || {};
window.Asyntai.fetchUserContext = function() {
return fetch('/api/your-user-context-endpoint/')
.then(function(response) { return response.json(); })
.then(function(data) {
window.Asyntai.userContext = data;
});
};
// The widget automatically calls this when the chat opens
ขีดจำกัดขนาด - บริบทผู้ใช้จำกัดที่ 2,000 ตัวอักษรสำหรับ Standard และ 10,000 ตัวอักษรสำหรับ Pro หากเกิน จะถูกตัดให้พอดี กรุณาทำให้บริบทกระชับ
ไม่ใช่การควบคุมการเข้าถึง - User context is set by your page in the visitor's browser, so it must never be what stands between a visitor and restricted content. To restrict which knowledge items a visitor can retrieve at all, use Access Tags (Enterprise) — enforced on our servers with a claim signed by your own back end.
สถานะการเชื่อมต่อ
After implementing, visit the User Context settings page to verify your integration is working. The status card will show:
ได้รับบริบทหรือไม่
ข้อความล่าสุดพร้อมบริบท
ตัวอย่างข้อมูลบริบทที่กำลังส่ง
Platform Guides
Using a specific CMS or e-commerce platform? We have step-by-step setup instructions for each — pick yours below to jump straight to the guide.