---
title: "Hướng dẫn tích hợp BigCommerce"
description: "Hướng dẫn đầy đủ về tích hợp Tajo với cửa hàng BigCommerce của bạn để đồng bộ dữ liệu khách hàng, chạy chương trình khách hàng thân thiết và tự động hóa marketing"
url: https://tajo.io/vi/docs/ecommerce-platforms/bigcommerce/
markdown: https://tajo.io/vi/docs/ecommerce-platforms/bigcommerce.md
lang: vi-VN
robots: noindex
---

Đăng ký quyền truy cập sớm

Nhập tên và địa chỉ email công việc của bạn. Chúng tôi sẽ gửi liên kết để xác nhận yêu cầu truy cập Tajo.

# Hướng dẫn tích hợp BigCommerce

Hướng dẫn này đưa bạn qua từng bước tích hợp Tajo với cửa hàng BigCommerce để mở khóa các khả năng tương tác khách hàng, chương trình khách hàng thân thiết và tự động hóa marketing.

## Tổng quan

Tích hợp Tajo và BigCommerce cho phép bạn:

- **Đồng bộ dữ liệu khách hàng** tự động từ cửa hàng BigCommerce của bạn
- **Theo dõi đơn hàng và sản phẩm** phục vụ marketing cá nhân hóa
- **Chạy chương trình khách hàng thân thiết** với điểm, hạng và phần thưởng
- **Tự động hóa chiến dịch marketing** qua Brevo (email, SMS, WhatsApp)
- **Phân khúc khách hàng** theo hành vi mua hàng và mức độ tương tác
- **Hỗ trợ nhiều gian hàng** trong cùng một hệ thống

## Điều kiện tiên quyết

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

- **Cửa hàng BigCommerce** ở bất kỳ gói nào (Standard, Plus, Pro hoặc Enterprise)
- **Tài khoản Tajo** với gói đăng ký đang hoạt động
- **Tài khoản Brevo** (tùy chọn, dùng cho tự động hóa marketing)
- **Thông tin xác thực API của cửa hàng** (tài khoản API với các scope phù hợp)

## Bước 1: Cài đặt ứng dụng Tajo

### Từ BigCommerce App Marketplace

1. Mở bảng điều khiển BigCommerce của bạn
2. Đi tới **Apps → Marketplace**
3. Tìm kiếm “Tajo”
4. Nhấp **Get This App**
5. Xem lại các quyền rồi nhấp **Install**
6. Làm theo trình hướng dẫn thiết lập để kết nối tài khoản Tajo của bạn

### Cấu hình API

Sau khi cài đặt, hãy cấu hình quyền truy cập API:

```json
{
  "api_credentials": {
    "client_id": "your_client_id",
    "client_secret": "your_client_secret",
    "access_token": "your_access_token",
    "store_hash": "your_store_hash"
  },
  "scopes": [
    "store_v2_customers",
    "store_v2_orders",
    "store_v2_products",
    "store_cart",
    "store_checkout"
  ]
}
```

## Bước 2: Cấu hình đồng bộ dữ liệu

### Thiết lập đồng bộ khách hàng

Chọn dữ liệu khách hàng nào sẽ được đồng bộ:

```json
{
  "sync_settings": {
    "customers": {
      "enabled": true,
      "sync_frequency": "real-time",
      "fields": [
        "email",
        "first_name",
        "last_name",
        "phone",
        "company",
        "customer_group_id",
        "store_credit",
        "addresses",
        "date_created"
      ]
    },
    "orders": {
      "enabled": true,
      "sync_frequency": "real-time",
      "include_products": true,
      "include_shipping": true,
      "include_coupons": true
    },
    "products": {
      "enabled": true,
      "sync_frequency": "hourly",
      "include_variants": true,
      "include_images": true,
      "include_custom_fields": true
    }
  }
}
```

### Cấu hình webhook

Tajo đăng ký các webhook BigCommerce sau:

| Webhook | Mục đích |
| --- | --- |
| `store/customer/created` | Đồng bộ khách hàng mới sang Tajo và Brevo |
| `store/customer/updated` | Giữ hồ sơ khách hàng luôn cập nhật |
| `store/order/created` | Theo dõi giao dịch, cộng điểm khách hàng thân thiết |
| `store/order/statusUpdated` | Kích hoạt chiến dịch theo trạng thái |
| `store/cart/created` | Theo dõi giỏ hàng để phát hiện bỏ dở |
| `store/cart/updated` | Cập nhật chuỗi khôi phục giỏ hàng bỏ dở |
| `store/product/updated` | Giữ danh mục sản phẩm luôn đồng bộ |

### Hỗ trợ nhiều gian hàng

Dành cho BigCommerce Enterprise có nhiều gian hàng:

