Send user information to your chatbot for personalized responses and secure identity verification.
You can identify your website visitors to your chatbot, allowing it to provide personalized responses using their name, email, and other information. This is useful for greeting returning users, providing account-specific information, and tracking conversation history.
Your chatbot will automatically use the identified information when it makes sense. For example, if you send the user’s first name, the chatbot might greet them by name.You can also update your chatbot’s system prompt to explicitly reference this information:
Example system prompt addition:
Copy
When responding to users, use their first name if available. If they ask about their account, use their user_id to look up information.
The identify call is especially powerful when combined with Custom API Actions. You can use template strings like \{\{user_id\}\} in your API action URLs, and the chatbot will automatically fill in the value from the identified user data.For example, if you have an API action configured with:
Copy
GET https://api.yoursite.com/orders/{{user_id}}
And you’ve identified the user with user_id: '12345', the chatbot will call:
Copy
GET https://api.yoursite.com/orders/12345
This allows you to provide account-specific information like order history, subscription status, and more.
For production applications handling sensitive user data, you should use identity verification to securely authenticate users. This prevents users from impersonating others by sending fake identification data.