Tutorials

Tutorial: build a small CRM

In this tutorial you build a customer relationship manager with companies, contacts and deals, a sales pipeline, a lead form and a revenue dashboard. Time: about 30 minutes. No code needed.

Step 1 – Create the database

  1. Sidebar → + New → Database, name it CRM.
  2. Rename the first table to Companies.
  3. Set up its fields:
Field Type Options
Name Single line text primary field
Website URL
Industry Single select Software, Retail, Health, Logistics
Country Single select United States, Germany, Netherlands

Add three or four companies.

Step 2 – Contacts and deals

Create a Contacts table:

Field Type
Name Single line text
Email Email
Phone Phone number
Company Link to table → Companies

Create a Deals table:

Field Type Options
Title Single line text
Company Link to table → Companies
Contact Link to table → Contacts
Stage Single select Lead, Qualified, Proposal, Won, Lost
Amount Number 2 decimals, prefix €
Expected close Date
Owner Collaborator

Notice that Companies now has Contacts and Deals fields automatically: link fields always work in both directions.

Step 3 – Computed fields

In Companies add:

  • Open pipeline – Rollup of Deals → Amount with sum, or a formula: sum(filter(lookup('Deals', 'Amount'), lookup('Deals', 'Stage') != 'Won')).
  • Deals count – a Count field on Deals.

In Deals add a formula field Days to close:

date_diff('dd', today(), field('Expected close'))

Step 4 – A pipeline board

  1. In Deals create a Kanban view named Pipeline, stacked by Stage.
  2. Show Company, Amount and Owner on the cards.
  3. Drag cards between columns as deals progress.

Add a Grid view My open deals with the filters Owner is me and Stage is not Won and Stage is not Lost, sorted by Expected close.

Step 5 – A lead form

  1. In Deals create a Form view Request a quote.
  2. Add Title, Company and Amount and write friendly labels.
  3. Set Stage to be pre-filled with Lead using a hidden field (?prefill_Stage=Lead&hide_Stage).
  4. Share view and put the link on your website.

Step 6 – A revenue dashboard

  1. + New → Dashboard named Sales.
  2. Add a Summary widget: Deals, Amount, sum, using a view filtered on Stage = Won.
  3. Add a Chart widget: Deals, series sum of Amount, grouped by Stage.

Step 7 – Notify the team

  1. + New → Automation named CRM alerts.
  2. Trigger: Rows are updated in Deals.
  3. Add a Router with the condition Stage is Won.
  4. In that branch add Send an email (or a Slack message) with the subject Deal won: + the deal title and the amount in the body.
  5. Test run, then Publish.

Where to go next