webchat_push
Last Updated: 18 Apr 2025
Thông số cơ bản
| Property | Value |
|---|---|
| Category | Webchat Push |
| Push Mechanism Name | webchat_push |
| Push Mechanism Code | 10 |
| Push Mechanism Description | Get the chat message |
| Push Mechanism Subscription Rules | Seller In House System/Customer Service/Original/Ads Service App |
| Time Out Seconds | 2s |
| Sequence Guaranteed | Yes |
| Can Repeated Same Message | Yes |
| Retry Seconds | 1s,2s,3s |
Tham số Push
| Tên | Kiểu | Mẫu | Mô tả |
|---|---|---|---|
| data | object | ||
| type | string | Can be notification / message | |
| region | string | Thông tin khu vực. | |
| content | object | Nội dung chi tiết của tin nhắn. | |
| user_id | string | Trả về khi type = notification. | |
| conversation_id | string | Mã định danh duy nhất của Shopee cho một cuộc trò chuyện. | |
| type | string | Trả về khi type = notification. | |
| timestamp | timestamp | Trả về khi type = notification. | |
| msg_id | int64 | Trả về khi type = notification. | |
| biz_id | int64 | Trả về khi type = notification. | |
| message_id | string | Trả về khi type= message. Mã định danh duy nhất của Shopee cho một tin nhắn. | |
| shop_id | int64 | Trả về khi type= message. shop_id của cửa hàng nhận tin nhắn (to_shop_id) | |
| request_id | string | Trả về khi type= message. Mã định danh yêu cầu dùng để theo dõi lỗi. | |
| from_user_name | string | Trả về khi type= message. Tên người dùng của người gửi tin nhắn trong cuộc trò chuyện. | |
| from_id | int64 | ID người dùng của người gửi tin nhắn trong cuộc trò chuyện. | |
| to_id | int64 | Trả về khi type= message. ID người dùng của người nhận tin nhắn trong cuộc trò chuyện. | |
| to_user_name | string | Trả về khi type= message. Tên người dùng của người nhận tin nhắn trong cuộc trò chuyện. | |
| message_type | string | Trả về khi type= message. text / video / image / item / faq_liveagent | |
| content | object | ||
| text | timestamp | Trả về khi message type=text hoặc faq_liveagent, nội dung văn bản hội thoại cụ thể. | |
| translation | object | Trả về khi message type=text. | |
| text | string | ||
| source | string | ||
| target_language | string | ||
| source_language | string | ||
| mid | object | Trả về khi message type=text. | |
| text | string | ||
| source | string | ||
| target_language | string | ||
| source_language | string | ||
| url | string | Trả về khi message type=image. | |
| thumb_url | string | Trả về khi message type=image hoặc video. | |
| thumb_height | int64 | Trả về khi message type=image hoặc video. | |
| thumb_width | int64 | Trả về khi message type=image hoặc video. | |
| file_server_id | int64 | Trả về khi message type=image. | |
| video_url | string | Trả về khi message type=video. | |
| duration_seconds | int64 | Trả về khi message type=video. | |
| shop_id | int64 | Trả về khi message type=item. shop_id của cửa hàng nhận tin nhắn (to_shop_id) | |
| item_id | int64 | Trả về khi message type=item. | |
| pass_through_data | string | Trả về khi message type=faq_liveagent. | |
| messages | string[] | ["23234234234","234232423"] | Returned when type=bundle_message. return all the message_id in the bundle_message |
| shopee_chatbot_replied | boolean | true | Trả về khi message_type=bundle_message nếu có phiên Shopee Chatbot trong bundle message. Khuyến nghị chuyển sang chế độ trả lời thủ công nếu shopee_chatbot_replied=true (Shopee Chatbot đã tham gia) |
| created_timestamp | timestamp | Trả về khi type= message. The creation time of conversation. | |
| region | string | Trả về khi type= message. Khu vực diễn ra cuộc trò chuyện. | |
| is_in_chatbot_session | boolean | Trả về khi type= message. | |
| source_content | object | Trả về khi type= message. | |
| item_id | int | Trả về khi message type= item. | |
| sub_account_id | int64 | Nếu tin nhắn được gửi từ tài khoản phụ/tài khoản chính, sẽ trả về sub_account_id. Nếu không, =0 | |
| sub_account_name | string | Nếu tin nhắn được gửi từ tài khoản phụ/tài khoản chính, sẽ trả về sub_account_id. Nếu không, =0 | |
| quoted_msg | object[] | ||
| message_id | int64 | Trả về message_id khi có tin nhắn được trích dẫn. Nếu không có tin nhắn được trích dẫn, message_id sẽ trống. | |
| business_type | int32 | business_type=0 means it is a conversation chat between buyer and seller business_type=11 means it is a conversation chat between affiliate and seller | |
| to_shop_id | int64 | ID cửa hàng Shopee nhận tin nhắn | |
| from_shop_id | int64 | ID cửa hàng Shopee gửi tin nhắn | |
| status | string | Trạng thái tin nhắn, các giá trị có thể là: normal; auto_reply; blocked; user_chat; web_chat; censored_whitelist; censored_blacklist; offwork_autoreply | |
| shop_id | int | shop_id của cửa hàng nhận thông báo push. Mã định danh duy nhất của Shopee cho một cửa hàng. | |
| code | int | Mã định danh duy nhất của Shopee cho một thông báo push. | |
| timestamp | timestamp | Thời điểm cho biết tin nhắn đã được gửi. |
Nếu là loại notification:
Json
{
"msg_id": null,
"data": {
"type": "notification",
"region": "PH",
"content": {
"user_id": 12252079,
"conversation_id": "4670954831706433",
"type": "mark_as_replied",
"content": {
"conversation_id": "4670954310906433"
},
"timestamp": 1719883961,
"msg_id": 0,
"biz_id": 0,
"from_id": 0
}
Nếu là loại message và tin nhắn bao gồm văn bản:
Json
{"msg_id":"","data":{"type":"message","region":"ID","content":{"message_id":"2302748948493123953","shop_id":165103149,"request_id":"35f9478b-7482-46eb-a268-8f828fedb673","from_id":165105353,"from_user_name":"vn_cstoreponorogo","to_id":947151379,"to_user_name":"keelatofficial","message_type":"text","content":{"text":"Baik kak .. 🤗"},"conversation_id":"709122092476686867","created_timestamp":1726044721,"region":"ID","is_in_chatbot_session":false,"source_content":{},"quoted_msg":{"message_id":""},"sub_account_id":0,"sub_account_name":0}},"shop_id":947042923,"code":10,"timestamp":1726044722}
Nếu là loại message và tin nhắn bao gồm video
Json
{"data":{"type":"message","region":"VN","content":{"message_id":"2165920666211451249","shop_id":123456789,"request_id":"1091617252119662617","from_id":161057467,"from_user_name":"hyhy2606","to_id":213245905,"to_user_name":"sixhd.vn","message_type":"video","content":{"video_url":"cf03c9e1fe2c0992cdb51c3cb6eab2bd","thumb_url":"6c710d7679c9f3a9a7287250421d17d3_dynamic_tn","thumb_width":399,"thumb_height":713,"duration_seconds":15},"conversation_id":"691736553754845137","created_timestamp":1660799912,"region":"VN","is_in_chatbot_session":false,"source_content":{},"quoted_msg":{"message_id":""},"sub_account_id":0,"sub_account_name":0}},"shop_id":123456789,"code":10,"timestamp":1660799912}
Nếu là loại message và tin nhắn bao gồm hình ảnh
Json
{"data":{"type":"message","region":"VN","content":{"message_id":"2165920671942967665","shop_id":123456789,"request_id":"313F2D/BTMessage/p108","from_id":679422730,"from_user_name":"thutrang290402","to_id":6343861,"to_user_name":"thanhnga_hcm","message_type":"image","content":{"url":"https://cf.shopee.vn/file/09591ecdc9f1dc7bd507817797d826fe_dynamic","thumb_url":"b9591ecdc9f1dc7bd507817797d826fe_dynamic_tn","thumb_height":711,"thumb_width":400,"file_server_id":0},"conversation_id":"27246676204792586","created_timestamp":1660799915,"region":"VN","is_in_chatbot_session":false,"source_content":{},"quoted_msg":{"message_id":""},"sub_account_id":0,"sub_account_name":0}},"shop_id":123456789,"code":10,"timestamp":1660799915}
Nếu là loại message và tin nhắn bao gồm thông tin sản phẩm
Json
{"data":{"type":"message","region":"ID","content":{"message_id":"2165920670806327665","shop_id":123456789,"request_id":"389465101372418716","from_id":163219823,"from_user_name":"fadlyjo.","to_id":119159078,"to_user_name":"zhousijia","message_type":"item","content":{"shop_id":109157255,"item_id":9112503530},"conversation_id":"511784343194732911","created_timestamp":1660799914,"region":"ID","is_in_chatbot_session":false,"quoted_msg":{"message_id":""},"sub_account_id":0,"sub_account_name":0,"source_content":{"item_id":4112503530}}},"shop_id":123456789,"code":10,"timestamp":1660799915}
Nếu là loại message và tin nhắn bao gồm faq_liveagent
Json
{"data":{"type":"message","region":"ID","content":{"message_id":"2165920670296736113","shop_id":123456789,"request_id":"4600339818579251427","from_id":172765311,"from_user_name":"bundhakevinabizar","to_id":94311357,"to_user_name":"madamegieofficial","message_type":"faq_liveagent","content":{"text":"Chat dengan Penjual","pass_through_data":""},"conversation_id":"405064194129145983","created_timestamp":1660799914,"region":"ID","is_in_chatbot_session":false,"quoted_msg":{"message_id":""},"sub_account_id":0,"sub_account_name":0,"source_content":{"order_sn":"220818EGS328B9"}}},"shop_id":123456789,"code":10,"timestamp":1660799915}
Lịch sử cập nhật
| Ngày | Chi tiết cập nhật |
|---|---|
| 2025-04-18 | Add from_shop_id, to_shop_id, status |
| 2024-11-05 | Add business_type for affiliate marketing solution chat Add bundle_message for FAQ and chatbot message Add shopee_chatbot_replied to indicate if Shopee Chatbot involved |
| 2024-09-23 | Add sub_account_id and sub_account_name; Add quoted_message |
| 2024-09-04 | Update the definition of the shop_id inside "content" |
| 2022-09-24 | roll back retry config |