Identifying your users and providing customized responses
Sometimes it's useful to let your chatbot respond to your visitors using a personalized message that includes their name and other information. You could also use this to let your chatbot query your own internal API and respond with information relevant to the user, for example shipping updates and more.
To enable this, you will need to use the SiteSpeakAI identify
API call to send any identifying information that you would like the chatbot to use:
(_sitespeak = window._sitespeak || []).push(['onReady', onSiteSpeakReady]);
function onSiteSpeakReady() {
sitespeak.identify('332', {
'first_name': 'Herman',
'nickname': 'H',
'email': 'herman@sitespeak.ai',
'shoe_size': 9,
...
});
}
You can send any information to your chatbot that you would like it to use as context when answering your visitor.
Your chatbot should automatically know to use the information supplied in the response when it makes sense, but you can also update your chatbot's system prompt to include this information:
This will let your chatbot know how to use this information in it's response:
If you're using your own API as a data source for the chatbot, using the identify
call will allow you to provide personal information from your own back end.
Not finding what you need? Reach out to our support team for help.
Contact Support