Tích Hợp Shopify + Brevo

Shopify + Brevo

Kết nối dữ liệu thương mại của Shopify với nền tảng tương tác Brevo qua MCP. Đồng bộ khách hàng, kích hoạt chuỗi sau mua hàng, khôi phục giỏ hàng bị bỏ rơi và chạy chiến dịch khách hàng thân thiết, tất cả được điều phối bởi các tác nhân AI trong Claude.

Máy Chủ MCP Được Sử Dụng

Máy chủGói/URLMục đích
Shopify Dev MCPnpx -y @shopify/dev-mcp@latestTìm kiếm tài liệu API Shopify, kiểm tra lược đồ GraphQL, xác thực truy vấn
Shopify Storefront MCPThiết lập theo ứng dụngDanh mục sản phẩm, thao tác giỏ hàng, dữ liệu khách hàng, theo dõi đơn hàng
Brevo MCPmcp.brevo.com/v1/brevo/mcpLiên hệ, chiến dịch email, SMS, WhatsApp, theo dõi sự kiện

Tip

Shopify Dev MCP dành cho phát triển, giúp Claude hiểu các API của Shopify. Storefront MCP dành cho truy cập dữ liệu sản xuất. Thông thường bạn sẽ dùng cả hai trong quá trình phát triển, rồi dùng Storefront MCP + Brevo MCP cho tác nhân thực tế.

Thiết Lập

Bước 1: Kết Nối Cả Hai Máy Chủ MCP

Thêm vào cấu hình Claude Desktop hoặc Claude Code của bạn:

{
"mcpServers": {
"brevo": {
"command": "npx",
"args": [
"mcp-remote",
"https://mcp.brevo.com/v1/brevo/mcp",
"--header",
"Authorization: Bearer ${BREVO_MCP_TOKEN}"
],
"env": {
"BREVO_MCP_TOKEN": "your-brevo-mcp-token"
}
},
"shopify-dev-mcp": {
"command": "npx",
"args": ["-y", "@shopify/dev-mcp@latest"]
}
}
}

Bước 2: Xác Minh Kết Nối

Hỏi Claude:

> Những API Shopify nào có sẵn để đọc dữ liệu khách hàng?
> Tôi có bao nhiêu liên hệ trong Brevo?

Claude nên dùng Shopify Dev MCP cho câu hỏi đầu và Brevo MCP cho câu hỏi thứ hai.

Trường Hợp Sử Dụng 1: Tác Nhân Đồng Bộ Khách Hàng

Đồng bộ khách hàng Shopify sang liên hệ Brevo với đầy đủ lịch sử mua hàng:

---
name: shopify-customer-sync
description: Sync Shopify customers to Brevo contacts with purchase data
version: 1.0.0
temperature: 0.1
tools:
- shopify-dev-mcp
- brevo_contacts
- brevo_attributes
- brevo_lists
triggers:
- schedule: "0 */6 * * *"
- event: customer_created
- event: order_completed
---
# Shopify Customer Sync Agent
Synchronize customer data from Shopify to Brevo contacts.
## Strategy
1. Query Shopify for customers updated since last sync
2. For each customer, create or update Brevo contact with:
- Email, name, phone
- Total orders, total spend (as Brevo attributes)
- Last order date
- Tags and segments
3. Add customers to appropriate Brevo lists based on behavior:
- New customers → "Welcome Series" list
- Repeat buyers → "Loyal Customers" list
- High-value (>$500 LTV) → "VIP" list
## Field Mapping
| Shopify Field | Brevo Attribute |
|--------------|-----------------|
| email | EMAIL |
| first_name | FIRSTNAME |
| last_name | LASTNAME |
| phone | SMS |
| orders_count | ORDER_COUNT |
| total_spent | TOTAL_SPENT |
| last_order_date | LAST_ORDER |
| tags | SHOPIFY_TAGS |
| accepts_marketing | OPT_IN |
## Rules
- ONLY sync customers who have accepted marketing
- NEVER overwrite Brevo data if Shopify field is empty
- ALWAYS validate phone numbers to E.164 format before sync
- Track sync events for debugging: shopify_sync_success, shopify_sync_error

Trường Hợp Sử Dụng 2: Tác Nhân Chiến Dịch Sau Mua Hàng

Kích hoạt chuỗi sau mua hàng được cá nhân hóa dựa trên dữ liệu đơn hàng:

