云客服-主动轮询座席侧发送的信息 (poll):报文样例

时间:2024-09-24 14:46:46

报文样例

  • 场景描述:主动轮询座席侧发送给用户侧的消息

    URL:Domain Address/apiaccess/ccmessaging/poll?receiverId=XXXXXXXXXXXXXXXXXXXXXXXX&channel=WEB

    请求头:

    ccmessaging-token: XXXXXXXXX

    响应参数:

    {
    	"resultCode": "0",
    	"resultDesc": "query user messages success.",
    	"downlinkMessages": [{
    		"from": "1011577355744904195",
    		"channel": "WEB",
    		"to": "session_fixed_user_fixed",
    		"controlType": "CHAT",
    		"mediaType": "TEXT",
    		"content": "欢迎欢迎,热列欢迎",
    		"simQuestions": null,
    		"senderNickname": "test",
    		"senderAvatar": "1",
    		"timestamp": 1619590480756,
    		"sourceType": "ROBOT",
    		"callId": null,
    		"robotGender": "MALE"
    	}, {
    		"from": "1011577355744904195",
    		"channel": "WEB",
    		"to": "session_fixed_user_fixed",
    		"controlType": "CHAT",
    		"mediaType": "TEXT",
    		"content": "转人工",
    		"simQuestions": null,
    		"senderNickname": "test",
    		"senderAvatar": "1",
    		"timestamp": 1619590482098,
    		"sourceType": "ROBOT",
    		"callId": null,
    		"robotGender": "MALE"
    	}, {
    		"from": "1011577355744904195",
    		"channel": "WEB",
    		"to": "session_fixed_user_fixed",
    		"controlType": "CHAT",
    		"mediaType": "TEXT",
    		"content": "已接通座席。",
    		"simQuestions": null,
    		"senderNickname": "系统",
    		"senderAvatar": null,
    		"timestamp": 1619590484115,
    		"sourceType": "SYSTEM",
    		"callId": null,
    		"robotGender": null
    	}]
    }
    多媒体库文件场景下:
    {
        "downlinkMessages": [
            {
                "callId": null,
                "simQuestions": null, 
                "senderNickname": "agent",
                "handlerType": null,
                "isOfflineStatus": null, 
                "channel": "WEB",
                "senderAvatar": "", 
                "robotGender": null, 
                "mediaType": "IMAGE",
                "associationContentId": null, 
                "content": "1179725658739559425", 
                "receiveTime": null, 
                "controlType": "CHAT", 
                "sourceType": "AGENT",
                "queueFlag": null, 
                "messageCode": "1e1f2bf7-fd6e-4471-a45d-2b43d1eb6272", 
                "from": "202201077401331370",
                "to": "1642643982282972758", 
                "mediaFileType": "png", 
                "contentType": null, 
                "interIdx": null, 
                "timestamp": 1648102235191
            }
        ], 
        "resultCode": "0", 
        "resultDesc": "query user messages success."
    }
    
    发送本地文件场景下:
    {
        "downlinkMessages": [
            {
                "callId": null, 
                "simQuestions": null, 
                "senderNickname": "agent",
                "handlerType": null, 
                "isOfflineStatus": null, 
                "channel": "WEB", 
                "senderAvatar": "", 
                "robotGender": null,
                "mediaType": "IMAGE", 
                "associationContentId": null, 
                "content": "878e7d9a-8e2f-4893-8b54-352f8ecbf86c", 
                "receiveTime": null, 
                "controlType": "CHAT", 
                "sourceType": "AGENT", 
                "queueFlag": null,
                "messageCode": "9374d9c4-b8ee-4035-aab9-ad5ceddbb856", 
                "from": "202201077401331370", 
                "to": "1642643982282972758", 
                "mediaFileType": "png", 
                "contentType": "1", 
                "interIdx": null, 
                "timestamp": 1648102054235
            }
        ], 
        "resultCode": "0", 
        "resultDesc": "query user messages success."
    }
    
    
support.huaweicloud.com/api-ccfs-cec/cec_07_2202.html