Create Conversation

Description

This API can be used to allow visitors to start a new conversation.

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 conversation
  • app_id(Mandatory) - To specify the app with which the visitor has initiated the conversation.
  • department_id(Mandatory)- To specify the department with which the visitor has initiated the conversation.
  • 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()
  • custom_wait_time - To specify the time the chat appears in the operator chat window. The maximum value for this key is 999.

URL:

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

Payload:

Copied{
  "visitor": {
    "user_id": "1353",
    "name": "Tricia",
    "email": "tricia@zylker.com",
    "phone": "3132232231",
    "platform": "MacIntel",
    "color_code": "24",
    "cookie_enabled": "true",
    "current_page": "http://zylker-homes.com/",
    "java_enabled": "true",
    "js_version": "1.7",
    "screen": "1436 * 877",
    "page_title": "Zylker-Coupons",
    "country_code": "US",
    "flash_version": "0.0.0",
    "local_time_zone": "GMT+0530 (IST)",
     "cvuid" : "67465746",
     "referrer": "https://en.wikipedia.org/wiki/"
  },
    "customer_info" :
       {
        "Band" : "Premium", 
        "Branch": "California"
       },
  "department_id": "19000000000017",
  "app_id": "466756000000002043",
    "custom_wait_time" : "200",
  "question": "hi, can you help me buy a dining set?"
}

Sample Response:

Copied{
"url": "/visitor/v2/zylkerinc/conversations",
"object": "conversations",
"data":{
"unread_chats": false,
"question": "hi, can you help me buy a dining set?",
"department":{
"id": "19000000000017"
},
"visitor":{
"user_id": "1353",
"email": "tricia@zylker.com",
"name": "tricia"
},
"id": "f97598d320c227ca638693f9e47ec149"
}
}