```json
{
  "multi_storefront": {
    "enabled": true,
    "storefronts": [
      {
        "channel_id": 1,
        "name": "Main Store",
        "loyalty_program": "default"
      },
      {
        "channel_id": 2,
        "name": "Wholesale",
        "loyalty_program": "b2b_program"
      },
      {
        "channel_id": 3,
        "name": "International",
        "loyalty_program": "global_program"
      }
    ],
    "sync_across_channels": true
  }
}
```

## Bước 3: Thiết lập chương trình khách hàng thân thiết

### Cấu hình hệ thống điểm

```javascript
const pointsConfig = {
  // Points per dollar spent
  purchasePoints: {
    enabled: true,
    rate: 1, // 1 point per $1
    roundingMode: 'floor'
  },

  // Bonus actions
  bonusPoints: {
    accountCreation: 100,
    firstPurchase: 200,
    reviewSubmitted: 50,
    referralMade: 500,
    birthdayBonus: 100,
    newsletterSignup: 25
  },

  // Customer group multipliers
  customerGroupMultipliers: {
    'Retail': 1.0,
    'VIP': 1.5,
    'Wholesale': 0.5,
    'Platinum': 2.0
  }
};
```

### Hạng khách hàng thân thiết

```javascript
const loyaltyTiers = [
  {
    name: 'Bronze',
    minPoints: 0,
    benefits: [
      '1 point per $1 spent',
      'Birthday bonus points',
      'Member-only promotions'
    ]
  },
  {
    name: 'Silver',
    minPoints: 1000,
    benefits: [
      '1.25x points multiplier',
      'Free shipping on orders $50+',
      'Early access to sales'
    ]
  },
  {
    name: 'Gold',
    minPoints: 5000,
    benefits: [
      '1.5x points multiplier',
      'Free shipping on all orders',
      'Exclusive product access',
      'Priority support'
    ]
  },
  {
    name: 'Platinum',
    minPoints: 15000,
    benefits: [
      '2x points multiplier',
      'Free express shipping',
      'VIP experiences',
      'Dedicated account manager'
    ]
  }
];
```

## Bước 4: Quản lý khách hàng B2B

### Tài khoản công ty

BigCommerce hỗ trợ các tính năng B2B tích hợp được với Tajo:

```javascript
const b2bConfig = {
  companyAccounts: {
    enabled: true,
    syncCompanyData: true,
    fields: [
      'company_name',
      'tax_id',
      'credit_limit',
      'payment_terms',
      'price_list'
    ]
  },

  // B2B-specific loyalty rules
  b2bLoyalty: {
    orderVolumeBonus: {
      threshold: 10000,
      bonusMultiplier: 1.5
    },
    reorderPoints: {
      enabled: true,
      rate: 0.5 // 0.5 points per $1 on reorders
    }
  }
};
```

### Tích hợp nhóm khách hàng

```javascript
// Map BigCommerce customer groups to Tajo segments
const customerGroupMapping = {
  'Retail': {
    tajoSegment: 'retail_customers',
    loyaltyTier: 'Bronze',
    emailList: 'retail_newsletter'
  },
  'Wholesale': {
    tajoSegment: 'wholesale_customers',
    loyaltyTier: 'Silver',
    emailList: 'wholesale_updates'
  },
  'VIP': {
    tajoSegment: 'vip_customers',
    loyaltyTier: 'Gold',
    emailList: 'vip_exclusive'
  }
};
```

## Bước 5: Khôi phục giỏ hàng bỏ dở

### Theo dõi giỏ hàng

```javascript
// BigCommerce cart webhook handler
async function handleCartWebhook(event) {
  const cart = await bigcommerce.carts.get(event.data.cartId);

  if (!cart.customer_id && !cart.email) {
    return; // Can't track without identity
  }

  await tajo.carts.track({
    customerId: cart.customer_id,
    email: cart.email,
    cartId: cart.id,
    items: cart.line_items.physical_items.map(item => ({
      productId: item.product_id,
      variantId: item.variant_id,
      title: item.name,
      quantity: item.quantity,
      price: item.sale_price || item.list_price,
      image: item.image_url
    })),
    totalPrice: cart.cart_amount,
    currency: cart.currency.code,
    checkoutUrl: cart.redirect_urls?.checkout_url
  });
}
```

### Chuỗi khôi phục

```json
{
  "abandoned_cart_sequence": {
    "trigger": {
      "event": "cart_abandoned",
      "delay": "1 hour"
    },
    "messages": [
      {
        "delay": "1 hour",
        "channel": "email",
        "template": "cart_reminder_1",
        "subject": "You left something behind!"
      },
      {
        "delay": "24 hours",
        "channel": "email",
        "template": "cart_reminder_2",
        "subject": "Your cart is waiting - 10% off inside"
      },
      {
        "delay": "72 hours",
        "channel": "sms",
        "template": "cart_sms_final"
      }
    ],
    "exit_conditions": [
      "order_completed",
      "cart_emptied",
      "unsubscribed"
    ]
  }
}
```

