CRM-142: 전체 티켓
원본 다운로드 ↓CRM-142: CSV에서 연락처 가져오기
예시 Jira 티켓 · AgentBay 실습 안내 · 가상 CRM 및 연락처
이유
고객 성공 팀은 고객에게서 스프레드시트로 연락처 목록을 받습니다. 지금은 연락처를 하나씩 수동 입력합니다. CSV를 올려 추가될 내용을 확인하고 가져오기 전에 문제를 수정할 수 있게 하세요.
기능
추가할 항목: Import contacts 기존 Contacts 페이지에 추가합니다. 파일에는 name, email, company 열이 있습니다. 비어 있지 않은 모든 데이터 레코드를 Ready, Invalid 또는 Duplicate 결과와 함께 미리 보여주세요. 저장 전에 개수를 표시하세요. 준비된 행을 가져오거나 취소해 기존 연락처를 변경 없이 유지할 수 있게 하세요. 목록으로 돌아와 추가한 연락처와 건너뛴 연락처 수를 알리세요.
인수 기준
- 기존 연락처 검색과 Add contact가 계속 작동해야 합니다. 가져온 연락처는 같은 목록에 표시되며 이 브라우저에서 새로고침한 후에도 유지되어야 합니다.
- 필수 열은 name과 email이며 Company는 선택 사항입니다. 앞뒤 공백을 제거하고 UTF-8 BOM과 CRLF를 허용하세요. 중복 헤더 이름, 필수 헤더 누락, 행의 초과 열 또는 닫히지 않은 따옴표는 아무것도 저장하지 않고 거부하세요.
- 따옴표 안 쉼표, 이스케이프된 큰따옴표 및 따옴표 필드 내 줄바꿈을 처리하세요. 빈 레코드는 무시합니다. 외부 CSV 의존성은 사용하지 않습니다.
- Name은 비어 있으면 안 되며 email은 그럴듯한 local@domain.tld 형식이어야 합니다. 이는 형식 검증이며 이메일 전송 가능 여부를 확인하는 것이 아닙니다.
- 대소문자와 앞뒤 공백을 무시하고 현재 연락처 및 파일의 앞선 유효한 행과 비교해 중복 이메일을 감지하세요. 첫 번째 유효한 항목이 우선합니다. 잘못된 행은 이메일을 예약하면 안 됩니다. 기존 연락처를 덮어쓰지 마세요.
- 미리보기는 저장소에 쓰지 않습니다. 확인은 Ready 행만 한 번 가져옵니다. 더블 클릭해도 중복이 추가되면 안 됩니다. 확인 시 현재 연락처를 기준으로 다시 검증하세요. Ready 행이 0개면 확인을 비활성화하세요.
- 로컬 저장이 실패하면 미리보기를 유지하고 재시도할 수 있게 하세요. 취소, 잘못된 파일 및 재시도로 연락처가 삭제되면 안 됩니다. 저장이 성공하기 전에는 성공을 알리지 마세요.
- 레이블이 있는 컨트롤, 키보드로 조작 가능한 검토/취소/확인, 보이는 포커스, 실시간 상태 메시지 및 320px와 데스크톱에서 읽기 쉬운 레이아웃을 사용하세요. HTML처럼 보이는 입력을 포함해 CSV 셀을 텍스트로 표시하세요.
이 로컬 실습의 범위
일반 HTML/JS를 사용하는 클라이언트 측 CRM입니다. 기존 저장 어댑터는 네임스페이스가 있는 localStorage 키 하나를 사용합니다. 로그인, 서버 데이터베이스, 필드 매핑 도우미, 원격 업로드, 실제 CRM 계정 또는 백그라운드 작업은 없습니다. 입력을 100 KB와 데이터 레코드 500개로 제한하고 업로드 전에 제한을 알리세요. 복구를 실습할 수 있도록 레이블이 있는 데모 컨트롤 Fail next save 을 제공하세요. 이는 재현 가능한 실습을 위한 저자의 고정된 선택이며 이해관계자 인터뷰 결과가 아닙니다.
원본 파일 및 출처 세부 정보
ticket.md · SHA-256 629d78776ddefe8a9c2f325d57f3a1310cded181692a3244ed5cc3543c4d67b0
# CRM-142 — Import contacts from CSV
Sample Jira ticket · AgentBay walkthrough · fictional CRM and contacts
## Why
Our customer-success team gets contact lists from customers in spreadsheets. Today they add every contact by hand. Let them upload a CSV, see what will be added and fix problems before importing.
## Feature
Add **Import contacts** to the existing Contacts page. The file has name, email and company columns. Preview every nonblank data record with an outcome: Ready, Invalid or Duplicate. Show counts before anything is saved. Let the user import ready rows, or cancel and keep their existing contacts unchanged. Return to the list and say how many contacts were added and skipped.
## Acceptance criteria
1. Existing contact search and Add contact still work. Imported contacts appear in that same list and survive reload in this browser.
2. Required columns: name and email. Company is optional. Trim surrounding whitespace; tolerate UTF-8 BOM and CRLF. Reject duplicate header names, missing required headers, extra columns in a row or unclosed quotes without saving anything.
3. Handle quoted commas, escaped double quotes and newlines within a quoted field. Blank records are ignored. No third-party CSV dependency.
4. Name must not be empty and email must have a plausible local@domain.tld shape. This is format validation, not email-delivery verification.
5. Detect duplicate emails, ignoring case and surrounding whitespace, against both current contacts and earlier valid rows in the file. The first valid occurrence wins. An invalid row must not reserve an email. Never overwrite an existing contact.
6. Preview does not write storage. Confirm imports only Ready rows, once. Double-clicking must not add duplicates. Revalidate against current contacts on confirmation. Zero Ready rows disables confirmation.
7. A failed local save keeps the preview and lets the user retry. Cancel, malformed files and retry must not delete contacts. Do not report success until storage succeeds.
8. Use labelled controls, keyboard-operable review/cancel/confirm, visible focus, a live status message and readable layout at 320px and desktop. Render CSV cells as text, including HTML-looking input.
## Scope for this local exercise
Client-side CRM in plain HTML/JS. Existing storage adapter uses one namespaced localStorage key. No login, server database, field-mapping wizard, remote uploads, live CRM account or background jobs. Limit input to 100 KB and 500 data records; report those limits before upload. Provide a labelled **Fail next save** demo control to exercise recovery. These are fixed author decisions for a reproducible exercise, not stakeholder interviews.