---
title: "Brevo Connector"
description: "คู่มือการผสานรวม Brevo ฉบับสมบูรณ์สำหรับการซิงค์ผู้ติดต่อ transactional emails SMS แคมเปญ WhatsApp และระบบอัตโนมัติทางการตลาดกับ Tajo"
url: https://tajo.io/th/docs/connectors/marketing/brevo/
markdown: https://tajo.io/th/docs/connectors/marketing/brevo.md
lang: th-TH
robots: noindex
---

ขอสิทธิ์ใช้งานล่วงหน้า

กรอกชื่อและที่อยู่อีเมลที่ทำงานของคุณ เราจะส่งลิงก์เพื่อยืนยันคำขอเข้าใช้งาน Tajo ทางอีเมล

# Brevo Connector

สถานะตัวเชื่อม: ใช้งานอยู่ ยืนยันแล้ว Tajo ใช้งานตัวเชื่อมนี้อยู่ในปัจจุบัน

| ฟิลด์ต้นทาง | ฟิลด์ปลายทาง | ค่าตัวอย่าง |
| --- | --- | --- |
| `record.id` | `source_id` | `record_1042` |
| `record.updated_at` | `updated_at` | `2026-10-18T08:00:00Z` |
| `record.value` | `value` | `sample_value` |

เชื่อมต่อบัญชี Brevo ของคุณกับ Tajo เพื่อการจัดการผู้ติดต่อที่รวมกัน การส่งข้อความ transactional ผ่านอีเมล SMS และ WhatsApp และระบบอัตโนมัติทางการตลาดที่ครอบคลุม

## ภาพรวม

| คุณสมบัติ | ค่า |
| --- | --- |
| **แพลตฟอร์ม** | Brevo |
| **หมวดหมู่** | การตลาด |
| **ความซับซ้อนในการตั้งค่า** | ง่าย |
| **การผสานรวมอย่างเป็นทางการ** | ใช่ |
| **ข้อมูลที่ซิงค์** | ผู้ติดต่อ แคมเปญ Transactional Messages เหตุการณ์ eCommerce |
| **API Base URL** | `https://api.brevo.com/v3` |

## ฟีเจอร์

- **การส่งข้อความหลายช่องทาง** - ส่ง transactional email, SMS และ WhatsApp จาก API ที่รวมกัน
- **การจัดการผู้ติดต่อ** - สร้าง อัปเดต และแบ่งกลุ่มผู้ติดต่อด้วย custom attributes
- **แคมเปญการตลาด** - สร้างและส่งแคมเปญอีเมลแบบ programmatic
- **การติดตามเหตุการณ์** - ติดตาม custom events และกิจกรรมเว็บไซต์ผ่าน Brevo Tracker
- **การซิงค์ eCommerce** - ซิงค์สินค้า คำสั่งซื้อ และข้อมูล cart สำหรับแคมเปญที่เป็นส่วนตัว
- **Loyalty programs** - จัดการ loyalty subscriptions, points และข้อมูล member
- **รองรับ webhook** - การแจ้งเตือนเหตุการณ์แบบเรียลไทม์สำหรับเหตุการณ์ transactional, marketing และ CRM
- **Conversations** - การผสานรวม live chat widget และการจัดการข้อความแบบ programmatic

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

ก่อนเริ่มต้น ตรวจสอบให้แน่ใจว่าคุณมี:

1. บัญชี Brevo (แผน Free, Starter, Business หรือ Enterprise)
2. API key ที่สร้างจาก Brevo Settings > API Keys
3. บัญชี Tajo ที่มีสิทธิ์เข้าถึง API
4. โดเมนผู้ส่งที่ยืนยันแล้วสำหรับการส่งอีเมล

## การยืนยันตัวตน

Brevo รองรับวิธีการยืนยันตัวตนสองแบบ:

### การยืนยันตัวตนด้วย API Key (แนะนำ)

รวม API key ของคุณใน header `api-key` กับทุกคำขอ ดีที่สุดสำหรับการผสานรวมโดยตรงและการสื่อสาร server-to-server

```bash
curl -X GET "https://api.brevo.com/v3/account" \
  -H "api-key: YOUR_API_KEY" \
  -H "Content-Type: application/json"
```

