Trình Kết Nối Gorgias

Kết nối helpdesk Gorgias của bạn với Brevo để engagement khách hàng dựa trên support, post-ticket marketing flows và unified customer experience analytics qua Tajo.

Tổng Quan

Thuộc TínhGiá Trị
Nền TảngGorgias
Danh MụcSupport
Độ Phức Tạp Thiết LậpDễ
Tích Hợp Chính ThứcKhông
Dữ Liệu Đồng BộCustomers, Tickets, Events
Loại APIREST API
Xác ThựcAPI Key + Email (Basic Auth)
URL Cơ Sởhttps://{domain}.gorgias.com/api/

Tính Năng

  • Đồng bộ ticket event - Forward ticket creation, resolution và CSAT events sang Brevo timelines
  • Làm giàu customer profile - Đồng bộ dữ liệu khách hàng Gorgias bao gồm tags và custom fields sang Brevo
  • Post-support campaigns - Kích hoạt Brevo workflows sau khi ticket được giải quyết để follow-up hoặc upsell
  • Theo dõi satisfaction - Đồng bộ kết quả CSAT survey như thuộc tính liên hệ Brevo
  • Phân đoạn dựa trên tag - Ánh xá Gorgias customer tags thành Brevo list memberships
  • Macro và rule events - Theo dõi các hành động tự động cho operational analytics

Yêu Cầu

Trước khi bắt đầu, hãy đảm bảo bạn có:

  1. Tài khoản Gorgias với quyền admin
  2. Subdomain Gorgias của bạn (ví dụ: yourstore.gorgias.com)
  3. API key và địa chỉ email liên kết
  4. Tài khoản Brevo với quyền truy cập API
  5. Tài khoản Tajo với subscription đang hoạt động

Xác Thực

Gorgias sử dụng HTTP Basic Authentication với email tài khoản và API key của bạn.

Tạo API Key

  1. Đăng nhập vào Gorgias dashboard của bạn
  2. Điều hướng đến Settings > REST API
  3. Nhấp Create API Key (hoặc sao chép key hiện có)
  4. Ghi chú API base URL của bạn: https://{domain}.gorgias.com/api/
Terminal window
# Basic Auth: email làm username, API key làm password
curl -X GET "https://yourstore.gorgias.com/api/customers" \
-u "[email protected]:$GORGIAS_API_KEY" \
-H "Content-Type: application/json"

Quyền API Key

Gorgias API keys có toàn quyền truy cập dữ liệu tài khoản của bạn. Không có mô hình quyền dựa trên phạm vi. Bảo vệ API key và thay đổi định kỳ.

Kết Nối Với Tajo

Terminal window
tajo connectors install gorgias \
--domain yourstore.gorgias.com \
--api-key $GORGIAS_API_KEY

Cấu Hình

Thiết Lập Cơ Bản

connectors:
gorgias:
enabled: true
domain: "yourstore.gorgias.com"
sync:
customers: true
tickets: true
satisfaction_surveys: true
tags: true
lists:
all_support_contacts: 35
satisfied_customers: 36
dissatisfied_customers: 37

Ánh Xạ Trường

Ánh xạ trường customer và ticket Gorgias sang thuộc tính liên hệ Brevo:

field_mapping:
# Trường customer
id: GORGIAS_ID
email: email
name: FIRSTNAME
phone: SMS
# Số liệu support
nb_tickets: TICKET_COUNT
last_ticket_date: LAST_SUPPORT_DATE
last_ticket_channel: LAST_SUPPORT_CHANNEL
avg_response_time: AVG_RESPONSE_TIME
# Dữ liệu CSAT
last_satisfaction_score: CSAT_SCORE
satisfaction_count: CSAT_RESPONSES
# Custom fields
customer_type: CUSTOMER_TYPE
vip_status: VIP_STATUS

Ánh Xạ Sự Kiện

event_mapping:
ticket.created: SUPPORT_TICKET_OPENED
ticket.closed: SUPPORT_TICKET_RESOLVED
ticket.reopened: SUPPORT_TICKET_REOPENED
satisfaction_survey.created: CSAT_SURVEY_SENT
satisfaction_survey.responded: CSAT_SUBMITTED
customer.created: SUPPORT_CUSTOMER_CREATED

API Endpoints

Tajo tích hợp với các Gorgias REST API endpoints sau:

EndpointPhương ThứcMục Đích
/api/customersGETLiệt kê customers
/api/customers/{id}GETLấy một customer
/api/customersPOSTTạo customer
/api/customers/{id}PUTCập nhật customer
/api/ticketsGETLiệt kê tickets
/api/tickets/{id}GETLấy một ticket
/api/tickets/{id}/messagesGETLiệt kê ticket messages
/api/tagsGETLiệt kê tags
/api/satisfaction-surveysGETLiệt kê CSAT surveys
/api/satisfaction-surveys/{id}GETLấy một survey
/api/usersGETLiệt kê agents
/api/integrationsGETLiệt kê integrations
/api/eventsGETLiệt kê events
/api/customers/{id}/custom-fieldsGETLấy giá trị custom field

Ví Dụ Code

Khởi Tạo Trình Kết Nối

