# Build a CRM from Scratch

Welcome to the "Build a CRM from Scratch" tutorial!

Here we walk you step by step through building a simple CRM system with the Muyan low-code platform: customer management, sales opportunities, interaction records and tasks.

TIP

CRM stands for Customer Relationship Management. In everyday usage, CRM usually refers to CRM software. A CRM is a customer-centric software system dedicated to managing customer relationships. It makes every interaction with customers across sales, marketing and service smooth and efficient, which in turn improves business performance.

# Before You Start

This tutorial was carried out and screenshotted on platform backend 1.0.0-beta18. Before you start, prepare:

  • A platform development environment you can log in to, with an account that has the administrator role (ROLE_ADMIN).
  • The ability to put CSV files into that environment's seed data directory and to restart the backend service.

Platform 1.0 changed how modeling and permissions work, so this tutorial splits the work into two kinds of operations:

Operation Where Why
Define domain models, fields, and the create/read/update/delete permissions of a model Seed data CSV The Development > Classes page can only view and modify models, not create them; the model permission fields are not available in the UI either
Create forms, menus and form fields, bind object actions UI These can be done in the UI; every step also shows the equivalent CSV so you can later move it into a plugin
Access permissions of forms Seed data CSV The form and menu screens have no access permission field

# Where CSV Files Go and How They Take Effect

When the platform starts, it imports all CSV files in the csv subdirectory of the seed data directory (seedData.folder in application.yml, which can be overridden with the environment variable SEED_DATA_FOLDER). In the docker compose development project provided with the platform, for example, the backend container's SEED_DATA_FOLDER is /app/plugin/data, and the project's codes/data/csv directory is mounted to /app/plugin/data/csv in the container.

So every time you change a CSV file in this tutorial, you:

  1. Save the CSV file to the codes/data/csv directory (all file names in this tutorial end with _crm.csv, for example DomainClass_crm.csv).
  2. Restart the backend service, for example with docker compose restart server, and wait until the service is healthy again.
  3. Check the import result in Exec History > Import. The list has no file name column; find the latest record by the Domain class column (for example Domain Class, Dynamic Form) and the Start date column. Its status should be Success. If it failed, look at the Failed lines and Logs columns of the same row for the reason.

CSV files whose content has not changed are skipped on restart; only modified files are imported again. For the CSV format and import rules, see Data Import.

# Steps

  1. Customer Object Modeling

    • Define the customer model, its fields and its create/read/update/delete permissions with CSV.
  2. Create Maintenance Forms for the Customer Model

    • Create the customer list, create and edit forms and a menu in the UI.
  3. Sales Opportunity Modeling and Forms

    • Model sales opportunities and their related interaction records and tasks, and maintain them in sub-tables.
  4. Object Delete Permission

    • Grant the delete permission and bind the batch delete action to the lists.
  5. Form Field Display Optimization

    • Set Chinese labels and display controls for form fields.

# Appendix

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