### การยืนยันตัวตน OAuth 2.0

ใช้ OAuth 2.0 สำหรับการผสานรวมส่วนตัวภายในองค์กรที่ต้องการ delegated access และสิทธิ์เฉพาะผู้ใช้ OAuth ให้ระบบ token ที่มีช่วงเวลาความถูกต้องที่กำหนด

ความพร้อมใช้งาน OAuth

OAuth ใช้งานได้เฉพาะสำหรับการผสานรวมส่วนตัวภายในองค์กรเท่านั้น OAuth integrations ไม่ได้มีไว้สำหรับการแจกจ่ายสาธารณะหรือการลงรายการใน marketplace

## การกำหนดค่า

### การตั้งค่าพื้นฐาน

```yaml
connectors:
  brevo:
    enabled: true
    api_key: "${BREVO_API_KEY}"
    api_version: "v3"

    # Data sync options
    sync:
      contacts: true
      campaigns: true
      transactional: true
      events: true
      ecommerce: true

    # List assignment
    lists:
      all_customers: 5
      newsletter: 6
      buyers: 7
```

### การแมปฟิลด์

แมปฟิลด์ข้อมูลของคุณกับแอตทริบิวต์ผู้ติดต่อ Brevo:

#### การแมปค่าเริ่มต้น

| Parameter | Type | Description |
| --- | --- | --- |
| `email` required | string | ที่อยู่อีเมลผู้ติดต่อ (ตัวระบุที่ไม่ซ้ำกัน) |
| `FIRSTNAME` optional | string | แอตทริบิวต์ชื่อของผู้ติดต่อ |
| `LASTNAME` optional | string | แอตทริบิวต์นามสกุลของผู้ติดต่อ |
| `SMS` optional | string | หมายเลขโทรศัพท์สำหรับการส่งข้อความ SMS และ WhatsApp |
| `OPT_IN` optional | boolean | สถานะความยินยอม marketing opt-in |
| `ORDER_COUNT` optional | integer | จำนวนคำสั่งซื้อทั้งหมดที่วางไว้ |
| `TOTAL_REVENUE` optional | number | รายได้ตลอดชีวิตจากผู้ติดต่อ |
| `LOYALTY_POINTS` optional | integer | ยอดคะแนน loyalty program ปัจจุบัน |

#### การแมป Custom Attribute

```yaml
field_mapping:
  # Standard fields
  email: email
  first_name: FIRSTNAME
  last_name: LASTNAME
  phone: SMS

  # Marketing fields
  opt_in: OPT_IN
  signup_source: SIGNUP_SOURCE
  preferred_language: LANGUAGE

  # eCommerce metrics
  orders_count: ORDER_COUNT
  total_spent: TOTAL_REVENUE
  last_order_date: LAST_ORDER_DATE

  # Loyalty fields
  loyalty_tier: VIP_TIER
  loyalty_points: LOYALTY_POINTS
```

## API Endpoints

### Core Endpoints

| เมธอด | Endpoint | คำอธิบาย |
| --- | --- | --- |
| `POST` | `/v3/smtp/email` | ส่ง transactional email |
| `POST` | `/v3/transactionalSMS/send` | ส่ง transactional SMS |
| `POST` | `/v3/whatsapp/sendMessage` | ส่ง transactional WhatsApp |
| `POST` | `/v3/contacts` | สร้างผู้ติดต่อ |
| `PUT` | `/v3/contacts/{email}` | อัปเดตผู้ติดต่อ |
| `GET` | `/v3/contacts/{identifier}` | ดูรายละเอียดผู้ติดต่อ |
| `POST` | `/v3/contacts/import` | นำเข้าผู้ติดต่อจำนวนมาก |

### eCommerce Endpoints

| เมธอด | Endpoint | คำอธิบาย |
| --- | --- | --- |
| `POST` | `/v3/orders/status` | สร้างหรืออัปเดตสถานะคำสั่งซื้อ |
| `POST` | `/v3/products` | สร้างหรืออัปเดตสินค้า |
| `POST` | `/v3/categories` | สร้างหรืออัปเดตหมวดหมู่สินค้า |
| `POST` | `/v3/events` | ติดตาม custom events |

