Shopify 커넥터
Shopify 커넥터
Shopify 스토어를 Brevo에 연결하여 완전한 고객 데이터 동기화, 장바구니 이탈 복구 및 자동화된 마케팅 캠페인을 구현하세요.
개요
| 속성 | 값 |
|---|---|
| 플랫폼 | Shopify |
| 카테고리 | 이커머스 |
| 설정 난이도 | 쉬움 |
| 공식 통합 | 예 |
| 동기화되는 데이터 | 고객, 주문, 제품, 장바구니, 이벤트 |
| 사용 가능한 스킬 | 12 |
주요 기능
- 실시간 고객 동기화 - 고객 데이터를 Brevo 연락처로 즉시 동기화합니다
- 주문 추적 - 구매 후 플로우를 위한 주문 이벤트
- 제품 카탈로그 동기화 - 추천을 위해 제품을 활용할 수 있습니다
- 장바구니 이탈 - 이탈한 장바구니를 추적하고 복구합니다
- 브라우징 행동 - 페이지 뷰 및 제품 관심도를 추적합니다
- 다중 스토어 지원 - 여러 Shopify 스토어를 연결합니다
사전 준비 사항
시작하기 전에 다음 사항이 준비되어 있어야 합니다.
- 관리자 액세스 권한이 있는 Shopify 스토어
- API 액세스가 가능한 Brevo 계정
- Tajo 계정
설치
옵션 1: Shopify App Store (권장)
- Shopify App Store의 Tajo 앱을 방문합니다
- “Add app”을 클릭합니다
- 요청된 권한을 부여합니다
- Brevo 계정을 연결합니다
옵션 2: 수동 설치
1단계: Shopify 앱 생성
- Shopify 관리자 → Settings → Apps and sales channels로 이동합니다
- “Develop apps” → “Create an app”을 클릭합니다
- 이름을 “Tajo Integration”으로 지정합니다
2단계: API 스코프 설정
다음 스코프를 활성화합니다.
read_customerswrite_customersread_ordersread_productsread_checkoutswrite_script_tags3단계: 앱 설치
# Using Tajo CLItajo connectors install shopify \ --shop-url your-store.myshopify.com \ --api-key $SHOPIFY_API_KEY \ --api-secret $SHOPIFY_API_SECRET4단계: 웹훅 설정
Tajo는 다음 웹훅을 자동으로 등록합니다.
| 웹훅 | 목적 |
|---|---|
customers/create | 새 고객 동기화 |
customers/update | 고객 데이터 변경 |
customers/delete | 고객 삭제 |
orders/create | 주문 생성 이벤트 |
orders/updated | 주문 상태 변경 |
checkouts/create | 장바구니 생성 |
checkouts/update | 장바구니 업데이트 |
설정
기본 설정
connectors: shopify: enabled: true shop_url: "your-store.myshopify.com" api_version: "2024-01"
# Data sync options sync: customers: true orders: true products: true carts: true inventory: false # Optional
# List assignment lists: all_customers: 5 buyers: 6 abandoned_cart: 7필드 매핑
Shopify 필드를 Brevo 연락처 속성에 매핑합니다.
기본 매핑
| Parameter | Type | Description |
|---|---|---|
email required | string | 고객 이메일 (고유 식별자) |
first_name optional | string | FIRSTNAME 속성에 매핑됩니다 |
last_name optional | string | LASTNAME 속성에 매핑됩니다 |
phone optional | string | WhatsApp/SMS용 SMS 속성에 매핑됩니다 |
accepts_marketing optional | boolean | 구독 상태를 제어합니다 |
orders_count optional | integer | 총 주문 수 |
total_spent optional | number | 고객 평생 가치 |
tags optional | array | Shopify의 고객 태그 |
커스텀 속성 매핑
field_mapping: # Standard fields email: email first_name: FIRSTNAME last_name: LASTNAME phone: SMS
# E-commerce metrics orders_count: ORDER_COUNT total_spent: TOTAL_SPENT last_order_date: LAST_ORDER_DATE
# Custom fields customer_type: CUSTOMER_TYPE preferred_language: LANGUAGE loyalty_tier: VIP_TIER
# Computed fields average_order_value: AOV days_since_last_order: RECENCY제품 동기화
이메일 추천을 위한 제품 동기화:
sync: products: enabled: true include_variants: true include_images: true categories_as_tags: true
# Filter products filter: status: active exclude_tags: ["hidden", "wholesale-only"]재고 추적
재고 수준 동기화 활성화:
sync: inventory: enabled: true low_stock_threshold: 10 out_of_stock_events: true이벤트
고객 이벤트
| 이벤트 | 트리거 | 사용 사례 |
|---|---|---|
customer_created | 새 고객 가입 | 웰컴 시리즈 |
customer_updated | 프로필 변경 | 데이터 동기화 |
customer_tags_added | 태그 할당 | 세그먼트 업데이트 |
주문 이벤트
| 이벤트 | 트리거 | 사용 사례 |
|---|---|---|
order_placed | 결제 완료 | 주문 확인 |
order_fulfilled | 주문 배송 | 배송 알림 |
order_cancelled | 주문 취소 | 취소 이메일 |
order_refunded | 환불 처리 | 환불 확인 |
장바구니 이벤트
| 이벤트 | 트리거 | 사용 사례 |
|---|---|---|
cart_created | 장바구니에 항목 추가 | 브라우징 추적 |
cart_updated | 장바구니 수정 | 장바구니 금액 추적 |
cart_abandoned | 30분 내 결제 없음 | 복구 이메일 |
활성화되는 스킬
Shopify 커넥터는 다음 스킬을 활성화합니다.
| 스킬 | 설명 |
|---|---|
| Customer Sync | 실시간 고객 동기화 |
| Order Events | 주문 라이프사이클 추적 |
| Abandoned Cart | 장바구니 복구 이메일 |
| Welcome Series | 신규 고객 온보딩 |
| Post-Purchase | 주문 후속 조치 |
| Win-Back | 비활성 고객 재참여 |
| Browse Abandonment | 제품 관심도 후속 조치 |
| Replenishment | 재주문 리마인더 |
코드 예제
커넥터 초기화
import { TajoClient } from '@tajo/sdk';
const tajo = new TajoClient({ apiKey: process.env.TAJO_API_KEY, brevoApiKey: process.env.BREVO_API_KEY});
// Connect Shopify storeawait tajo.connectors.connect('shopify', { shopUrl: 'your-store.myshopify.com', apiKey: process.env.SHOPIFY_API_KEY, apiSecret: process.env.SHOPIFY_API_SECRET});초기 동기화 실행
// Full historical syncawait tajo.connectors.sync('shopify', { type: 'full', resources: ['customers', 'orders', 'products'], since: '2023-01-01'});
// Check sync statusconst status = await tajo.connectors.status('shopify');console.log(status);// {// connected: true,// lastSync: '2024-01-15T10:30:00Z',// customersCount: 15420,// ordersCount: 8234,// productsCount: 342// }장바구니 이벤트 추적
Shopify 테마에 Tajo 스크립트를 추가하세요.
<!-- Add to theme.liquid before </head> -->{% if customer %}<script> window.tajoConfig = { customerId: "{{ customer.id }}", customerEmail: "{{ customer.email }}", customerName: "{{ customer.first_name }}" };</script>{% endif %}<script src="https://cdn.tajo.io/shopify.js"></script>커스텀 웹훅 핸들러
// Handle Shopify webhooks manuallyapp.post('/webhooks/shopify', async (req, res) => { const hmac = req.get('X-Shopify-Hmac-SHA256');
// Verify webhook signature if (!verifyShopifyWebhook(req.body, hmac)) { return res.status(401).send('Unauthorized'); }
const topic = req.get('X-Shopify-Topic');
// Forward to Tajo await tajo.connectors.handleWebhook('shopify', { topic, payload: req.body });
res.status(200).send('OK');});모니터링
대시보드 지표
Tajo 대시보드에서 Shopify 연결을 모니터링할 수 있습니다.
- 동기화 상태: 실시간 연결 상태
- 동기화된 고객: Shopify에서 가져온 총 연락처 수
- 추적된 주문: 처리된 주문 이벤트
- 장바구니 복구: 이탈 장바구니 성과
- 오류율: 실패한 동기화 시도
웹훅 로그
웹훅 전송 상태 확인:
tajo connectors logs shopify --type webhook --last 24h동기화 이력
과거 동기화 작업 확인:
tajo connectors history shopify --limit 10문제 해결
일반적인 문제
API 요청 제한
Shopify는 초당 2회 요청이라는 API 요청 제한이 있습니다. 대규모 과거 데이터 가져오기에는 배치 동기화를 사용하세요.
| 문제 | 원인 | 해결 방법 |
|---|---|---|
| 웹훅 수신 안 됨 | 앱 권한 | 올바른 스코프로 앱을 재설치하세요 |
| 고객이 동기화되지 않음 | 이메일 누락 | Shopify는 고객에게 이메일을 요구합니다 |
| 제품 누락 | 제품 상태 | 제품이 “active” 상태인지 확인하세요 |
| 장바구니가 추적되지 않음 | 스크립트 미로드 | theme.liquid에서 스크립트를 확인하세요 |
디버그 모드
상세 로깅 활성화:
connectors: shopify: debug: true log_level: verbose log_webhooks: true연결 테스트
tajo connectors test shopify# ✓ API connection successful# ✓ Webhooks registered# ✓ Products accessible# ✓ Customers readable# ✓ Orders readable모범 사례
- 테스트 스토어부터 시작 - 먼저 개발 스토어를 사용하세요
- 초기 동기화는 비업무 시간에 실행 - 대규모 동기화는 느릴 수 있습니다
- 커스텀 속성 매핑 - 기본 매핑에만 의존하지 마세요
- 장바구니 추적 활성화 - 장바구니 이탈 복구에 필수적입니다
- 웹훅 상태 모니터링 - 전송 실패에 대한 알림을 설정하세요
- 배치 가져오기 사용 - 10,000건 이상의 과거 데이터용
보안
- OAuth 2.0 - 안전한 토큰 기반 인증
- 웹훅 검증 - HMAC 서명 검증
- 암호화된 저장소 - API 자격 증명은 저장 시 암호화됩니다
- 스코프 액세스 - 최소 필요 권한만 부여