ข้ามไปยังเนื้อหา

ตัวอย่างการผสานการทำงานกับ Webhook

ด้วยการใช้ Webhook คุณสามารถแบ่งปันข้อมูลเส้นทางของลูกค้า (Customer Journey) กับบริการอื่นๆ ได้แทบทุกชนิด ไม่ว่าจะเป็นระบบวิเคราะห์ข้อมูล, ระบบ CRM, บริการการตลาดอัตโนมัติ และอื่นๆ อีกมากมาย ตัวอย่างเช่น แจ้งเตือนบริการภายนอกโดยอัตโนมัติเมื่อลูกค้าดำเนินการบางอย่างภายในเส้นทาง, ส่งข้อมูลลูกค้าไปยังเครื่องมือวิเคราะห์ของคุณ และกระตุ้นการส่งอีเมล, SMS หรือข้อความ WhatsApp จากบริการภายนอกเมื่อเกิดเหตุการณ์เฉพาะในเส้นทาง – มีกรณีการใช้งานมากมาย ให้คุณเลือกใช้ได้ตามต้องการ เรียนรู้เพิ่มเติมเกี่ยวกับองค์ประกอบ Webhook ใน Customer Journeys

โพสต์นี้จะแสดงวิธีการใช้งาน Webhook สำหรับกรณีการใช้งานและบริการต่างๆ

กรณีการใช้งาน

Anchor link to

ส่งข้อมูลเหตุการณ์จาก Journey ไปยัง Mixpanel

ข้อกำหนดเบื้องต้น

Anchor link to

Webhook สำหรับ Ingestion API (https://developer.mixpanel.com/reference/events):

ตัวอย่าง URL

Anchor link to

https://api.mixpanel.com/import?strict=1&project_id=XXXXXXX

Authorization: Basic UHVzaHdvb3NVTTWlrcjROZUE=
Content-Type: application/json

ตัวอย่างข้อมูล

Anchor link to
[
{
"event": "PW_ApplicationOpen",
"properties": {
"time": "{{point:48ae746b-0f54-47db-b96c-1f082e110ff4;event:PW_ApplicationOpen;attribute:datetime}}",
"distinct_id": "{{device:hwid}}",
"$insert_id": "48ae746b-0f54-47db-b96c-1f082e110ff4",
"device_type": "{{point:48ae746b-0f54-47db-b96c-1f082e110ff4;event:PW_ApplicationOpen;attribute:device_type}}",
"application_version": "{{point:48ae746b-0f54-47db-b96c-1f082e110ff4;event:PW_ApplicationOpen;attribute:application_version}}",
"timezone": "{{tag:Timezone}}",
"name": "{{tag:Name}}"
}
}
]

กรณีการใช้งาน

Anchor link to

ส่งข้อมูลเหตุการณ์จาก Journey ไปยัง Amplitude

ข้อกำหนดเบื้องต้น

Anchor link to
  • บัญชี Amplitude

Webhook สำหรับ Ingestion API (https://developers.amplitude.com/docs/http-api-v2#request-format):

https://api.amplitude.com/2/httpapi

Accept: */*Content-Type: application/json

ตัวอย่างข้อมูล

Anchor link to
{
  "api_key": "c506ffde6db9xxxxxxa50120e22ec5",
  "events": [
    {
      "user_id": "{{device:user_id}}",
      "device_id": "{{device:hwid}}",
      "event_type": "PW_ApplicationOpen",
      "user_properties": {"timezone": "{{tag:Timezone}}", "sdk_version": "{{tag:SDK Version}}"},
      "country": "{{tag:Country}}"
    }
  ]
}

กรณีการใช้งาน

Anchor link to

กระตุ้นการส่งข้อความ Slack จาก Journey

ข้อกำหนดเบื้องต้น

Anchor link to
  • บัญชี Slack

ตัวอย่าง URL

Anchor link to

https://pushwoosh.slack.com/apps/XXXXXXXX-incoming-webhooks

Content-Type: application/json

ตัวอย่างข้อมูล

Anchor link to
{
"text": "Hi there :smile:",
"username": "John Doe"
}

กรณีการใช้งาน

Anchor link to

ส่งข้อมูลไปยัง Zapier ซึ่งสามารถนำไปใช้ต่อในระบบอัตโนมัติของ Zapier กับแอปต่างๆ กว่า 4,000+ แอป

ข้อกำหนดเบื้องต้น

Anchor link to
  • บัญชี Zapier

ตัวอย่าง URL

Anchor link to

https://hooks.zapier.com/hooks/catch/XXXXXXX/xxxxxxx

Content-Type: application/json

ตัวอย่างข้อมูล

Anchor link to
{
"hwid": "{{device:hwid}}",
"sdk": "{{tag:SDK Version}}"
}

Twilio (SMS)

Anchor link to

กรณีการใช้งาน

Anchor link to

ส่ง SMS จาก Journey

ข้อกำหนดเบื้องต้น

Anchor link to
  • บัญชี Twilio (ต้องเข้าถึง TWILIO_ACCOUNT_SID และ TWILIO_AUTH_TOKEN ได้)
  • หมายเลขโทรศัพท์ที่ซื้อไว้

ตัวอย่าง URL

Anchor link to

https://api.twilio.com/2010-04-01/Accounts/$TWILIO_ACCOUNT_SID/Messages.json

Content-Type: application/x-www-form-urlencoded
Authorization: Basic.... // เข้ารหัส TWILIO_ACCOUNT_SID และ TWILIO_AUTH_TOKEN ด้วย https://www.blitter.se/utils/basic-authentication-header-generator/ เพื่อรับค่า Authenticate

ตัวอย่างข้อมูล

Anchor link to
From=%2B18646511557&To=%2B15852826356&Body=...