Konektor BigCommerce
Hubungkan toko BigCommerce Anda ke Brevo melalui Tajo untuk sinkronisasi data e-commerce yang lengkap. Sinkronkan pelanggan, pesanan, produk, dan event keranjang untuk menjalankan kampanye pemasaran tertarget, pemulihan keranjang yang ditinggalkan, dan otomatisasi pascapembelian.
Ikhtisar
| Properti | Nilai |
|---|---|
| Platform | BigCommerce |
| Kategori | E-commerce |
| Kompleksitas penyiapan | Sedang |
| Integrasi resmi | Tidak |
| Data yang tersinkron | Pelanggan, Pesanan, Produk, Keranjang |
| Skill yang tersedia | 10 |
Fitur
- Sinkronisasi pelanggan - Sinkronisasi data pelanggan secara real-time ke kontak Brevo
- Pelacakan pesanan - Event siklus hidup pesanan untuk alur pemasaran pascapembelian
- Sinkronisasi katalog produk - Sinkronkan produk untuk rekomendasi email dan konten dinamis
- Keranjang yang ditinggalkan - Lacak dan pulihkan keranjang yang ditinggalkan dengan email otomatis
- Dukungan multi-storefront - Hubungkan beberapa storefront BigCommerce sekaligus
- Pembaruan berbasis webhook - Pembaruan data real-time melalui webhook BigCommerce
- Custom field - Petakan custom field BigCommerce ke atribut kontak Brevo
- Pelacakan inventaris - Sinkronkan level stok untuk notifikasi stok kembali tersedia
Prasyarat
Sebelum memulai, pastikan Anda memiliki:
- Toko BigCommerce dengan akses Store Owner atau Admin
- API account BigCommerce dengan scope OAuth yang sesuai
- Store Hash Anda (terdapat pada URL toko atau kredensial API)
- Akun Brevo dengan akses API
- Akun Tajo dengan kredensial API
Autentikasi
Kredensial API account
BigCommerce menggunakan API account berbasis OAuth. Buat satu di control panel BigCommerce Anda melalui Settings > API > API Accounts.
Anda akan menerima:
- Client ID - Identifier aplikasi Anda
- Client Secret - Secret aplikasi Anda (simpan dengan aman)
- Access Token - Dipakai untuk autentikasi API
- Store Hash - Identifier unik toko Anda
curl https://api.bigcommerce.com/stores/{store_hash}/v3/catalog/products \ -H "X-Auth-Token: YOUR_ACCESS_TOKEN" \ -H "Content-Type: application/json" \ -H "Accept: application/json"Scope OAuth yang diperlukan
| Scope | Akses | Tujuan |
|---|---|---|
store_v2_customers | Baca | Sinkronisasi data pelanggan |
store_v2_orders | Baca | Pelacakan event pesanan |
store_v2_products | Baca | Sinkronisasi katalog produk |
store_cart | Baca | Pelacakan keranjang yang ditinggalkan |
store_v2_information | Baca | Konfigurasi toko |
store_v2_content | Baca | Konten storefront |
Konfigurasi
Penyiapan dasar
connectors: bigcommerce: enabled: true store_hash: "your-store-hash" access_token: "your-access-token" client_id: "your-client-id"
# Data sync options sync: customers: true orders: true products: true carts: true inventory: false
# Brevo list assignment lists: all_customers: 40 buyers: 41 abandoned_cart: 42Pemetaan field pelanggan
Petakan field pelanggan BigCommerce ke atribut Brevo:
customer_mapping: email: email first_name: FIRSTNAME last_name: LASTNAME phone: SMS company: COMPANY
# Address fields addresses[0].city: CITY addresses[0].state: STATE addresses[0].country: COUNTRY addresses[0].zip: ZIP
# E-commerce metrics orders_count: ORDER_COUNT total_spent: TOTAL_SPENT date_created: SIGNUP_DATE
# Customer group customer_group_id: CUSTOMER_GROUPKonfigurasi webhook
webhooks: - scope: "store/customer/created" destination: "customer_created" - scope: "store/customer/updated" destination: "customer_updated" - scope: "store/order/created" destination: "order_placed" - scope: "store/order/updated" destination: "order_updated" - scope: "store/order/statusUpdated" destination: "order_status_changed" - scope: "store/cart/created" destination: "cart_created" - scope: "store/cart/updated" destination: "cart_updated" - scope: "store/cart/abandoned" destination: "cart_abandoned" - scope: "store/inventory/updated" destination: "inventory_changed"Endpoint API
| Metode | Endpoint | Deskripsi |
|---|---|---|
GET | /v3/customers | Daftar pelanggan |
POST | /v3/customers | Buat pelanggan |
PUT | /v3/customers | Perbarui pelanggan |
GET | /v2/orders | Daftar pesanan |
GET | /v2/orders/{id} | Ambil detail pesanan |
GET | /v3/catalog/products | Daftar produk |
GET | /v3/catalog/products/{id} | Ambil detail produk |
GET | /v3/catalog/products/{id}/variants | Daftar varian produk |
GET | /v3/carts | Daftar keranjang |
GET | /v3/abandoned-carts | Daftar keranjang yang ditinggalkan |
POST | /v3/hooks | Buat sebuah webhook |
GET | /v3/catalog/categories | Daftar kategori |
Contoh kode
Inisialisasi konektor BigCommerce
import { TajoClient } from '@tajo/sdk';
const tajo = new TajoClient({ apiKey: process.env.TAJO_API_KEY, brevoApiKey: process.env.BREVO_API_KEY});
// Connect BigCommerce storeawait tajo.connectors.connect('bigcommerce', { storeHash: process.env.BC_STORE_HASH, accessToken: process.env.BC_ACCESS_TOKEN, clientId: process.env.BC_CLIENT_ID});Ambil dan sinkronkan pelanggan
// Fetch customers from BigCommerceconst response = await fetch( `https://api.bigcommerce.com/stores/${STORE_HASH}/v3/customers?limit=250`, { headers: { 'X-Auth-Token': ACCESS_TOKEN, 'Content-Type': 'application/json' } });
const { data, meta } = await response.json();// data: [{ id, email, first_name, last_name, phone, ... }]// meta.pagination: { total, count, per_page, current_page, total_pages }Tangani event webhook
// BigCommerce webhook handlerapp.post('/webhooks/bigcommerce', async (req, res) => { const { scope, store_id, data } = req.body;
// Verify the webhook is from your store if (store_id !== process.env.BC_STORE_HASH) { return res.status(401).send('Unauthorized'); }
// Forward to Tajo await tajo.connectors.handleWebhook('bigcommerce', { topic: scope, payload: data });
res.status(200).send('OK');});Sinkronkan katalog produk
// Full product catalog syncawait tajo.connectors.sync('bigcommerce', { type: 'full', resources: ['products'], includeVariants: true, includeImages: true});
// Check sync statusconst status = await tajo.connectors.status('bigcommerce');console.log(status);// {// connected: true,// lastSync: '2024-01-15T10:30:00Z',// customersCount: 8200,// ordersCount: 4500,// productsCount: 620// }Batas rate
| Paket | Batas | Detail |
|---|---|---|
| Standard | 150 permintaan/30 detik | Per toko |
| Plus | 300 permintaan/30 detik | Per toko |
| Pro | 450 permintaan/30 detik | Per toko |
| Enterprise | Tanpa batas | Batas kustom |
Batas tambahan:
| Sumber daya | Batas |
|---|---|
| Webhook | 100 per toko |
| Per halaman | Maksimum 250 record |
| Permintaan bersamaan | Bergantung pada paket |
Header batas rate
Pantau header X-Rate-Limit-Requests-Left dan X-Rate-Limit-Time-Reset-Ms untuk menjaga penggunaan API Anda tetap berada dalam batas.
Pemecahan masalah
| Masalah | Penyebab | Solusi |
|---|---|---|
401 Unauthorized | Access token tidak valid | Buat ulang kredensial API di admin BigCommerce |
403 Forbidden | Scope OAuth belum diberikan | Periksa scope API account dan tambahkan izin yang diperlukan |
| Webhook tidak terpicu | Batas webhook tercapai | Periksa jumlah webhook (maksimum 100) dan hapus yang tidak terpakai |
| Event keranjang tidak muncul | Script storefront tidak termuat | Verifikasi script pelacakan pada storefront BigCommerce |
| Produk tidak tersinkron | Cache katalog | Picu sinkronisasi manual atau tunggu pembaruan webhook |
429 Too Many Requests | Batas rate terlampaui | Terapkan antrean permintaan disertai pemantauan header batas rate |
| Grup pelanggan tidak muncul | API V2 versus V3 | Grup pelanggan memakai API V2, periksa versi endpoint |
Praktik terbaik
- Gunakan API V3 bila memungkinkan - API V3 menawarkan paginasi, pemfilteran, dan respons JSON yang lebih baik
- Pantau header batas rate - Lacak
X-Rate-Limit-Requests-Leftagar tidak menyentuh batas - Daftarkan webhook untuk sinkronisasi real-time - Gunakan webhook alih-alih polling untuk pembaruan pelanggan dan pesanan
- Kelompokkan pembaruan pelanggan - Gunakan endpoint bulk customer V3 untuk sinkronisasi data berskala besar
- Sertakan varian dalam sinkronisasi produk - Sinkronkan varian produk agar pelacakan inventaris akurat
- Siapkan webhook keranjang yang ditinggalkan - Krusial untuk otomatisasi email pemulihan keranjang
- Gunakan paginasi - Selalu paginasikan endpoint daftar, maksimum 250 record per halaman
Keamanan
- Autentikasi token OAuth - Akses API berbasis token yang aman
- Izin ber-scope - API account dibatasi pada scope data tertentu
- Hanya HTTPS - Seluruh komunikasi API dienkripsi melalui TLS
- Verifikasi webhook - Verifikasi sumber webhook menggunakan store hash
- Patuh PCI DSS - BigCommerce menangani data pembayaran secara aman
- SOC 2 Type II - Platform BigCommerce bersertifikat SOC 2