## Bước 6: Tự động hóa marketing

### Phân khúc khách hàng

```javascript
const bigcommerceSegments = [
  // Purchase behavior
  {
    name: 'First-Time Buyers',
    conditions: { orders_count: 1 }
  },
  {
    name: 'Repeat Customers',
    conditions: { orders_count: { $gte: 2 } }
  },
  {
    name: 'High-Value Customers',
    conditions: { total_spent: { $gte: 1000 } }
  },

  // Customer groups
  {
    name: 'Wholesale Accounts',
    conditions: { customer_group: 'Wholesale' }
  },

  // Engagement
  {
    name: 'At-Risk Customers',
    conditions: {
      last_order_date: { $lt: '-90 days' },
      orders_count: { $gte: 2 }
    }
  }
];
```

### Chiến dịch tự động

```javascript
// Order status change triggers
bigcommerce.webhooks.on('store/order/statusUpdated', async (event) => {
  const order = await bigcommerce.orders.get(event.data.orderId);
  const customer = await tajo.customers.getByEmail(order.billing_address.email);

  switch (event.data.status.new_status) {
    case 'Shipped':
      await brevo.trackEvent(customer.email, 'order_shipped', {
        orderId: order.id,
        trackingNumber: order.tracking_number,
        carrier: order.shipping_carrier
      });
      break;

    case 'Completed':
      // Award loyalty points
      const points = calculatePoints(order, customer);
      await tajo.loyalty.awardPoints(customer.id, points);

      // Trigger review request after 14 days
      await brevo.scheduleEvent(customer.email, 'review_request', {
        orderId: order.id,
        products: order.products
      }, { delay: '14 days' });
      break;
  }
});
```

## Bước 7: Phân tích

### Chỉ số trên bảng điều khiển

```javascript
const dashboardMetrics = {
  customers: {
    total: await tajo.analytics.count('customers'),
    byChannel: await tajo.analytics.groupBy('customers', 'channel_id'),
    newThisMonth: await tajo.analytics.count('customers', {
      created_at: { $gte: 'this_month' }
    })
  },

  revenue: {
    total: await tajo.analytics.sum('orders.total'),
    byChannel: await tajo.analytics.groupBy('orders', 'channel_id', {
      aggregate: 'sum',
      field: 'total'
    }),
    averageOrderValue: await tajo.analytics.avg('orders.total')
  },

  loyalty: {
    activeMembers: await tajo.analytics.count('loyalty_members'),
    pointsIssued: await tajo.analytics.sum('points.awarded'),
    redemptionRate: await tajo.analytics.pointsRedemptionRate()
  }
};
```

## Khắc phục sự cố

### Giới hạn tần suất API

```javascript
// Implement rate limiting
async function bigcommerceApiCall(endpoint, options, retries = 3) {
  for (let i = 0; i < retries; i++) {
    try {
      const response = await fetch(endpoint, options);

      if (response.status === 429) {
        const retryAfter = response.headers.get('X-Rate-Limit-Time-Reset-Ms');
        await sleep(parseInt(retryAfter) || Math.pow(2, i) * 1000);
        continue;
      }

      return response;
    } catch (error) {
      if (i === retries - 1) throw error;
    }
  }
}
```

### Xác minh webhook

```javascript
// Verify BigCommerce webhook signature
function verifyWebhook(payload, signature, secret) {
  const expected = crypto
    .createHmac('sha256', secret)
    .update(payload)
    .digest('base64');

  return crypto.timingSafeEqual(
    Buffer.from(expected),
    Buffer.from(signature)
  );
}
```

## Bước tiếp theo

1. **[Cấu hình tích hợp Brevo](https://tajo.io/vi/docs/platform-integration/tajo-brevo-integration)** cho chiến dịch email và SMS
2. **[Thiết lập webhook](https://tajo.io/vi/docs/webhook-configuration/setup-guide)** cho sự kiện theo thời gian thực
3. **[Tạo phân khúc khách hàng](https://tajo.io/vi/docs/contact-management)** phục vụ marketing có mục tiêu
4. **[Xây dựng mẫu email](https://tajo.io/vi/docs/messaging-api)** cho các chiến dịch tự động

## Hỗ trợ

- **Hỗ trợ tích hợp**: [support@tajo.io](mailto:support@tajo.io)
- **Tài liệu BigCommerce**: [developer.bigcommerce.com](https://developer.bigcommerce.com/)
- **Tài liệu API**: [docs.tajo.io/api](https://tajo.io/vi/docs/endpoints/rest-api)
- **Liên hệ hỗ trợ**: [/vi/contact](https://tajo.io/vi/contact)
