---
task_id: task-2359
type: checklist
scope: task
created: 2026-05-02
updated: 2026-05-02
status: completed
---

# 체크리스트: task-2359 — Phase 3 CRM 자동 연동

**task**: task-2359

---

## 백엔드 (스바로그)

- [x] `server/customer_match.py` — `upsert_customer_for_capture()` helper 신설
- [x] POST `/api/insuro/ohmy-capture` 응답 확장 (match_candidate / auto_linked_customer)
- [x] duplicate 분기 auto-link 동일 적용 (마아트 권고 1)
- [x] POST `/api/insuro/ohmy-capture/{capture_id}/link` 신규
- [x] POST `/api/insuro/ohmy-capture-history/{capture_id}/reassign` 신규
- [x] GET `/api/insuro/customers/{customer_id}/ohmy-history` 신규
- [x] GET `/api/insuro/ohmy-capture-history` 응답에 customer_id 노출

## 프론트엔드 컴포넌트 (라다 / 이리스)

- [x] `src/components/composite/CustomerMatchDialog.tsx` (150줄)
- [x] `src/components/composite/HistoryReassignDialog.tsx` (273줄)
- [x] `HistoryGroupCard.tsx` OhmyCaptureItem.customer_id 동기화

## 페이지 통합 (라다 / 이리스)

- [x] `src/pages/CompositeDesign.tsx` — CustomerMatchDialog 자동 검출 + 1회 표시 보장
- [x] handleConfirmMatch / handleConfirmNew → POST /link → fetchCaptureHistory refresh
- [x] `src/pages/CrmCustomers.tsx` — 각 row "ohmy history" 버튼 + Dialog
- [x] history 항목 "분석 페이지로 이동" + "다른 고객으로 이동"

## 테스트 (벨레스)

- [x] vitest CustomerMatchDialog 5건 PASS
- [x] vitest HistoryReassignDialog 6건 PASS
- [x] 기존 HistoryGroupCard 5건 회귀 없음 PASS
- [x] tsc --noEmit 0 에러
- [x] npm run build PASS

## 검증

- [x] py_compile (server/main.py, customer_match.py) PASS
- [x] Codex 사전 검증 PASS
- [x] 마아트 독립 검증 PASS(조건부) → 권고 1건 즉시 수정
- [ ] L1 staging 스모크 (4가지 시나리오) — 회장 검증 단계 진행
- [ ] Phase 3 → Phase 4 회장 승인 게이트