### Campaign Endpoints

| เมธอด | Endpoint | คำอธิบาย |
| --- | --- | --- |
| `POST` | `/v3/emailCampaigns` | สร้างแคมเปญอีเมล |
| `POST` | `/v3/emailCampaigns/{id}/sendNow` | ส่งแคมเปญทันที |
| `GET` | `/v3/emailCampaigns` | แสดงรายการแคมเปญอีเมลทั้งหมด |
| `GET` | `/v3/smtp/statistics/events` | ดูสถิติเหตุการณ์อีเมล |

## เหตุการณ์

### เหตุการณ์ Transactional

| เหตุการณ์ | ทริกเกอร์ | กรณีใช้งาน |
| --- | --- | --- |
| `delivered` | ส่งอีเมลไปยัง inbox | การยืนยันการส่ง |
| `opened` | ผู้รับเปิดอีเมล | การติดตาม engagement |
| `clicked` | คลิกลิงก์ในอีเมล | การติดตาม click-through |
| `bounced` | อีเมล bounce | การรักษาความสะอาดรายการ |
| `spam` | ถูกทำเครื่องหมายว่าเป็น spam | การตรวจสอบความสอดคล้อง |
| `unsubscribed` | ผู้ติดต่อยกเลิกสมัคร | การจัดการความต้องการ |

### เหตุการณ์ eCommerce

| เหตุการณ์ | ทริกเกอร์ | กรณีใช้งาน |
| --- | --- | --- |
| `order_completed` | วางคำสั่งซื้อสำเร็จ | เวิร์กโฟลว์หลังการซื้อ |
| `cart_updated` | เนื้อหา cart เปลี่ยน | การติดตาม cart ที่ถูกละทิ้ง |
| `cart_deleted` | cart ถูกล้างหรือหมดอายุ | การกู้คืน cart |
| `product_viewed` | เยี่ยมชมหน้าสินค้า | Browse abandonment |

## ตัวอย่างโค้ด

### เริ่มต้น Connector

```javascript
import { TajoClient } from '@tajo/sdk';

const tajo = new TajoClient({
  apiKey: process.env.TAJO_API_KEY,
  brevoApiKey: process.env.BREVO_API_KEY
});

// Connect Brevo account
await tajo.connectors.connect('brevo', {
  apiKey: process.env.BREVO_API_KEY
});
```

### ส่ง Transactional Email

```javascript
// Send a transactional email via Brevo
await tajo.brevo.sendTransactionalEmail({
  to: [{ email: 'customer@example.com', name: 'John Doe' }],
  templateId: 12,
  params: {
    ORDER_ID: '12345',
    ORDER_TOTAL: '$59.99',
    DELIVERY_DATE: '2024-02-15'
  }
});
```

### ซิงค์ผู้ติดต่อ

```javascript
// Bulk import contacts to Brevo
await tajo.connectors.sync('brevo', {
  type: 'full',
  resources: ['contacts'],
  options: {
    listIds: [5, 6],
    updateExisting: true,
    emptyContactsAttributes: false
  }
});

// Check sync status
const status = await tajo.connectors.status('brevo');
console.log(status);
// {
//   connected: true,
//   lastSync: '2024-01-15T10:30:00Z',
//   contactsSynced: 25400,
//   campaignsSent: 142,
//   eventsTracked: 89320
// }
```

### ติดตาม Custom Events

```javascript
// Track a custom event for a contact
await tajo.brevo.trackEvent({
  email: 'customer@example.com',
  event: 'product_purchased',
  eventdata: {
    id: 'txn_98765',
    data: {
      product_name: 'Premium Widget',
      price: 49.99,
      currency: 'USD'
    }
  }
});
```

## ขีดจำกัดอัตรา

Brevo บังคับใช้ rate limits สามระดับตามแผนของคุณ:

| Endpoint | Free/Starter | Professional | Enterprise |
| --- | --- | --- | --- |
| `POST /v3/smtp/email` | 1,000 RPS | 2,000 RPS | 6,000 RPS |
| `POST /v3/transactionalSMS/send` | 150 RPS | 200 RPS | 250 RPS |
| `POST /v3/events` | 10 RPS | 20 RPS | 60 RPS |
| `/v3/contacts/*` | 10 RPS | 20 RPS | 60 RPS |
| Endpoints อื่นทั้งหมด | 100 RPH | 200 RPH | 600 RPH |

