تهيئة Webhooks

"ابدأ باستخدام webhooks في بيفاتيل لتمكين الاستدعاءات النصية HTTP التي يتم تنشيطها بواسطة الأحداث مثل إنشاء الرسائل لتعزيز التكامل والأتمتة."

البدء باستخدام خطافات الويب في بيفاتيل

الـ Webhooks هي استدعاءات HTTP تم تحديدها في كل حساب. تُشغل هذه الأحداث عند حدوث إجراء مثل إنشاء الرسائل في Bevatel. يمكنك إنشاء أكثر من Webhook لحساب واحد.

الخطوة 1: انقر على رابط "التكاملات" في شريط الإعدادات. بعد ذلك، انقر على زر "تكوين".

الخطوة 2: سترى قائمة بالWebhooks التي قمت بإضافتها إلى الحساب بالفعل.

الخطوة 3: انقر على "إضافة webhook جديد"، وسيظهر نافذة حوارية تمكنك من إدخال عنوان URL الذي يجب أن يتم إرسال الطلب البرمجي POST إليه. بعد ذلك، يجب عليك اختيار الأحداث التي ترغب في الاشتراك فيها. تتيح لك هذه الخيارات الاستماع فقط للأحداث ذات الصلة في بيفاتيل.

سيقوم بيفاتيل بإرسال طلب POST بتحميل البيانات التالي إلى عناوين URL المكونة للمستخدم لتحديثات مختلفة تحدث في حسابك.

نموذج لحملة webhook :

{

  "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://www.bevatel.com",
      "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": "bevatel",
  }
}

يمكنك العثور على القائمة الكاملة للأحداث التي يدعمها webhook في هذا الرابط:

Last updated