ไคลเอ็นต์ WhatsApp Business API จะส่งการแจ้งเตือนเกี่ยวกับ status
ของข้อความระหว่างคุณและผู้ใช้ของคุณ การแจ้งเตือนเหล่านี้จะส่งผ่านอ็อบเจ็กต์ statuses
คุณจะได้รับการแจ้งเตือนเกี่ยวกับสถานะของข้อความสำหรับแต่ละข้อความที่ธุรกิจของคุณส่ง ในตารางด้านล่าง ให้คลิกที่ลูกศรในคอลัมน์ด้านซ้ายเพื่อดูสถานะที่เทียบเท่าบนแอพ WhatsApp สำหรับแต่ละสถานะ (หากมี)
ชื่อ | คำอธิบาย |
---|---|
| ผู้ใช้ได้ลบข้อความที่ผู้ใช้ส่ง เมื่อได้รับการแจ้งเตือนนี้ คุณควรตรวจสอบให้แน่ใจว่าได้มีการลบข้อความนั้นออกจากระบบของคุณ หากข้อความดังกล่าวถูกดาวน์โหลดมาจากเซิร์ฟเวอร์ |
| ข้อความที่ส่งโดยธุรกิจของคุณถูกส่งไปยังอุปกรณ์ของผู้ใช้แล้ว |
| ไม่สามารถส่งข้อความที่ส่งโดยธุรกิจของคุณได้ ระบบจะแสดงเหตุผลที่ทำให้เกิดความผิดพลาดอยู่ในการเรียกกลับ โปรดดูเอกสารประกอบเกี่ยวกับข้อความแสดงข้อผิดพลาดสำหรับความช่วยเหลือในการแก้ไขจุดบกพร่องต่อไปนี้
|
| ผู้ใช้ได้อ่านข้อความที่ส่งโดยธุรกิจของคุณแล้ว การแจ้งเตือน |
| ข้อความที่ธุรกิจของคุณส่งกำลังอยู่ระหว่างส่งข้อมูลภายในระบบของเรา สำหรับผู้ใช้ API ภายในองค์กร: หากต้องการรับการแจ้งเตือนสำหรับข้อความ |
| ข้อความที่ธุรกิจของคุณส่งมีรายการในแค็ตตาล็อกที่ไม่พร้อมใช้งานหรือไม่มีอยู่ |
ลำดับของการแจ้งเตือนเหล่านี้ในแอพของคุณอาจไม่สะท้อนถึงเวลาจริงของสถานะข้อความ โปรดดูประทับเวลาเพื่อระบุเวลา หากจำเป็น
เพื่อให้สถานะเปลี่ยนเป็น read
ข้อความจะต้องมีสถานะเป็น delivered
ในบางสถานการณ์ อย่างเช่น เมื่อผู้ใช้อยู่ในหน้าจอแชท และมีข้อความส่งเข้ามา ข้อความจะ delivered
และ read
แทบจะในเวลาเดียวกัน ในกรณีนี้ หรือสถานการณ์ที่คล้ายคลึงกัน การแจ้งเตือน delivered
จะไม่ถูกส่งกลับเนื่องจากจะถือว่าส่งข้อความสำเร็จแล้วหากมีการอ่านแล้ว พฤติกรรมนี้มีเหตุผลเพื่อปรับการทำงานภายในให้เหมาะสม
ตั้งแต่วันที่ 1 กุมภาพันธ์ 2022 เป็นต้นไป อ็อบเจ็กต์ statuses
ในการแจ้งเตือนขาออกของคุณจะประกอบด้วยอ็อบเจ็กต์ใหม่ที่ซ้อนกัน 2 รายการ ได้แก่ conversation
และ pricing
ส่วนประกอบอ็อบเจ็กต์การสนทนาและการกำหนดราคาจะต่างกันไป โดยขึ้นอยู่กับจุดที่การสนทนาเริ่มต้นขึ้น การสนทนาสามารถเริ่มโดยผู้ใช้ เริ่มโดยธุรกิจ หรือสามารถเริ่มต้นจากจุดเริ่มต้นอิสระ โปรดดูข้อมูลเพิ่มเติมด้านล่างนี้
ในตัวอย่างต่อไปนี้ recipient_id
อาจเป็นช่อง group_id
แทน โดยขึ้นอยู่กับว่าข้อความถูกส่งไปยังบุคคลหรือกลุ่ม
ระบบจะได้รับ Webhook ดังต่อไปนี้เมื่อธุรกิจส่งข้อความโดยเป็นส่วนหนึ่งของการสนทนาที่เริ่มโดยผู้ใช้ (หากการสนทนานั้นไม่ได้เริ่มต้นจากจุดเข้าใช้งานฟรี)
{ "statuses": [{ "id": "ID", "recipient_id": "WHATSAPP_ID", "status": "sent", "timestamp": "TIMESTAMP", "type": "message", "message": { "recipient_id":"WHATSAPP_ID" }, "conversation": { "id": "CONVERSATION_ID", "expiration_timestamp": TIMESTAMP, "origin": { "type": "user_initiated" } }, "pricing": { "pricing_model": "CBP", "billable": true, "category": "user_initiated" } }] }
ระบบจะได้รับ Webhook ดังต่อไปนี้เมื่อธุรกิจส่งข้อความโดยเป็นส่วนหนึ่งของการสนทนาที่เริ่มโดยผู้ใช้สำหรับข้อความสื่อ (หากการสนทนานั้นไม่ได้เริ่มต้นจากจุดเข้าใช้งานฟรี)
{ "statuses": [{ "id": "ID", "recipient_id": "WHATSAPP_ID", "status": "sent", "timestamp": "TIMESTAMP", "type": "message", "message": { "media_id": "98d14c8e-0310-4061-8f99-2d148274c286", "recipient_id":"WHATSAPP_ID" }, "conversation": { "id": "CONVERSATION_ID", "expiration_timestamp": TIMESTAMP, "origin": { "type": "user_initiated" } }, "pricing": { "pricing_model": "CBP", "billable": true, "category": "user_initiated" } }] }
ระบบจะได้รับ Webhook ดังต่อไปนี้เมื่อธุรกิจส่งข้อความที่เป็นส่วนหนึ่งของการสนทนาที่เริ่มโดยธุรกิจ
{ "statuses": [{ "id": "ID", "recipient_id": "WHATSAPP_ID", "status": "sent", "timestamp": "TIMESTAMP", "type": "message", "message": { "recipient_id":"WHATSAPP_ID" }, "conversation": { "id": "CONVERSATION_ID", "expiration_timestamp": TIMESTAMP, "origin": { "type": "business_initiated" } }, "pricing": { "pricing_model": "CBP", "billable": true, "category": "business_initiated" } }] }
ระบบจะได้รับ Webhook ดังต่อไปนี้เมื่อธุรกิจส่งข้อความในการตอบกลับการสนทนาที่เริ่มโดยผู้ใช้ ซึ่งเริ่มต้นจากจุดเข้าใช้งานอิสระ:
{ "statuses": [{ "id": "ID", "recipient_id": "WHATSAPP_ID", "status": "sent", "timestamp": "TIMESTAMP", "type": "message", "message": { "recipient_id":"WHATSAPP_ID" }, "conversation": { "id": "CONVERSATION_ID", "expiration_timestamp": TIMESTAMP, "origin": { "type": "referral_conversion", } }, "pricing": { "pricing_model": "CBP", "billable": false, "category": "referral_conversion" } }] }
ระบบจะได้รับ Webhook ดังต่อไปนี้เมื่อข้อความของธุรกิจถึงผู้รับแล้วและข้อความนั้นเป็นส่วนหนึ่งของการสนทนาที่เริ่มโดยผู้ใช้ (หากการสนทนานั้นไม่ได้เริ่มต้นจากจุดเข้าใช้งานอิสระ):
{ "statuses": [{ "id": "ID", "recipient_id": "WHATSAPP_ID", "status": "delivered", "timestamp": "TIMESTAMP", "type": "message", "message": { "recipient_id":"WHATSAPP_ID" }, "conversation": { "id": "CONVERSATION_ID", "origin": { "type": "user_initiated" } }, "pricing": { "pricing_model": "CBP", "billable": true, "category": "user_initiated" } }] }
ระบบจะได้รับ Webhook ต่อไปนี้เมื่อข้อความของธุรกิจถึงผู้รับแล้วและข้อความนั้นเป็นส่วนหนึ่งของการสนทนาที่เริ่มโดยธุรกิจ:
{ "statuses": [{ "id": "ID", "recipient_id": "WHATSAPP_ID", "status": "delivered", "timestamp": "TIMESTAMP", "type": "message", "message": { "recipient_id": "WHATSAPP_ID" }, "conversation": { "id": "CONVERSATION_ID", "origin": { "type": "business_initiated" } }, "pricing": { "pricing_model": "CBP", "billable": true, "category": "business_initiated" } }] }
ระบบจะได้รับ Webhook ดังต่อไปนี้เมื่อข้อความของธุรกิจถึงผู้รับแล้วและข้อความนั้นเป็นส่วนหนึ่งของการสนทนาที่เริ่มโดยผู้ใช้ ซึ่งเริ่มต้นจากจุดเข้าใช้งานอิสระ:
{ "statuses": [{ "id": "ID", "recipient_id": "WHATSAPP_ID", "status": "delivered", "timestamp": "TIMESTAMP", "type": "message", "message": { "recipient_id": "WHATSAPP_ID" }, "conversation": { "id": "CONVERSATION_ID", "origin": { "type": "referral_conversion", } }, "pricing": { "pricing_model": "CBP", "billable": false, "category": "referral_conversion" } }] }
การเรียกกลับตามมาตรฐานสำหรับข้อความที่อ่านแล้ว:
{ "statuses":[{ "id": "ID", "recipient_id": "WHATSAPP_ID", "status": "read", "timestamp": "TIMESTAMP", "type": "message", "message": { "recipient_id": "WHATSAPP_ID" } }] }
{ "statuses": [{ "errors": [{ "code": 470, "title": "Failed to send message because you are outside the support window for freeform messages to this user. Please use a valid HSM notification or reconsider." }], "id": "ID", "recipient_id": "WHATSAPP_ID", "status": "failed", "timestamp": "TIMESTAMP" }] }
{ "statuses": [{ "errors": [{ "code": 480, "title": "Failed to send message since we detect an identity change of the contact" }], "id": "ID", "recipient_id": "WHATSAPP_ID", "status": "failed", "timestamp": "TIMESTAMP" }] }
ส่วนย่อยของการสนทนาจะไม่รวมอยู่ในการเรียกกลับหากข้อความส่งไปไม่สำเร็จ โดยจะไม่มีการเรียกเก็บเงินหรือการเปิดใช้งานการสนทนาเข้ามาเกี่ยวข้องในกรณีนี้
การเรียกกลับตามมาตรฐานสำหรับข้อความที่ถูกลบ:
{ "statuses": [{ "id": "ID", "recipient_id": "WHATSAPP_ID", "status": "deleted", "timestamp": "TIMESTAMP", "type": "message", "message": { "recipient_id": "WHATSAPP_ID" } }] }
ส่วนย่อยของการสนทนาจะไม่รวมอยู่ในการเรียกกลับหากข้อความถูกลบ โดยจะไม่มีการเรียกเก็บเงินหรือการเปิดใช้งานการสนทนาเข้ามาเกี่ยวข้องในกรณีนี้
โปรดดูข้อมูลนี้ที่ภาพรวม, ข้อความ
Yes, there is a specific scenario where you can get pricing information on your webhook alert for read messages. For each sent message, there can be 3 scenarios:
Scenario | When it Happens |
---|---|
You get a webhook alert when the message is delivered (including pricing information) and another webhook alert when the message is read (not including pricing information). | This is the most common scenario. |
You get a webhook alert when the message is delivered (including pricing information). You do not get a webhook alert that the message has been read. | Common when a customer has turned off the feature that lets people know they have read a message. |
You get a webhook alert when the message is read (including pricing information). You do not get a webhook alert that the message has been delivered. | Only triggered when the user is already reading the thread with the business when the message comes in. |