การตอบสนอง Rate Limit

เมื่อคุณเกินขีดจำกัดอัตรา API จะส่งคืนรหัสสถานะ `429 Too Many Requests` ตรวจสอบ rate limit headers ในการตอบสนองเพื่อติดตามการใช้งานของคุณ

## การแก้ไขปัญหา

### ปัญหาทั่วไป

| ปัญหา | สาเหตุ | วิธีแก้ |
| --- | --- | --- |
| 401 Unauthorized | API key ไม่ถูกต้อง | สร้าง API key ใหม่ใน Brevo Settings |
| ไม่สร้างผู้ติดต่อ | ขาดฟิลด์อีเมล | ตรวจสอบว่ามีอีเมลสำหรับผู้ติดต่อทั้งหมด |
| ส่งอีเมลไม่ได้ | โดเมนผู้ส่งไม่ได้ยืนยัน | ยืนยันโดเมนใน Brevo Senders settings |
| ไม่ได้รับ webhook | URL ไม่ถูกต้องหรือ server error | ตรวจสอบการเข้าถึง webhook URL และ logs |
| ส่ง SMS ไม่ได้ | รูปแบบหมายเลขโทรศัพท์ไม่ถูกต้อง | ใช้รูปแบบสากลพร้อมรหัสประเทศ |

### โหมด Debug

เปิดใช้งาน verbose logging:

```yaml
connectors:
  brevo:
    debug: true
    log_level: verbose
    log_webhooks: true
```

### ทดสอบการเชื่อมต่อ

```bash
tajo connectors test brevo
# ✓ API connection successful
# ✓ Contacts API accessible
# ✓ Transactional email ready
# ✓ SMS sending configured
# ✓ Webhooks registered
```

## แนวทางปฏิบัติที่ดีที่สุด

1. **ใช้การหมุนเวียน API key** - หมุนเวียน API keys เป็นระยะเพื่อความปลอดภัย
2. **ใช้การตรวจสอบ webhook** - ตรวจสอบลายเซ็น webhook ด้วยการยืนยันตัวตน username/password
3. **Batch contact imports** - ใช้ bulk import สำหรับ datasets ขนาดใหญ่แทนการเรียก API แยกกัน
4. **ตรวจสอบ rate limits** - ตรวจสอบ rate limit headers เพื่อหลีกเลี่ยงข้อผิดพลาด 429
5. **ใช้ event tracking** - ใช้ Brevo Tracker สำหรับข้อมูลพฤติกรรมลูกค้าที่ครอบคลุม
6. **ตั้งค่า sender authentication ที่ถูกต้อง** - กำหนดค่า SPF, DKIM และ DMARC สำหรับ deliverability ที่ดีที่สุด

## ความปลอดภัย

- **การยืนยันตัวตนด้วย API Key** - การเข้าถึงแบบ secret token ผ่าน header `api-key`
- **OAuth 2.0** - การเข้าถึงแบบ delegated token สำหรับการผสานรวมส่วนตัว
- **การตรวจสอบ webhook** - การยืนยันตัวตน username และ password สำหรับการเรียก webhook ที่ปลอดภัย
- **การเข้ารหัส TLS** - การสื่อสาร API ทั้งหมดเข้ารหัสระหว่างการส่ง
- **IP whitelisting** - การจำกัด IP เสริมสำหรับแผน Enterprise

## แหล่งข้อมูลที่เกี่ยวข้อง

- [Brevo API Documentation](https://developers.brevo.com/docs/getting-started)
- [Brevo Authentication Guide](https://developers.brevo.com/docs/authentication-schemes)
- [Brevo Rate Limits](https://developers.brevo.com/docs/api-limits)
- [Shopify Connector](https://tajo.io/th/docs/connectors/ecommerce/shopify)
- [Customer Sync Skill](https://tajo.io/th/docs/skills/data-sync/customer-sync)
- [Brevo Contacts API](https://tajo.io/th/docs/contact-management)
