The Visitor Object in the Zobot:
The visitor object is a map that contains the profile information of the website visitor. This will be available inside the messageData map across all scripts inside Zia Skills.It contains properties like name, email, city, country, campaign details, landing page URL, etc.
- "visitor":
- {
- "name": "Tricia",
- "email": "tricia@zylker.com",
- "phone": "005678900677",
- "browser": "Apple Safari",
- "country_code": "us",
- "os": "Apple Macintosh",
- "city": "Los angels",
- "state": "California",
- "question": "Hello, I would like to know my shipping status",
- "campaign_content": "end_sale",
- "campaign_medium": "UTM"
- "campaign_source": "email",
- "current_page_url": "https://www.zylker.com/furnitures/",
- "previous_page_url": "https://www.zylker.com/home/",
- "last_call_attender": "(Operator id)",
- "landing_page_url": "https://www.zylker.com",
- "landing_page_title": "Zylker-Furnitures-Home",
- "number_of_past_visits": "6",
- "number_of_past_chats": "2",
- "lead_score": "200",
- "referer": "https://www.zylker.com",
- "crm_type": "Lead | Contact",
- "company_name": "Zylker inc.",
- "company_employees": "7000",
- "ip": "127.89.077.12",
- "visitid": "234",
- "department_id": "606000001830053",
- "uuid": "47324902-6799-4c4f-a53b-29839e39ccc3_3"
- "last_visit_time": "1566472239770"
- "custom_info" :
- {
- "customer_id" : "1532",
- "tier" : "gold"
- },
- "operation": "chat"
- }
Updating visitor info in Zia Skills:
The information of the website visitor like the name, email id, phone number, etc., will always be automatically available under the 'messageData' map in the 'visitor' object. This map will be available across all the functions in Zia Skills. The 'visitor' key is a map object from which the visitor's info can be retrieved using 'get()' function.
If you want to configure your bot to update the visitor's info like name, email, phone, id, city, etc., dynamically at runtime, the property name and its appropriate value can be passed as a Map value to the 'trigger' key of the Execution logic output in Zia Skills platform as shown in the format below.
- “trigger” : {
- “type” : “update”
- “data” : {
- “property_name” : “<value to be updated>”
- }
- }
To learn more about this, start building your own Zobot right away.
Regards,
Michelle