---
title: "CRM"
description: "Leads and pipeline. Keep track of prospective deals from first contact to won or lost."
canonical: "https://obop.dev/apps/crm/"
lang: "en"
---

# CRM

## What it is for

Keep track of prospective deals from first contact to won or lost. A lead has a title, a contact, an expected revenue and a stage, and moving it along the pipeline is a named action that the team and its agents can both run.

## What the package does and does not do

Leads and the sales pipeline.

## Models

### `lead`

A prospective deal with a contact

Read group: `crm.user`. Write group: `crm.user`.

| Field | Kind | Data class | Personal data | Group | Agents see | Description |
|---|---|---|---|---|---|---|
| `title` | text | `none` | no | `crm.user` | in clear | Short description of the opportunity |
| `contact_name` | text | `public_directory` | yes | `crm.user` | masked | Name of the contact person |
| `contact_email` | text | `public_directory` | yes | `crm.user` | masked | Email of the contact person |
| `expected_revenue_minor` | money | `none` | no | `crm.user` | in clear | Expected revenue in minor units |
| `stage` | select (new, qualified, won, lost) | `none` | no | `crm.user` | in clear | Pipeline stage: new, qualified, won or lost |

## Workflows

### `lead`

| Action | Moves | Who may run it | Approval |
|---|---|---|---|
| `lead.qualify` | stage: new → qualified | `crm.user` | no |
| `lead.mark_won` | stage: * → won | `crm.user` | no |
| `lead.mark_lost` | stage: * → lost | `crm.user` | no |
| `lead.reopen` | stage: * → new | `crm.user` | no |

## Permission groups

Groups used by this app:

- `crm.user`

## Approval steps

No step in this app needs an approval, apart from deleting records.

## What agents can and cannot do

An agent can read, search, create and update records of this app, and run the actions that need no approval, within the permission groups of its token.

It can only propose these steps, and a person must approve them: `lead.delete`.

Personal data is masked as placeholder tokens: `lead.contact_name`, `lead.contact_email`.

## Dependencies

- `base`

## Install

Built in. It is available in every instance and cannot be removed.

## Build your own

[The module guide shows how apps like this one are written](/docs/reference/module-manifest/)