import { TajoClient } from '@tajo/sdk';
const tajo = new TajoClient({
apiKey: process.env.TAJO_API_KEY,
brevoApiKey: process.env.BREVO_API_KEY
});
await tajo.connectors.connect('gorgias', {
domain: 'yourstore.gorgias.com',
apiKey: process.env.GORGIAS_API_KEY
});

Đồng Bộ Customers Sang Brevo

await tajo.connectors.sync('gorgias', {
type: 'incremental',
resources: ['customers'],
since: '2024-01-01',
batchSize: 30
});
const status = await tajo.connectors.status('gorgias');
console.log(status);
// {
// connected: true,
// lastSync: '2024-03-15T17:00:00Z',
// customersCount: 14200,
// ticketsTracked: 28600,
// csatResponses: 3400
// }

Xử Lý Ticket Events qua HTTP Integration

// Gorgias có thể gửi HTTP requests qua Rules hoặc HTTP integrations
app.post('/webhooks/gorgias', async (req, res) => {
const event = req.body;
await tajo.connectors.handleEvent('gorgias', {
type: 'ticket.updated',
payload: {
ticketId: event.ticket_id,
status: event.status,
customerEmail: event.customer?.email,
channel: event.channel,
tags: event.tags,
satisfaction: event.satisfaction
}
});
res.status(200).send('OK');
});

Campaign Sau Khi Giải Quyết

// Kích hoạt email follow-up sau khi support ticket được giải quyết
tajo.connectors.on('gorgias', 'ticket.closed', async (event) => {
if (event.satisfaction_score >= 4) {
await tajo.campaigns.trigger('post-support-upsell', {
email: event.customer.email,
params: {
agent_name: event.assignee.name,
ticket_subject: event.subject,
resolution_time: event.resolution_time
}
});
}
});

Đồng Bộ Dữ Liệu CSAT

// Đồng bộ kết quả satisfaction survey sang thuộc tính Brevo
await tajo.connectors.sync('gorgias', {
type: 'incremental',
resources: ['satisfaction_surveys'],
since: '2024-01-01'
});

Giới Hạn Tốc Độ

Gorgias áp dụng giới hạn tốc độ theo tài khoản:

Loại Giới HạnGiá Trị
Giới hạn tốc độ API2 yêu cầu mỗi giây
Cho phép burstTới 5 yêu cầu trong khoảng ngắn
Phân trang30 items mỗi trang (mặc định), tối đa 100

Chiến Lược Phân Trang

Gorgias sử dụng cursor-based pagination với tham số cursorlimit. Tajo xử lý tự động, yêu cầu tới 100 items mỗi trang để tối đa hiệu quả.

Gorgias trả về 429 Too Many Requests khi vượt giới hạn tốc độ.

Khắc Phục Sự Cố

Sự Cố Phổ Biến

Sự CốNguyên NhânGiải Pháp
401 UnauthorizedEmail hoặc API key không hợp lệXác minh credentials trong Gorgias Settings > REST API
404 Not FoundEndpoint không hợp lệ hoặc resource ID saiKiểm tra API base URL bao gồm subdomain của bạn
Customers thiếuKhông có email trên recordGorgias yêu cầu email để khớp customer
Tags không đồng bộTags không được gán cho customersXác minh tags nằm trên customer objects, không chỉ tickets
Đồng bộ chậmGiới hạn tốc độ thấpGorgias giới hạn 2 req/s; full syncs mất nhiều thời gian hơn

Chế Độ Debug

connectors:
gorgias:
debug: true
log_level: verbose
log_api_calls: true

Kiểm Tra Kết Nối

Terminal window
tajo connectors test gorgias
# ✓ API authentication successful
# ✓ Customer list accessible
# ✓ Ticket data readable
# ✓ CSAT surveys available
# ✓ Tags listable

Thực Hành Tốt Nhất

  1. Dùng HTTP integrations cho real-time - Cấu hình Gorgias Rules để gửi HTTP requests đến Tajo trên ticket events
  2. Đồng bộ dữ liệu CSAT thường xuyên - Dùng satisfaction scores để thúc đẩy re-engagement campaigns
  3. Ánh xạ tags sang segments - Chuyển đổi Gorgias customer tags thành Brevo list memberships
  4. Xử lý phân trang cẩn thận - Với giới hạn 2 req/s, lên kế hoạch cho thời gian đồng bộ dài hơn trên datasets lớn
  5. Kết hợp với dữ liệu e-commerce - Kết hợp dữ liệu support Gorgias với dữ liệu order Shopify trong Brevo
  6. Thay đổi API keys - Vì Gorgias keys có toàn quyền truy cập, thay đổi chúng định kỳ

Bảo Mật

  • Basic Auth - Email và API key qua HTTPS
  • Chỉ HTTPS - Tất cả giao tiếp API được mã hóa qua TLS 1.2+
  • Keys Truy Cập Đầy Đủ - Không có scoping chi tiết (bảo vệ keys cẩn thận)
  • IP Allowlisting - Có sẵn trên các gói Gorgias cao hơn
  • Lưu Trữ Mã Hóa - API credentials được mã hóa khi lưu trữ trong Tajo
  • Tuân Thủ SOC 2 - Nền tảng Gorgias được chứng nhận SOC 2 Type II

Tài Nguyên Liên Quan

Subscribe to updates

developer-docs

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

auto-detect
Trợ lý AI

Xin chào! Hãy hỏi tôi về tài liệu.