# CRM System Design Document
# Product or Project Overview
This CRM system is designed to help enterprises manage customer relationships, track sales opportunities and improve customer satisfaction. The system covers core functions such as customer information management, sales opportunity tracking, interaction records, and reporting and analysis, and provides a clean, easy-to-use and secure user interface.
# Requirements Overview
Before diving into the design, we first need a comprehensive overview of the project's requirements. This includes understanding the project's background, goals, expected outcomes, and the expectations of key stakeholders. The requirements overview is the foundation of project success and helps the team focus on core goals and priorities.
- Background: The enterprise needs an efficient tool to manage customer relationships and the sales process.
- Goals: Implement customer information management, sales opportunity tracking, interaction records, reporting and analysis, to improve customer satisfaction and sales performance.
- Expected outcomes: Higher efficiency of the sales team, better customer service quality, and a higher conversion rate of sales opportunities.
- Key stakeholders: Sales team, customer service team, management.
# Business Model Design
Business model design is the foundation of information system design. It covers defining database tables, their fields, and the relationships between tables. In short, this step determines the system's data structure and how data is stored.
# Database Table Design
| Model Name | Description |
|---|---|
| Customers | Customer information, including name, contact info, company name, position, etc. |
| SalesOpportunities | Sales opportunity information, including name, stage, expected amount, expected close date, etc. |
| InteractionRecords | Interaction record information, including interaction type, interaction date, notes, etc. |
| Tasks | Task information, including description, due date, status, etc. |
# Customers Table (Customers)
| Field Name | Type | Nullable | Default | Options | Remarks |
|---|---|---|---|---|---|
| name | STRING | No | None | None | Customer name |
| contactInfo | STRING | No | None | None | Contact info |
| companyName | STRING | Yes | None | None | Company name |
| position | STRING | Yes | None | None | Position |
| group | STRING | Yes | None | See below | Customer group |
| birthday | LOCAL_DATE | Yes | None | None | Customer birthday |
# Interaction Records Table (InteractionRecords)
| Field Name | Type | Nullable | Default | Options | Remarks | Reference Type |
|---|---|---|---|---|---|---|
| name | STRING | No | None | None | Interaction subject | None |
| interactionType | STRING | No | None | See below | Interaction type | None |
| interactionDate | LOCAL_DATE | No | None | None | Interaction date | None |
| notes | STRING | Yes | None | None | Notes | None |
# Tasks Table (Tasks)
| Field Name | Type | Nullable | Default | Options | Remarks | Reference Type |
|---|---|---|---|---|---|---|
| name | STRING | No | None | None | Task name | None |
| description | STRING | No | None | None | Task description | None |
| dueDate | LOCAL_DATE | No | None | None | Due date | None |
| status | STRING | No | None | See below | Task status | None |
# Sales Opportunities Table (SalesOpportunities)
| Field Name | Type | Nullable | Default | Options | Remarks | Reference Type |
|---|---|---|---|---|---|---|
| name | STRING | No | None | None | Opportunity name | None |
| customer | DOMAIN_OBJECT | No | None | None | Related customer | Customers |
| stage | STRING | No | None | See below | Opportunity stage | None |
| expectedAmount | BIG_DECIMAL | No | None | None | Expected amount | None |
| expectedCloseDate | LOCAL_DATE | No | None | None | Expected close date | None |
| interactionRecords | DOMAIN_OBJECT_LIST | Yes | None | None | Interaction records | InteractionRecords |
| tasks | DOMAIN_OBJECT_LIST | Yes | None | None | Tasks | Tasks |
# Enum Fields and Their Values
The table below lists the enum fields in the model design above and their possible values. In the tutorial, a field's options stores only the Chinese option values; the English in parentheses is for explanation only.
| Model Name | Enum Field | Option Value | Explanation |
|---|---|---|---|
| Customers form (Customers) | group (customer group) | VIP | Very important customer |
| ๆฎ้ๅฎขๆท | Regular customer | ||
| ๆฝๅจๅฎขๆท | Prospect who may become a customer | ||
| ้่ฆๅฎขๆท | Customer that is very important to the business | ||
| ้ปๅๅ | Customer we no longer work with | ||
| Sales opportunities form (SalesOpportunities) | stage (opportunity stage) | ๅๆญฅๆฅ่งฆ (Initial Contact) | First contact with the customer to learn basic needs |
| ้ๆฑๅๆ (Needs Analysis) | Analyze customer needs and determine the solution | ||
| ๆนๆก่ฎพ่ฎก (Proposal Design) | Design a concrete proposal for the customer | ||
| ๆๆ (Bidding) | Submit bid documents and compete for the deal | ||
| ่ฐๅค (Negotiation) | Negotiate with the customer to reach an agreement | ||
| ๆไบค (Closed Won) | The opportunity succeeded and a deal was closed | ||
| ๅคฑๆ (Closed Lost) | The opportunity failed and no deal was closed | ||
| Interaction records form (InteractionRecords) | interactionType (interaction type) | ็ต่ฏ (Phone Call) | Interact with the customer by phone |
| ไผ่ฎฎ (Meeting) | Face-to-face meeting with the customer | ||
| ้ฎไปถ (Email) | Interact with the customer by email | ||
| ็ฐๅบๆ่ฎฟ (On-site Visit) | Visit the customer in person | ||
| ่ง้ขไผ่ฎฎ (Video Conference) | Interact with the customer by video conference | ||
| ๅ ถไป (Other) | Other types of interaction | ||
| Tasks form (Tasks) | status (task status) | ๅพ ๅค็ (Pending) | The task has not been started |
| ่ฟ่กไธญ (In Progress) | The task is in progress | ||
| ๅทฒๅฎๆ (Completed) | The task has been completed | ||
| ๅทฒๅๆถ (Cancelled) | The task has been cancelled |
# Form Design
Form design covers list, create and edit operations, and takes into account CRUD operations, field default values, special validations, field linkage, dynamic show/hide, field grouping, and user permissions on forms. The multi-step forms (Wizard) available before 1.0 were removed in 1.0.
The form design of this system is summarized as follows:
- Customers and SalesOpportunities have their own list, create and edit forms.
- Tasks and InteractionRecords are managed as sub-tables in the SalesOpportunities forms.
# Dashboard Design
Version 1 has no dashboard design.
# Dynamic Action Design
For each type of object, design the corresponding business actions, including the action logic, the target user group, and the enabling conditions.
# Customer Actions
- Merge customers: Merge duplicate customer information
- Batch import customers: Batch import customer information from a CSV file (the platform currently provides no data export; in 1.0.0-beta18, importing data into a dynamic model fails, see Data Import)
- Send email: Send emails to selected customers in batch
# Sales Opportunity Actions
- Change stage: Update the stage of a sales opportunity
- Generate report: Generate a detailed report of a sales opportunity
# Object Lifecycle Design
Plan in detail the logic of each object during create, read, update and delete (CRUD), including necessary validations, integrations and additional business logic.
# Core Process Design
Design the approval and business processes required in the object lifecycle, and make sure the processes are smooth and reasonable.
TIP
The platform has no built-in approval workflow engine. The process below is a business design and is not implemented in this tutorial. When needed, you can implement stage transitions with object actions (for example "Submit for approval" and "Approve" actions) combined with validation logic in object hooks.
# Sales Opportunity Approval Process
- New opportunity: A salesperson enters a new sales opportunity
- Manager approval: The sales manager reviews and approves it
- Task assignment: Related tasks are assigned to salespeople
- Follow-up: Salespeople follow up on the opportunity and update its progress
- Close: The opportunity is closed as won or lost
# Inter-System Integration Design
No inter-system integration design for now.
# Scheduled Task Design
Design the necessary scheduled tasks according to business needs, including one-time and recurring tasks.
# Scheduled Tasks
- Customer birthday reminder: Check every day whether any customer has a birthday today, and send a reminder
# Report and Document Printing Design
No report or document printing design for now.