ตัวเชื่อม (Connectors)

ตัวเชื่อม (Connectors)

ตัวเชื่อมคือการเชื่อมต่อแบบสำเร็จรูปที่ซิงก์ข้อมูลระหว่างแพลตฟอร์มของคุณกับ Brevo โดยจัดการเรื่องการยืนยันตัวตน การจับคู่ข้อมูล และการซิงค์แบบเรียลไทม์ให้ทั้งหมด

ตัวเชื่อมคืออะไร?

ตัวเชื่อม (Connector) คือสะพานข้อมูลสองทิศทางที่:

  • ยืนยันตัวตน กับแพลตฟอร์มภายนอกอย่างปลอดภัย
  • ซิงก์ข้อมูล แบบเรียลไทม์หรือโหมด batch
  • จับคู่ฟิลด์ ระหว่างโครงสร้างข้อมูลของแพลตฟอร์มกับ Brevo
  • เปิดใช้งาน Skills ให้ทำงานกับข้อมูลที่ซิงก์แล้ว

ตัวเชื่อมที่พร้อมใช้งาน

แพลตฟอร์มอีคอมเมิร์ซ

ระบบ CRM

การชำระเงิน

สถาปัตยกรรมตัวเชื่อม

graph LR
A[Your Platform] <-->|OAuth/API Key| B[Tajo Connector]
B <-->|Real-time Webhooks| C[Event Processing]
C --> D[Field Mapping]
D --> E[Brevo API]
B <-->|Batch Sync| F[Scheduled Jobs]
F --> D

การไหลของข้อมูล

  1. การยืนยันตัวตน: การเชื่อมต่อที่ปลอดภัยผ่าน OAuth 2.0 หรือ API key
  2. อีเวนต์แบบเรียลไทม์: Webhook จับการเปลี่ยนแปลงได้ทันที
  3. การซิงก์แบบ Batch: งานที่ตั้งเวลาสำหรับข้อมูลย้อนหลัง
  4. การจับคู่ฟิลด์: กำหนดการจับคู่กับ attribute ของ Brevo ได้
  5. Brevo API: ซิงก์ข้อมูลไปยัง contact, อีเวนต์ และ list

การตั้งค่า

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

connectors:
shopify:
enabled: true
shop_url: "your-store.myshopify.com"
api_key: "${SHOPIFY_API_KEY}"
api_secret: "${SHOPIFY_API_SECRET}"
# Data sync settings
sync:
customers: true
orders: true
products: true
carts: true
# Field mappings
field_mapping:
email: email
first_name: FIRSTNAME
last_name: LASTNAME
total_spent: TOTAL_SPENT

โหมดการซิงก์

โหมดคำอธิบายกรณีการใช้งาน
Real-timeซิงก์ทันทีผ่าน webhookการอัปเดตลูกค้าที่สำคัญ
Batchซิงก์ตามกำหนดเวลา (รายชั่วโมง/รายวัน)ข้อมูลย้อนหลัง รายงาน
HybridReal-time + batch fallbackรวมข้อดีของทั้งสองแบบ

เริ่มต้นอย่างรวดเร็ว

1. เลือกตัวเชื่อมของคุณ

เลือกตัวเชื่อมสำหรับแพลตฟอร์มของคุณจากแคตาล็อกด้านบน

2. ยืนยันตัวตน

เชื่อมต่อแพลตฟอร์มของคุณโดยใช้ OAuth หรือข้อมูลรับรอง API:

Terminal window
tajo connectors connect shopify \
--shop-url your-store.myshopify.com \
--api-key $SHOPIFY_API_KEY

3. ตั้งค่าการจับคู่ฟิลด์

จับคู่ฟิลด์จากแพลตฟอร์มกับ attribute ของ contact ใน Brevo:

field_mapping:
email: email
firstName: FIRSTNAME
lastName: LASTNAME
totalOrders: ORDER_COUNT
totalSpent: TOTAL_REVENUE
lastOrderDate: LAST_ORDER_DATE

4. เปิดใช้งานการซิงก์ข้อมูล

เริ่มซิงก์ข้อมูล:

Terminal window
tajo connectors sync shopify --full

5. เปิดใช้งาน Skills

เปิดใช้งาน skill ที่ใช้ข้อมูลที่ซิงก์มา:

Terminal window
tajo skills enable abandoned-cart
tajo skills enable customer-sync

ตัวเชื่อมแบบกำหนดเอง

สร้างตัวเชื่อมของคุณเองสำหรับแพลตฟอร์มที่ยังไม่มีในแคตาล็อก:

Custom Connector

Any Platform

สร้างตัวเชื่อมแบบกำหนดเองโดยใช้ Tajo Connector SDK

Custom Data

Connector SDK

import { ConnectorSDK } from '@tajo/connector-sdk';
const connector = new ConnectorSDK({
name: 'my-platform',
version: '1.0.0',
// Authentication
auth: {
type: 'oauth2',
authorizationUrl: 'https://api.myplatform.com/oauth/authorize',
tokenUrl: 'https://api.myplatform.com/oauth/token'
},
// Data mappings
resources: {
customers: {
endpoint: '/api/customers',
mapping: {
email: 'contact.email',
name: 'contact.full_name'
}
}
},
// Webhooks
webhooks: {
customer_created: '/webhooks/customer',
order_placed: '/webhooks/order'
}
});
export default connector;

ขั้นตอนถัดไป

Subscribe to updates

developer-docs

Drop your email or phone number — we'll send you what matters next.

ผู้ช่วย AI

สวัสดี! ถามฉันเกี่ยวกับเอกสารได้เลย

เริ่มต้นฟรีกับ Brevo