This page lists the most common customisations and where each one is made. To change fields, options or tables, see Data model. Many adjustments can be made in the interface without touching code. When code does need to change, hand it to a coding agent: it follows the repository's AGENTS.md for the details and checks.
Rules before you change code
- Text goes through translation: every string in the interface lives in
client/locales/crm/.index.tsholds English and Chinese, and each of the other 10 languages has its own file; if one is missing, the type check fails. Text the AI writes (task names, stage names, plan titles, the built-in business guidance and so on) lives inserver/locales/crm-ai/texts/, one file for each of the 12 languages, and a test checks that every language is complete. See Localization. - Endpoints own their security: a new
/apiendpoint does its own sign-in and permission checks, is declared in the API document, and uses the shared error structure. See HTTP routes and APIs and Authentication, permissions and data scopes. - Tests go in
tests/: test each endpoint signed in, signed out, and without permission.
Add a page or report
Pages
- Create the page component in
client/pages/and export it as the default; see Pages, routes and navigation. When a page has child pages or helper files of its own, use a folder with anindex.tsx. - Declare the route in
client/routes.ts: its name, path,auth: 'required',authz: page('<name>'), a lazily loadedcomponentLoader, andnavigationfor the menu group it goes in. Settings pages are declared inclient/pages/settings/routes.ts. - When the page needs data from the server, add an endpoint in
server/routes/, register it inserver/routes/crm.ts, and add its path toserver/routes/crm-paths.tsso the sign-in check covers it. Put the business logic in a service inserver/providers/crm/, and read data throughCrmServiceas the current user, so record permissions apply. - Let the sales roles see the page: a page without a grant opens only for administrators. Add the page to
crmPagesinserver/providers/crm/resources.ts, and new installations grant it automatically. The permission sets of an existing system are not rewritten, so an administrator ticks it in System settings › Roles & permissions.
Reports
The existing reports are calculated in server/providers/crm/reports.ts, statistics.ts and dashboard.ts, returned through /api/dashboard, and drawn by client/components/crm/dashboard-reports.tsx. To add a report, add a calculation function there, include its result in the endpoint's response, add a chart card, and add its text.
Adjust approvals and permissions
What you can change in the interface
| What to change | Where |
|---|---|
| Who can approve | System settings › Approval process: set approvers by role or by named members; the default is sales managers. Each approval keeps the rules in force when it was created |
| Each person's roles | System settings › Users |
| What each role can do | System settings › Roles & permissions: viewing, creating, editing and deleting each kind of record, and the record scope; capabilities such as assigning, approving, exporting and sending WhatsApp; and page grants |
| When approval is needed | System settings › AI › Skills: change the approval standards in the two skills opportunity-follow-up and approval-review, and keep them the same. Opportunity follow-up uses them to decide which terms need approval, and Approval review uses them for its recommendation |
The approval standards are guidance for the Agents, not enforced rules: nothing in the code requires an approval before an opportunity moves on.
What needs code changes
- Approval statuses and transitions: in
server/lifecycles/approvals.ts. Version 1 of the process is frozen, because existing approvals refer to it. To change statuses, transitions or validation conditions, add a version 2 definition and have new approvals use it. - Approval topics: change the topic options in
schema.ts, the text inclient/locales/crm/, and each language's topic names (topicNames) inserver/locales/crm-ai/texts/. - The default sales permission sets: defined in
crmPermissionSetinresources.ts. The seed writes them once on first installation, and later starts never rewrite them. When you add an object or action, also add it to the options of the role settings page (client/pages/settings/permission-workspace.ts). - After changing permissions, run
pnpm exec vitest run tests/logic/authorization-assignment-safety.test.ts. Do not grant business permissions to every signed-in user, and do not broaden the built-in member role.
For more, see Roles and permissions and Approvals.
Change the Agents' skills and instructions
NocoCRM has seven Agents: the Sales Expert in conversations, and six background Agents: Lead follow-up, Opportunity follow-up, Approval review, Task preparation, Company signals and Form capture. They all run on the Agents plugin.
What you can change in the interface
| What to change | Where |
|---|---|
| The content of the method skills | System settings › AI › Skills; changes take effect at once |
| A background Agent's model, skills and instructions | AI › Agents: open the Agent and change them in Settings |
| When a background Agent runs automatically | Each Agent's switches in AI › Agents |
| Company introduction, product prices, follow-up pace | AI › Agents › Business guidance; conversations and background runs all follow it, except Company signals |
| The AI working language | System settings › General |
| Model services | System settings › AI › Model services |
A built-in skill you have changed is no longer updated when NocoCRM is upgraded. A skill you have not changed is updated to the new content when the new version starts.
What needs code changes
- The initial content of the built-in skills: in
ai/skills/<name>/SKILL.md, six in all. To add a skill, create a folder, add its name toMETHOD_SKILLSinserver/providers/crm-agents/skill.ts, and write the code that reads it. - The Sales Expert's system prompt: assembled in code and not editable in the interface. The base instructions are in
crm-agents/preset.ts, the conversation rules inrules.ts, and the methods for querying and proposing change plans inskill.ts. - How the background Agents work: the shared rules are in
crm-agents/background.ts. Each Agent's prompt is inserver/providers/crm/:lead-evaluation.ts,opportunity-evaluation.ts,approval-review.ts,task-preparation.ts,company-signals.tsandform-capture.ts. The parts specific to the new lead and new opportunity forms are inlead-capture.tsandopportunity-capture.ts.
Whatever you change, an Agent writes data only through a change plan, carried out after a person confirms it, and an Agent sees the same data as the current user.
For more, see Agents.