# Customers and companies

How dimmi creates and matches customer and company profiles, merges duplicates, and handles notes and blocked accounts.

Open **Customers** in the sidebar to see every customer (`contact` in the API) and company your team supports.

## Where records come from

| Source | Customer | Company |
| --- | --- | --- |
| **First message on any channel** | Creates a lead. | |
| **[Identity token](/developers/messenger/identity-verification/)** | Creates a signed-in user, or upgrades the chatting lead into one. | Finds or creates the company named in the token. |
| **REST API or [CSV import](/customers/import/)** | Finds or creates the customer. | Finds or creates the company. |
| **New contact / New company** | Creates a customer manually. | Creates a company manually. |

## How dimmi matches returning customers

When new data arrives, dimmi checks two fields in order:

1. **External ID:** the unique ID your app uses for that customer.
2. **Verified email:** matched only on records that do not have an external ID yet.

A lead who only typed an email address in chat never auto-matches an existing record, because anyone can type someone else's email. Instead, dimmi flags them as a possible duplicate.

Companies match by external ID first, then by domain (`WWW.Acme.dev` and `acme.dev` match as one company).

## Merge duplicates

Open the row menu on the customer you want to keep and click **Merge…**. dimmi suggests up to 20 likely matches with the same email, phone number, or name and company.

- **History moves over:** all conversations, identities, tags, and event counts transfer to the kept customer.
- **Kept profile wins:** existing fields on the kept customer stay untouched; the merged record only fills blank fields and missing attributes.
- **Old links redirect:** opening the merged customer's URL takes you to the kept profile.
- **Different external IDs stay separate:** dimmi will not merge two users who have different external IDs.

When a chatting lead later signs in with an identity token, dimmi merges them into their user record automatically.

<Callout type="caution">Merging two customers cannot be undone.</Callout>

## Customer and company notes

Use **Customer notes** in a conversation sidebar (or **Notes** on a company page) to share private context across your team. Customers never see these notes.

- **Pin one note:** pin the most important note to keep it at the top. Pinning another replaces the pinned note.
- **Edit and delete:** only the teammate who wrote a note can edit or delete it. Anyone on the team can pin it.

## Blocked customers

The **Blocked** tab shows customers marked `blocked` through the REST API. When a customer is blocked:

- New conversations go straight to spam.
- The dimmi agent, workflows, and auto-assignment skip their threads.
- Broadcasts and series exclude them.

## Delete or erase a customer

Through the REST API, you can delete a customer only if they have zero conversations. To remove a customer with conversation history, [erase their data](/customers/erase-data/) instead.

---

Index of all dimmi docs: https://trydimmi.com/llms.txt (full text: https://trydimmi.com/llms-full.txt)
