تكامل WooCommerce + Brevo
WooCommerce + Brevo
اربط بيانات متجر WooCommerce بمنصة التفاعل في Brevo عبر MCP. زامن العملاء، أتمت الحملات المستندة إلى الطلبات، استرجع سلات التسوق المتروكة، وقسّم المشترين, كل ذلك يُنسّقه وكلاء الذكاء الاصطناعي في Claude.
خوادم MCP المستخدمة
| الخادم | الحزمة/URL | المصادقة | الغرض |
|---|---|---|---|
| WooCommerce MCP | woocommerce-mcp-server | Consumer Key/Secret | العملاء، الطلبات، المنتجات، الكوبونات، التقارير |
| Brevo MCP | mcp.brevo.com/v1/brevo/mcp | Token | جهات الاتصال، حملات البريد الإلكتروني، SMS، WhatsApp، تتبع الأحداث |
Tip
يستخدم WooCommerce واجهة REST API لـ WordPress مع مصادقة consumer key. يلف خادم MCP هذه النقاط النهائية ليتمكن Claude من قراءة بيانات متجرك بجانب Brevo. تأكد من تفعيل REST API لـ WooCommerce في WooCommerce > Settings > Advanced > REST API.
الإعداد
الخطوة 1: إنشاء مفاتيح API لـ WooCommerce
- في لوحة تحكم WordPress، انتقل إلى WooCommerce > Settings > Advanced > REST API
- انقر على Add Key، اضبط الصلاحيات على Read، ثم أنشئ المفاتيح
- دوّن Consumer Key وConsumer Secret
الخطوة 2: توصيل كلا خادمي MCP
{ "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" } }, "woocommerce": { "command": "npx", "args": ["-y", "woocommerce-mcp-server"], "env": { "WOO_STORE_URL": "https://your-store.com", "WOO_CONSUMER_KEY": "ck_your_consumer_key", "WOO_CONSUMER_SECRET": "cs_your_consumer_secret" } } }}الخطوة 3: التحقق من الاتصال
اسأل Claude:
> ما هي آخر 5 طلبات WooCommerce؟> أرني قوائم جهات الاتصال في Brevoيجب أن يستخدم Claude WooCommerce MCP للأولى وBrevo MCP للثانية.
حالة الاستخدام 1: وكيل مزامنة العملاء
زامن عملاء WooCommerce مع Brevo مع بيانات الشراء الكاملة:
---name: woocommerce-customer-syncdescription: Sync WooCommerce customers to Brevo contacts with order historyversion: 1.0.0temperature: 0.1tools: - woocommerce - brevo_contacts - brevo_attributes - brevo_liststriggers: - schedule: "0 */6 * * *" - event: customer_created - event: order_completed---
# WooCommerce Customer Sync Agent
Synchronize customer data from WooCommerce to Brevo contacts.
## Strategy
1. Query WooCommerce for customers modified since last sync2. For each customer, fetch order history via WooCommerce orders endpoint3. Create or update Brevo contact with profile + computed commerce attributes4. Segment into Brevo lists: - New customers → "Welcome Series" list - Repeat buyers (2+ orders) → "Loyal Customers" list - High-value (>$500 total) → "VIP" list - Lapsed (no order in 90+ days) → "Win-Back" list
## Field Mapping
| WooCommerce Field | Brevo Attribute ||------------------|-----------------|| email | EMAIL || first_name | FIRSTNAME || last_name | LASTNAME || billing.phone | SMS || billing.company | COMPANY || billing.country | COUNTRY || billing.city | CITY || date_created | SIGNUP_DATE || orders_count (computed) | ORDER_COUNT || total_spent (computed) | TOTAL_SPENT || last_order_date (computed) | LAST_ORDER || role | WOO_ROLE |
## Rules- ONLY sync customers, not guest checkouts (unless email matches existing contact)- NEVER overwrite Brevo data if WooCommerce field is empty- ALWAYS validate phone to E.164 format before sync- Handle WordPress roles: "customer" and "subscriber" only (skip "administrator", "shop_manager")- Track events: woo_sync_success, woo_sync_errorحالة الاستخدام 2: وكيل حملة الطلبات
شغّل حملات مخصصة من أحداث دورة حياة طلبات WooCommerce:
---name: woocommerce-order-campaignsdescription: Orchestrate Brevo campaigns based on WooCommerce order eventsversion: 1.0.0temperature: 0.3tools: - woocommerce - brevo_contacts - brevo_email_campaign_management - brevo_templates - brevo_sms_campaignstriggers: - event: order_processing - event: order_completed - event: order_refunded---
# WooCommerce Order Campaign Agent
When WooCommerce order status changes, trigger targeted engagement sequences in Brevo.
## Sequence Logic
### Order Processing (New Order)1. Immediate: Order confirmation email (transactional)2. +2 hours: SMS with order summary and estimated shipping3. Track event: woo_order_placed with order value
### Order Completed (Shipped/Delivered)#### First-Time Buyers1. Day 3: Welcome email with brand story2. Day 7: Product care guide for purchased category3. Day 14: Review request4. Day 30: Cross-sell based on product category
#### Repeat Buyers1. Day 3: Loyalty points or reward notification2. Day 14: Replenishment reminder (if consumable)3. Day 21: Early access to new products
#### High-Value Orders (>$150)1. Day 1: Personal thank-you email2. Day 3: SMS with care tips3. Day 7: VIP offer or loyalty program invitation
### Order Refunded1. Immediate: Refund confirmation email2. Day 3: Feedback survey3. Day 7: Win-back offer with 15% discount
## Rules- ALWAYS check current WooCommerce order status before sending- NEVER send marketing to orders with status "cancelled" or "failed"- Personalize with: product name, order number, customer first name- Check WooCommerce order notes for special instructions- Use Brevo template variables for dynamic contentحالة الاستخدام 3: استرداد سلات التسوق المتروكة
استرجع سلات WooCommerce المتروكة عبر رسائل Brevo متعددة القنوات:
---name: woocommerce-cart-recoverydescription: Recover WooCommerce abandoned carts via Brevo email, SMS, and WhatsAppversion: 1.0.0temperature: 0.2tools: - woocommerce - brevo_contacts - brevo_email_campaign_management - brevo_templates - brevo_sms_campaignstriggers: - event: cart_abandoned conditions: - cart_value: "> 25" - time_since_activity: "> 1h"---
# WooCommerce Cart Recovery Agent
Monitor WooCommerce abandoned carts and execute multi-channel recovery through Brevo.
## Recovery Sequence
1. **+1 hour**: Reminder email with cart contents and product images2. **+24 hours**: If no email open → SMS with short cart recovery link3. **+48 hours**: If no recovery → Email with coupon code (auto-generated via WooCommerce coupons API)4. **+72 hours**: If cart > $100 and no recovery → WhatsApp with personal outreach
## Cart Data to Include- Product names and images (from WooCommerce)- Cart total with currency- Direct cart recovery URL- WooCommerce coupon code (created dynamically via API for step 3)
## Coupon GenerationFor step 3, create a WooCommerce coupon via the API:- Type: percent_discount (10%)- Usage limit: 1- Expiry: 7 days- Individual use: true- Include coupon code in the Brevo email template
## Rules- NEVER send to customers who completed checkout since cart was abandoned- ALWAYS verify cart still exists before each step- Maximum 4 touchpoints per abandoned cart- Respect opt-out preferences per channel- WooCommerce guest carts: only recover if email was captured at checkout startحالة الاستخدام 4: متابعة مراجعات المنتجات
استفد من بيانات منتجات WooCommerce لحملات مراجعات موجّهة:
---name: woocommerce-review-agentdescription: Request product reviews via Brevo based on WooCommerce delivery timelineversion: 1.0.0temperature: 0.2tools: - woocommerce - brevo_contacts - brevo_email_campaign_management - brevo_templatestriggers: - schedule: "0 9 * * *"---
# Product Review Agent
Identify WooCommerce orders delivered 14+ days ago without a review, and send a personalized review request via Brevo.
## Strategy
1. Query WooCommerce for orders completed 14-21 days ago2. Check if customer has left a product review (via WooCommerce reviews API)3. If no review, send personalized email with: - Product name and image - Direct review link - Small incentive (e.g., 5% off next order)4. Track event: review_request_sent
## Rules- Maximum one review request per order- NEVER request reviews for refunded/cancelled orders- Only send during business hours (9 AM customer timezone)- Skip if customer has unsubscribed from marketingمثال: التنسيق بلغة طبيعية
مع توصيل كلا الخادمين MCP:
أنت: "ابحث عن عملاء WooCommerce الذين أنفقوا أكثر من $200 إجمالاً لكنهم لم يطلبوا منذ 60+ يوماً. أضفهم إلى قائمة الاستعادة في Brevo وأرسل لهم بريداً إلكترونياً لإعادة التفاعل بخصم 15%."
Claude: جارٍ الاستعلام عن WooCommerce للعملاء ذوي القيمة العالية الخاملين...[يستخدم WooCommerce MCP لجلب العملاء وسجل الطلبات][يفلتر: total_spent > $200 AND last_order > 60 يوماً مضت]
تم العثور على 41 عميلاً خاملاً ذا قيمة عالية.جارٍ التحقق من جهات الاتصال في Brevo...[يستخدم brevo_contacts لمطابقة رسائل البريد الإلكتروني]
جارٍ معالجة 41 عميلاً...[يحدّث جهات الاتصال بسمتَي TOTAL_SPENT وLAST_ORDER][يضيف 41 إلى قائمة "Win-Back"][ينشئ كوبون WooCommerce: WINBACK15 (خصم 15%، استخدام واحد)][يُطلق قالب بريد الاستعادة مع رمز الكوبون]
تم:- إضافة 41 عميلاً إلى قائمة "Win-Back" في Brevo- إرسال رسائل استعادة برمز خصم 15% مخصص- إنشاء كوبون WINBACK15 في WooCommerce (استخدام واحد، صلاحية 14 يوماً)- تتبع حدث Brevo: winback_campaign_sentالخطوات التالية
- خادم MCP لـ Brevo, القائمة الكاملة لوحدات Brevo MCP
- مواصفات الوكيل, تخصيص سلوك الوكيل
- Shopify + Brevo, تكامل Shopify
- BigCommerce + Brevo, تكامل BigCommerce
- API مخصصة + Brevo, بناء موصلات لأي API REST