Zobot Tip 2: Personalize every conversation by storing and re-using visitor data
Each time a visitor enters your website is counted as a visit. A visitor session includes all of a visitor's activities ranging from the first page view to the last activity that he or she does before exiting the website.So, how do you keep track of all the activities of this visitor and the details that he shares during the session?
The visitorsession API is used to store values temporarily during a chat conversation with the website visitor.
For example, if you want to perform an action like triggering a message to the visitor based on the time he had logged in to the website, you can set/get the visitor's logged in time during your conversation with the visitor using the visitorsession API.
Let me elaborate on this with another example.
Say, you are the owner of an online clothing store. A visitor lands your website and starts looking for clothes. The bot sends him a welcome message and offers to guide him through the products available on the site. It asks for his size so that it can display relevant options. When he enters his size, the list of clothes that match the given size are displayed. This data can be stored during the course of the conversation using the visitorsession API and used during a later part of the conversation so that the visitor does not have to enter the same data time and again.
visitorsession APIs:
- zoho.salesiq.visitorsession.set($screenname,{"name":"Patricia Boyle"});
- zoho.salesiq.visitorsession.get($screenname,"name");
Sample Code:
msg = message.get("text");
response = Map();
//Get values
sessionvalue = zoho.salesiq.visitorsession.get("zylkerinc","size");
data = sessionvalue.get("data");
size = data.get("size");
response.put("action","reply");
response.put("action","reply");
response.put("replies", {"We have found the following for you and you'll love it for sure"});
//Set values
if(context_id.equals("shopping"))
{
size = answers.get("size").get("text");
zoho.salesiq.visitorsession.set("screenname",{"size": size});
response.put("action","reply");
response.put("replies", {"Please select a category"});
response.put("suggestions", {"Winter wear","Summer wear"});
return response;
}
Note:
The values stored inside the visitor session API will be available only till the end of the ongoing chat.
Happy Zoboting!
Regards,
Michelle.
Zoho Desk Resources
-
Desk Community Learning Series
-
-
-
-
-
-
-
-
-
Sticky Posts
Qualify Potential Leads Automatically with SalesIQ Chatbots
Your website may have a lot of visitors every day, but are you struggling to identify your potential leads? You may not know who your ideal leads are just by looking at a website visitor, right? To qualify a lead, you need to know their needs, interests,
OpenAI Alert! Plug Sample #11 - Next-generation chatbots, Zobot + ChatGPT Assistant
Hi Everyone! We have great news for all AI enthusiasts and ChatGPT users! The much anticipated Zobot integration with ChatGPT Assistant is now available with Plugs. OpenAI has introduced 'ChatGPT Assistants' to customize GPT models as per your requirement.
Get live insights on business performance with the SalesIQ TV App - Now available for Apple and Android TVs!
Hello everyone! Let's start with a question - What do you think is the key to a thriving business? Yes, I hear you. It's all about the customers. Success in business often starts with understanding customer needs. But wouldn't you agree that achieving
Deprecation of Google Drive and Sheets connections in Scripts (Deluge)
Hello Everyone, We have an important update for those using the Script (Deluge) platform to build chatbots, widgets, and forms. Google has alerted us about sensitive scopes within the Google Drive and Google Sheets default connections in Deluge. As a
Plug Sample #10 - Simplify Ticket Management (Zoho Desk) with Chatbots
Hi everyone! We're here with another simple yet effective plug for your chatbot to integrate with Zoho Desk. When a customer reports an issue/request during chat, it's logged as a ticket on Desk. When they return for updates, you end up searching through
Zoho CRM Plus Resources
Zoho Books Resources
Zoho Subscriptions Resources
Zoho Projects Resources
Zoho Sprints Resources
Zoho Orchestly Resources
Zoho Creator Resources
Zoho WorkDrive Resources
Zoho Campaigns Resources
Zoho CRM Resources
Writer Get Started. Write Away!
Writer is a powerful online word processor, designed for collaborative work.