Chuyển tới nội dung chính

webchat_push

Last Updated: 18 Apr 2025

Thông số cơ bản

PropertyValue
CategoryWebchat Push
Push Mechanism Namewebchat_push
Push Mechanism Code10
Push Mechanism DescriptionGet the chat message
Push Mechanism Subscription RulesSeller In House System/Customer Service/Original/Ads Service App
Time Out Seconds2s
Sequence GuaranteedYes
Can Repeated Same MessageYes
Retry Seconds1s,2s,3s

Tham số Push

TênKiểuMẫuMô tả
dataobject
typestringCan be notification / message
regionstringThông tin khu vực.
contentobjectNội dung chi tiết của tin nhắn.
user_idstringTrả về khi type = notification.
conversation_idstringMã định danh duy nhất của Shopee cho một cuộc trò chuyện.
typestringTrả về khi type = notification.
timestamptimestampTrả về khi type = notification.
msg_idint64Trả về khi type = notification.
biz_idint64Trả về khi type = notification.
message_idstringTrả về khi type= message. Mã định danh duy nhất của Shopee cho một tin nhắn.
shop_idint64Trả về khi type= message. shop_id của cửa hàng nhận tin nhắn (to_shop_id)
request_idstringTrả về khi type= message. Mã định danh yêu cầu dùng để theo dõi lỗi.
from_user_namestringTrả 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_idint64ID người dùng của người gửi tin nhắn trong cuộc trò chuyện.
to_idint64Trả 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_namestringTrả 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_typestringTrả về khi type= message. text / video / image / item / faq_liveagent
contentobject
texttimestampTrả về khi message type=text hoặc faq_liveagent, nội dung văn bản hội thoại cụ thể.
translationobjectTrả về khi message type=text.
textstring
sourcestring
target_languagestring
source_languagestring
midobjectTrả về khi message type=text.
textstring
sourcestring
target_languagestring
source_languagestring
urlstringTrả về khi message type=image.
thumb_urlstringTrả về khi message type=image hoặc video.
thumb_heightint64Trả về khi message type=image hoặc video.
thumb_widthint64Trả về khi message type=image hoặc video.
file_server_idint64Trả về khi message type=image.
video_urlstringTrả về khi message type=video.
duration_secondsint64Trả về khi message type=video.
shop_idint64Trả về khi message type=item. shop_id của cửa hàng nhận tin nhắn (to_shop_id)
item_idint64Trả về khi message type=item.
pass_through_datastringTrả về khi message type=faq_liveagent.
messagesstring[]["23234234234","234232423"]Returned when type=bundle_message.  return all the message_id in the bundle_message
shopee_chatbot_repliedbooleantrueTrả 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_timestamptimestampTrả về khi type= message. The creation time of conversation.
regionstringTrả về khi type= message. Khu vực diễn ra cuộc trò chuyện.
is_in_chatbot_sessionbooleanTrả về khi type= message.
source_contentobjectTrả về khi type= message.
item_idintTrả về khi message type= item.
sub_account_idint64Nế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_namestringNế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_msgobject[]
message_idint64Trả 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_typeint32business_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_idint64ID cửa hàng Shopee nhận tin nhắn
from_shop_idint64ID cửa hàng Shopee gửi tin nhắn
statusstringTrạ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_idintshop_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.
codeintMã định danh duy nhất của Shopee cho một thông báo push.
timestamptimestampThờ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àyChi tiết cập nhật
2025-04-18Add from_shop_id, to_shop_id, status
2024-11-05Add 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-23Add sub_account_id and sub_account_name; Add quoted_message
2024-09-04Update the definition of the shop_id inside "content"
2022-09-24roll back retry config