---
name: shopify-post-purchase
description: Orchestrate post-purchase email sequences based on Shopify order data
version: 1.0.0
temperature: 0.3
tools:
- shopify-dev-mcp
- brevo_contacts
- brevo_email_campaign_management
- brevo_templates
- brevo_sms_campaigns
triggers:
- event: order_completed
---
# Post-Purchase Agent
When a Shopify order is completed, design and trigger the
appropriate follow-up sequence in Brevo.
## Sequence Logic
### First-Time Buyers
1. Immediate: Order confirmation (transactional)
2. Day 3: Welcome email with brand story
3. Day 7: Product care tips / how-to guide
4. Day 14: Review request
5. Day 30: Cross-sell based on purchased category
### Repeat Buyers
1. Immediate: Order confirmation
2. Day 3: Loyalty points notification
3. Day 14: "Restock" reminder if consumable product
4. Day 21: Exclusive early access to new products
### VIP Orders (>$200)
1. Immediate: Premium order confirmation
2. Day 1: Personal thank-you from founder (email)
3. Day 3: SMS with tracking + care tips
4. Day 7: Invitation to VIP program
## Rules
- ALWAYS check order status before sending, skip if cancelled/refunded
- NEVER send marketing to customers who haven't opted in
- Personalize with: product name, order number, customer first name
- Use Brevo template variables for dynamic content

Trường Hợp Sử Dụng 3: Khôi Phục Giỏ Hàng Bị Bỏ Rơi

Kết nối dữ liệu giỏ hàng Shopify với tin nhắn Brevo:

---
name: shopify-cart-recovery
description: Recover Shopify abandoned carts via Brevo email and SMS
version: 2.0.0
temperature: 0.2
tools:
- shopify-dev-mcp
- brevo_contacts
- brevo_email_campaign_management
- brevo_templates
- brevo_sms_campaigns
triggers:
- event: cart_abandoned
conditions:
- cart_value: "> 40"
- time_since_activity: "> 1h"
---
# Cart Recovery Agent
Monitor Shopify abandoned carts and execute recovery
sequences through Brevo.
## Recovery Sequence
1. **+1 hour**: Reminder email with cart contents and images
2. **+24 hours**: If no open → SMS with short link to cart
3. **+48 hours**: If no recovery → Email with 10% discount code
4. **+72 hours**: If cart > $150 and no recovery → WhatsApp with personal message
## Cart Data to Include
- Product images and names (from Shopify)
- Cart total with currency formatting
- Direct checkout link
- Discount code (generated dynamically for step 3)
## Rules
- NEVER send to customers who already completed checkout
- ALWAYS check cart status before each step
- Maximum 4 touchpoints per abandoned cart
- Respect opt-out preferences per channel

Ví Dụ: Điều Phối Bằng Ngôn Ngữ Tự Nhiên

Với cả hai máy chủ MCP được kết nối, bạn có thể điều phối theo thời gian thực:

Bạn: "Kiểm tra cửa hàng Shopify của tôi để tìm khách hàng đã đặt hàng
trong 7 ngày qua nhưng chưa có trong Brevo, và thêm họ vào."
Claude: Đang kiểm tra Shopify để tìm khách hàng gần đây...
[Sử dụng shopify-dev-mcp để hiểu Customers API]
[Truy vấn Shopify cho đơn hàng trong 7 ngày qua]
Tìm thấy 43 khách hàng từ 7 ngày qua.
Đang kiểm tra trong danh sách liên hệ Brevo...
[Sử dụng brevo_contacts để tìm kiếm từng email]
23 khách hàng chưa có trong Brevo. Đang thêm vào...
[Sử dụng brevo_contacts để tạo 23 liên hệ mới]
[Sử dụng brevo_lists để thêm người mua lần đầu vào "Welcome Series"]
[Sử dụng brevo_lists để thêm người mua lặp lại vào "Loyal Customers"]
Hoàn thành:
- 23 liên hệ mới được tạo trong Brevo
- 15 được thêm vào danh sách "Welcome Series" (người mua lần đầu)
- 8 được thêm vào danh sách "Loyal Customers" (người mua lặp lại)
- Tất cả liên hệ được đồng bộ với số lượng đơn hàng và tổng chi tiêu

Các Bước Tiếp Theo

Trợ lý AI

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

Bắt đầu miễn phí với Brevo