Join Proactive Chat

Description

This API allows the visitor to join a proactive chat.

Requested Payload:

Request Body for visitors
  • user_id [Mandatory] - To specify the unique id of the visitor.
  • name - To specify the name of the visitor.
  • email - To specify the email address of the visitor.
  • phone - To specify the phone number of the visitor.
  • cvuid - This key allows you to identify a particular visitor.
  • platform - To specify the operating system used by the visitor .
  • current_page - To specify the current page of the visitor .
  • page_title - To specify the current page title of the visitor's webpage .
  • country_code - To specify the country code of the visitor.
  • local_time_zone - To specify the time zone of the visitor.
  • cookie_enabled - To specify if cookies are enabled on the visitor's browser. (Values: true/false)
  • java_enabled - To specify if java is enabled on the visitor's browser. (Values: true/false)
  • screen - To specify the screen resolution of the visitor's screen.
  • color_code - To specify the color code of the visitor's screen.
  • flash_version - To specify the flash version of the visitor's screen.
  • js_version - To specify the JS version of the visitor's screen.
  • referrer - To specify the page from which the visitor is referred from.

Note that the user_id  can be any unique value.

Request Body for join proactive chat
  • session_id - To specify the session in which the visitor has initiated the proactive chat.
  • uvid [Mandatory] - To specify the visitor's uvid who joined the proactive chat.
  • question [Mandatory] - To specify the question of the visitor. It is the first message sent by the visitor.
  • customer_info - To specify the additional visitor information. This information can also be assigned using the JS API .visitor.info()

URL

Copiedhttps://salesiq.zoho.com/visitor/v2/{screen name}/conversations/join_proactive

Example

Copiedhttps://salesiq.zoho.com/visitor/v2/zylker-inc/conversations/join_proactive

Payload

Copied{
  "visitor": {
    "user_id": "$2487775191209924871",
    "name": "Tricia",
    "email": "tricia@zylker.com",
    "phone": "3132232231",
    "avuid": "608d49f7-fc91-4df9-a556-660ad820a9d5",
    "platform": "MacIntel",
    "color_code": "24",
    "cookie_enabled": "true",
    "current_page": "http://zylker-auto.com/",
    "java_enabled": "true",
    "js_version": "1.7",
    "screen": "1436 * 877",
    "page_title": "",
    "country_code": "US",
    "flash_version": "0.0.0",
    "local_time_zone": "GMT+0530 (IST)",
    "referrer": ""
  },
  "question": "I need some assistance in buying a dining set",
  "uvid":"f59f8148-1c1b-45dd-a8a2-7fee8058fc41"
 }

Sample Response

Copied{
  "url": "/visitor/v2/zylker-inc/conversations/join_proactive",
  "object": "conversations",
  "data": {
    "id": "df13de973a797cb45275c112a5164f99c3c3ddd6602a9d76",
    "wms_chat_id": "LD_1186728066921403440_155096539",
    "unread_chats": false,
    "attender": {
      "image_key": "0_32289000000509001",
      "email": "patricia@zylker.com",
      "name": "patricia",
      "is_bot": false,
      "id": "32289000000509001"
    },
    "question": "I need some assistance in buying a dining set",
    "department": {
      "name": "Support",
      "id": "32289000000002013"
    },
    "start_time": "1580797913177",
    "visitor": {
      "phone": "3132232231",
      "user_id": "$2487775191209924871",
      "email": "tricia@ventura.com",
      "name": "Tricia",
      "country_code": "US",
      "ip": "172.17.18.231"
    },
    "chat_id": "d3227b82e6f2e51255fbccd9d017b3071612be30af1a2004b3ddf7e81a12a107299efa3a6cd5f15c",
    "chat_status": {
      "status_code": 0,
      "state": 2
    },
    "reference_id": "931"
  }
}