Skip to main content

Update custom information

Description:

This API allows updating a particular conversation's custom/additional information and displaying it to the operator's dashboard beside their chat windows while conversing with the visitors. 

OAuth Scope: conversations.UPDATE

Method: PUT

Requested Payload:

  • customer_info  (Mandatory) - The JSON object ("Key" : "Value") of visitor custom information to be passed.
    • Key - Name of the field to be created.
    • Value - Value for the field.

Note: 

  • Using this API to update the visitor's name, email, and phone number creates a new custom info instead of altering the existing visitor's details.
  • To pass this value to the chatbot (Codeless bot builder) through Plugs or Criteria router, use the key name in the format %visitor.custominfo.<keyname>%. For example, if the key name is "Model," the input should be set as %visitor.custominfo.Model%.

URL

Copiedhttps://{zohosalesiq_server_uri}/api/v2/{screen_name}/conversations/{conversation_id}

Example

Copiedhttps://salesiq.zoho.com/api/v2/zylkerinc/conversations/42662824243424023

Payload

Copied{
     "customer_info" :{"Model" : "Class X9", "Branch": "Sydney"}
}

Sample Response

Copied{
    "url": "/api/v2/zylkerinc/conversations/42662824243424023",
    "object": "Object",
    "data": {
        "owner": {
            "image_key": "0_115844000002964001",
            "aboutme": "This is James, Sales rep",
            "email": "james@zylker.com",
            "name": "James Nelson",
            "is_bot": false,
            "call_enabled": true,
            "id": "115844000002964001"
        },
        "unread_chats": false,
        "chat_status": {
            "state_key": "connected",
            "status_code": 0,
            "state": 2,
            "id": "20",
            "label": "Connected",
            "status_key": "open"
        },
        "last_modified_time": "1707983401574",
        "question": "Hey there, I need some help",
        "reference_id": "26389",
        "uvid": "0eaf41f2-6ef7-4d1e-b0e8-ad641a8d04df-1",
        "chat_id": "LD_1599973726609605988_165423290",
        "start_time": "1707983095332",
        "attended_time": "1707983098581",
        "reopen": false,
        "customer_info": {
            "Model": "Class X9",
            "Branch": "Sydney"
        },
        "id": "115844000011283017",
        "visitor": {
            "name": "Visitor",
            "id": "115844000011283015",
            "country_code": "au",
            "channel_details": {
                "channel": "website",
                "source": "https://zylkerauto.com/"
            },
            "supported_operations": [
                "bot_chat",
                "file_share",
                "audio_call",
                "video_call",
                "screen_share",
                "remote_share",
                "edit_message",
                "delete_message",
                "reply_message",
                "block_ip",
                "article_share",
                "read_recipients"
            ],
            "first_name": "Olivya",
            "ip": "172.20.*.***",
            "type": "lead",
            "channel_name": "website",
            "user_id": "$2411430899622675208"
        },
        "department": {
            "name": "Support",
            "id": "115844000000002016"
        },
        "app_id": "115844000002965011",
        "attender": {
            "image_key": "0_115844000002964001",
            "aboutme": "This is James, Sales rep",
            "email": "james@zylker.com",
            "name": "James Nelson",
            "is_bot": false,
            "call_enabled": true,
            "id": "115844000002964001"
        },
        "last_message_info": {
            "sequence_id": "3",
            "sender": {
                "name": "James Nelson",
                "id": "115844000002964001"
            },
            "type": "info",
            "message": {
                "visitor_data": {
                    "last_name": "Olivya",
                    "name": "Olivya",
                    "first_name": ""
                },
                "visitid": "26389",
                "time": "1707983264269",
                "msgsize": 1,
                "changelist": [
                    "Visitor 746808",
                    "Olivya"
                ],
                "operation_user": {
                    "name": "James Nelson",
                    "id": "115844000003392001"
                },
                "mode": "visitornamechange",
                "visitorid": "115844000011283017",
                "message": "",
                "changeset": "name"
            },
            "time": "1707983264278",
            "id": "1707983264278_2015766149654"
        },
        "participants": [
            {
                "image_key": "0_115844000002964001",
                "aboutme": "This is James, Sales rep",
                "email": "james@zylker.com",
                "name": "James Nelson",
                "is_bot": false,
                "call_enabled": true,
                "id": "115844000002964001"
            }
        ]
    }
}