# 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:

  1. Customers and SalesOpportunities have their own list, create and edit forms.
  2. 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

  1. New opportunity: A salesperson enters a new sales opportunity
  2. Manager approval: The sales manager reviews and approves it
  3. Task assignment: Related tasks are assigned to salespeople
  4. Follow-up: Salespeople follow up on the opportunity and update its progress
  5. 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.

Last Updated: 9/24/2026, 2:27:35 PM