본 문서는 Support 도메인 요구사항(requirements.md)을 기반으로 Event Storming 방식으로 분석한 결과입니다.
Support 도메인은 앱 사용자를 대상으로 아웃바운드 콜을 통해 추적 관리하고, 상담 과정에서 발생하는 메모, 이슈 등을 관리하는 도메인 입니다.
1. 도메인 이벤트
Support 도메인에서 발생하는 모든 도메인 이벤트를 정의합니다.
1.1 아웃바운드 콜 관리 관련 이벤트
| Event | Description |
|---|
| OutboundCompleted | 아웃바운드 콜이 완료 처리되었다. |
| OutboundSkipped | 아웃바운드 콜이 스킵 처리되었다. |
| OutboundWithdrawn | 완료 또는 스킵된 콜이 철회되었다. |
| OutboundContactScheduleRecorded | 아웃바운드 콜 예정일이 기록 되었다. |
| OutboundContactScheduleCanceled | 아웃바운드 콜 예정일이 기록 취소 되었다. |
| LastSurveyCompleted | 42일차 설문이 완료되어 Support 도메인으로 통보되었다. (외부 도메인 이벤트 구독) |
| LastOutboundAutoCompleted | 마지막(42일차) 콜이 자동으로 완료 처리되었다. |
1.2 앱 사용자 메모/이슈 관련 이벤트
| Event | Description |
|---|
| UserSupportMemoCreated | 앱 사용자에 대한 메모가 생성되었다. |
| UserSupportMemoMessageUpdated | 앱 사용자에 대한 메모가 수정되었다. (24시간 내 본인 작성 메모만) |
| SupportLogHistoryRecorded | 로그 기록이 변경되었다. |
| UserSupportIssueCreated | 앱 사용자 이슈가 생성되었다. |
| UserSupportIssueMessageUpdated | 앱 사용자 이슈가 수정되었다. (24시간 내 본인 작성 이슈만) |
| UserSupportIssueStatusChanged | 앱 사용자 이슈 상태(활성/해결됨)가 변경되었다. |
1.3 앱 사용자 관리 관련 이벤트
| Event | Description |
|---|
| UserSiteUpdated | 앱 사용자의 처방 병원 정보가 수정되었다. |
1.4 메시지 관련 이벤트
| Event | Description |
|---|
| TemplateMessageSent | 정해진 템플릿 메시지가 앱 사용자에게 발송되었다. |
| FreeTextMessageSent | 임의 텍스트 메시지가 앱 사용자에게 발송되었다. |
| LastSurveyReminderMessageSent | 마지막 설문 독촉 메시지가 앱 사용자에게 발송되었다. |
| MissedCallMessageSent | 전화를 받지 않은 앱 사용자에게 부재중 메시지가 발송되었다. |
| MissedCallMessageFailed | 부재중 메시지 발송이 실패했다. |
2. 정책 (When → Then)
이벤트 발생 후 시스템이 수행해야 할 정책을 정의합니다.
2.1 아웃바운드 콜 정책
| When | Then | 설명 |
|---|
| OutboundCompleted | RecordSupportLogCommand | 아웃바운드가 완료되면 로그 이력 기록 |
| OutboundSkipped | RecordSupportLogCommand | 아웃바운드가 스킵되면 로그 이력 기록 |
| OutboundWithdrawn | RecordSupportLogCommand | 아웃바운드가 철회되면 로그 이력 기록 |
| OutboundContactScheduleRecorded | RecordSupportLogCommand | 아웃바운드 연락 일정이 기록되면 로그 이력 기록 |
| OutboundWithdrawn | OutboundContactScheduleCanceled | 아웃바운드가 철회되면 연락 일정 예약 취소 |
| LastSurveyCompleted 수신 | LastOutboundCompleted | 42일차 설문 완료 시 마지막 콜 자동 완료 처리 |
2.2 메모/이슈 정책
| When | Then | 설명 |
|---|
| UserSupportMemoCreated | RecordSupportLogCommand | 메모가 생성되면 로그 이력 기록 |
| UserSupportMemoMessageUpdated | RecordSupportLogCommand | 메모가 메시지가 변경되면 로그 이력 기록 |
| UserSupportIssueCreated | RecordSupportLogCommand | 이슈가 생성되면 로그 이력 기록 |
| UserSupportIssueMessageUpdated | RecordSupportLogCommand | 이슈 메시지가 변경되면 로그 이력 기록 |
| UserSupportIssueStatusChanged | RecordSupportLogCommand | 이슈 상태가 변경되면 로그 이력 기록 |
| UserSiteUpdated | RecordSupportLogCommand | 회원 site가 변경되면 로그 이력 기록 |
2.3 메시지 정책
| When | Then | 설명 |
|---|
| MissedCallMessageSent | RecordSupportLogCommand | 부재중 메시지 발송 시 로그 이력 기록 |
| MissedCallMessageFailed | RecordSupportLogCommand | 부재중 메시지 발송 실패 시 로그 기록 |
3. 액터와 명령
각 액터가 수행할 수 있는 명령과 결과 이벤트를 정의합니다.
3.1 아웃바운드 콜 관리 명령
| Command | Actor | Event |
|---|
| CompleteOutboundPlanCommand | OperationUser | OutboundCompleted |
| SkipOutboundPlanCommand | OperationUser | OutboundSkipped |
| WithdrawOutboundPlanCommand | OperationUser | OutboundWithdrawn |
| CompleteLastOutbound | System (Event Receiver) | LastOutboundAutoCompleted |
3.2 메모/이슈 관리 명령
| Command | Actor | Event |
|---|
| CreateSupportMemoCommand | OperationUser | UserSupportMemoCreated |
| UpdateSupportMemoMessageCommand | OperationUser | UserSupportMemoMessageUpdated |
| CreateSupportIssueCommand | OperationUser | UserSupportIssueCreated |
| UpdateSupportIssueMessageCommand | OperationUser | UserSupportIssueMessageUpdated |
| ChangeUserSupportIssueStatus | OperationUser | UserSupportIssueStatusChanged |
3.3 메시지 송출 명령
| Command | Actor | Event |
|---|
| SendTemplateMessage | OperationUser | TemplateMessageSent |
| SendFreeTextMessage | OperationUser | FreeTextMessageSent |
| SendMissedCallMessage | OperationUser | MissedCallMessageSent / MissedCallMessageFailed |
3.4 사용자 관리 명령
| Command | Actor | Event |
|---|
| UpdateUserSite | OperationUser | UserSiteUpdated |
4. Aggregate 매핑
각 명령과 이벤트가 어느 Aggregate에서 처리되는지 정의합니다.
4.1 아웃바운드 콜 관리 Aggregate
| Command | Aggregate | 설명 |
|---|
| CompleteOutbound | UserOutboundCallPlan | 콜 완료 처리 및 상태 변경 |
| SkipOutbound | UserOutboundCallPlan | 콜 스킵 처리 및 상태 변경 |
| WithdrawOutboundCallResult | UserOutboundCallPlan | 콜 철회 처리 및 상태 복원 |
| SetOutboundCallSchedule | UserOutboundCallPlan | 콜 예정일 설정 및 이력 관리 |
| CompleteLastOutbound | UserOutboundCallPlan | 외부 설문 완료 이벤트 수신 후 마지막 콜 자동 처리 |
4.2 메모/이슈 관리 Aggregate
| Command | Aggregate | 설명 |
|---|
| CreateSupportMemoCommand | SupportMemo | 앱 사용자별 메모 생성/조회/수정 |
| UpdateSupportMemoMessageCommand | SupportMemo | 앱 사용자별 메모 생성/조회/수정 |
| CreateSupportIssueCommand | SupportIssue | 앱 사용자별 이슈 생성/조회/수정/상태 관리 |
| UpdateSupportIssueMessageCommand | SupportIssue | 앱 사용자별 이슈 생성/조회/수정/상태 관리 |
| ChangeUserSupportIssueStatus | SupportIssue | 앱 사용자별 이슈 생성/조회/수정/상태 관리 |
4.3 메시지 송출 Aggregate
| Command | Aggregate | 설명 |
|---|
| SendTemplateMessage | UserSupportMessage | 템플릿 메시지 및 자유 텍스트 메시지 송출 기록 |
| SendFreeTextMessage | UserSupportMessage | 템플릿 메시지 및 자유 텍스트 메시지 송출 기록 |
| SendMissedCallMessage | UserSupportMessage | 부재중 메시지 송출 요청 및 결과 기록 |
4.4 사용자 관리 Aggregate
| Command | Aggregate | 설명 |
|---|
| UpdateUserSite | UserSupport | 앱 사용자의 처방 병원 정보 관리 |
변경 이력