Leave message

Description:

  • This API allows the visitor to leave a message when the operators are offline.

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.

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.
  • message(Mandatory)- To specify the message 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()
  • attender_id - To specify the missed chat owner in case agent specific signature chat

URL

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

Example

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

Payload

Copied{
  "visitor": {
    "user_id": "$2487775191209924871",
    "name": "Tricia",
    "email": "tricia@ventura.com",
    "phone": "3132232231",
    "avuid": "608d49f7-fc91-4df9-a556-660ad820a9d5",
    "platform": "MacIntel",
    "color_code": "24",
    "cookie_enabled": "true",
    "current_page": "http://htmledit.squarefree.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": ""
  },
  "department_id": "19000000000017",
  "app_id": "c18783b1e1701889f7891a46831e4538 ",
  "message": "I need assistance"
}

Sample Response

Copied{
  "url": "/visitor/v2/zylker-inc/conversations/leavemessage",
  "object": "conversations",
  "data": {
    "unread_chats": false,
    "message": "I need assistance",
    "department": {
      "id": "19000000000017"
    },
    "end_time": "1580988913877",
    "reference_id": "953",
    "start_time": "1580988913877",
    "visitor": {
      "user_id": "$2487775191209924871",
      "email": "tricia@ventura.com",
      "name": "Tricia",
      "country_code": "US",
      "ip": "172.17.18.231"
    },
    "id": "df13de973a797cb4ae34405368588b4d913ae727537640df"
  }
}