Hướng dẫn Tích hợp

Hướng dẫn từng bước để tích hợp NotiBoost vào hệ thống của bạn.

Quick Start

Tích hợp NotiBoost trong vài bước đơn giản:

Bước 1: Gửi Event đầu tiên

Gửi event từ hệ thống của bạn đến NotiBoost API:

curl -X POST https://api.notiboost.com/api/v1/events \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "event_name": "order_created",
    "event_id": "evt_001",
    "occurred_at": "2025-12-01T10:00:00Z",
    "user_id": "u_123",
    "properties": {
      "order_id": "A001"
    }
  }'

Bước 2: Tạo Rule

Tạo rule để match events và trigger flows.

Bước 3: Tạo Flow

Định nghĩa notification flow với channels và templates.

Bước 4: Test và Monitor

Test integration và monitor delivery status.

Integration Patterns

Order Lifecycle

Pattern cho order notifications:

  • order_created → Gửi confirmation
  • payment_success → Gửi receipt
  • order_shipped → Gửi tracking info

Payment Notifications

Pattern cho payment notifications: payment_success, payment_failed, refund_processed.

Shipping Updates

Pattern cho shipping: order_shipped, delivery_confirmed, delivery_failed.

Best Practices

  • Sử dụng unique event_id cho mỗi event
  • Gửi events ngay sau khi sự kiện xảy ra
  • Không retry events ở phía client - NotiBoost xử lý retry
  • Monitor delivery status qua webhooks
  • Test kỹ trước khi deploy lên production

Troubleshooting

Events không được xử lý

Kiểm tra API key, event structure, và rule matching.

Messages không được gửi

Kiểm tra channel configuration, quota, và flow status.

Delivery failures

Xem audit logs và delivery status để debug.