MBOX
เข้าสู่ระบบ
  • MBOX คืออะไร
  • เริ่มต้นใช้งาน
    • ตั้งค่าบัญชี
      • สร้างบัญชีผู้ใช้งาน
      • ตั้งค่าโปรไฟล์
      • ตั้งค่าข้อมูลทั่วไป
      • เพิ่มพนักงาน
      • เพิ่มกล่องข้อความ
      • เพิ่มทีม
      • เพิ่มป้ายกำกับ
  • ช่องทาง
    • เว็บแชท
    • เฟสบุ๊ค
    • อินสตาแกรม
    • ไลน์
  • ฟีเจอร์
    • ข้อความตอบกลับ
    • แอตทริบิวต์ที่กำหนดเอง
    • ความพึงพอใจ CSAT
    • ผู้ติดต่อ Contacts
    • กลุ่มผู้ติดต่อ
    • รายงาน
      • ภาพรวม
      • การสนทนา
      • ความพึงพอใจ
      • พนักงาน
      • ป้ายกำกับ
      • กล่องข้อความ
      • ทีม
    • ระบบอัตโนมัติ
    • มาโคร
    • แบบฟอร์มก่อนสนทนา
    • ระดับความสำคัญ
    • การเชื่อมต่อ
      • Dialogflow (Draft)
      • Dyte (Draft)
      • Google Translate
  • การใช้งานขั้นสูง
    • แดชบอร์ดแอพ
    • เว็บฮุ๊ค
      • ตั้งค่าเว็บฮุ๊ค
      • เหตุการณ์ที่เว็บฮุ๊ครองรับ
  • Privacy & Policy
    • นโยบายความเป็นส่วนตัว
    • เงื่อนไขข้อตกลงการใช้บริการ
Powered by GitBook
On this page
  1. การใช้งานขั้นสูง
  2. เว็บฮุ๊ค

ตั้งค่าเว็บฮุ๊ค

Previousเว็บฮุ๊คNextเหตุการณ์ที่เว็บฮุ๊ครองรับ

Last updated 1 year ago

เริ่มต้นใช้งานเว็บฮุคใน Mbox

Webhooks คือการโทรกลับ HTTP ที่กำหนดไว้ในทุกบัญชี เหตุการณ์เหล่านี้จะเกิดขึ้นเมื่อมีการดำเนินการ เช่น การสร้างข้อความใน Mbox คุณสามารถสร้างเว็บฮุคได้มากกว่าหนึ่งบัญชี

Step 1 คลิกที่ลิงค์การรวมระบบในแถบด้านข้างการตั้งค่า จากนั้นคลิกที่ปุ่ม "ตั้งค่า"

Step 2. คุณจะเห็นรายการเว็บฮุคที่คุณได้เพิ่มไปยังบัญชีแล้ว

Step 3. คลิกที่ "เพิ่มเว็บฮุคใหม่" และจะแสดงโมดอลที่คุณสามารถป้อน URL ที่ควรส่งคำขอ POST ถัดไป คุณต้องเลือกกิจกรรมที่คุณต้องการสมัคร ตัวเลือกนี้จะอนุญาตให้คุณฟังเหตุการณ์ที่เกี่ยวข้องใน Mbox เท่านั้น

Mbox จะส่งคำขอ POST พร้อมเพย์โหลดต่อไปนี้ไปยัง URL ที่กำหนดค่าสำหรับการอัปเดตต่างๆ ที่เกิดขึ้นในบัญชีของคุณ

{

  "event": "message_created", // The name of the event
  "id": "1", // Message ID
  "content": "Hi", // Content of the message
  "created_at": "2020-03-03 13:05:57 UTC", // Time at which the message was sent
  "message_type": "incoming", // This will have a type incoming, outgoing or template. The user from the widget sends incoming messages, and the agent sends outgoing messages to the user.
  "content_type": "enum", // This is an enum, it can be input_select, cards, form or text. The message_type will be template if content_type is one og these. Default value is text
  "content_attributes": {} // This will an object, different values are defined below
  "source_id": "", // This would the external id if the inbox is a Twitter or Facebook integration.
  "sender": { // This would provide the details of the agent who sent this message
    "id": "1",
    "name": "Agent",
    "email": "agent@example.com"
  },
  "contact": { // This would provide the details of the user who sent this message
    "id": "1",
    "name": "contact-name"
  },
  "conversation": { // This would provide the details of the conversation
    "display_id": "1", // This is the ID of the conversation which you can see in the dashboard.
    "additional_attributes": {
      "browser": {
        "device_name": "Macbook",
        "browser_name": "Chrome",
        "platform_name": "Macintosh",
        "browser_version": "80.0.3987.122",
        "platform_version": "10.15.2"
      },
      "referer": "http://chat.mboxacpp.cc",
      "initiated_at": "Tue Mar 03 2020 18:37:38 GMT-0700 (Mountain Standard Time)"
    }
  },
  "account": { // This would provide the details of the account
    "id": "1",
    "name": "MBOX",
  }
}

ค้นหารายการกิจกรรมทั้งหมดที่รองรับโดยเว็บฮุค

A sample webhook payload

​