Alstre
Try it
02 · Customers

Merging duplicate customers

The same customer ends up in the database twice surprisingly often — once after a phone call, once after a showroom visit. We show how the system detects such pairs, how to combine the records into one and how to undo a merge.

Why merge

A customer called in the morning — a sales adviser created a record. In the afternoon they came to the showroom and ended up with another adviser, who created a second one. After the measurement it turns out that the history of one case sits on two records, and the statistics count it twice.

Merging combines the records into one, moving all documents onto it. Nothing is lost — only the record they belong to changes.

How the system finds duplicates

The customer list has a duplicates-only view. The system matches records by three pieces of data that unambiguously point to the same customer:

Phone
Compared by digits only, so spaces, brackets and hyphens don’t matter. Numbers shorter than nine digits are skipped. Write numbers consistently — “+44 7700 900123” and “07700 900123” have different digits, so the system treats them as different numbers.
Company tax number
For business customers — the tax number, compared without spaces, dots and hyphens, and only when it has at least five characters.
Email address
Case-insensitive, and only one that looks like a real address.

Matches combine transitively: if the first record shares a phone number with the second, and the second shares an email address with the third, all three end up in one group. Groups are marked on the list, and the duplicates view refreshes every minute.

A typo in the surname alone won’t be detected
The system doesn’t compare first names, surnames or cities. Two records “James Cart” and “James Cartr” without a shared phone, email or tax number won’t show up as duplicates — you have to find them yourself and select them manually.

How to merge records

  1. Select the records on the list
    It doesn’t have to be exactly two — you can select all records of the same customer at once.
  2. Click “Merge” above the list
    The button shows how many records the operation will cover.
  3. Choose the primary record
    This one stays and takes over everything. Choose the one with more complete data — with the tax numbers, address and correct name filled in.
  4. Confirm
    The operation runs completely or not at all — an interrupted merge won’t leave half the documents on one side and half on the other.

What exactly is moved

  • Contracts — including those where the merged record was the payer rather than the buyer
  • Measurements — keeping their numbers and dates
  • Quotes
  • Complaints and service requests
  • Addresses — added to the primary record as further entries
  • Pins — without duplicates, if both records were pinned by the same person

The merged record disappears from lists and search, but stays in the database with a pointer to the primary record. That way an old link leads to the right place, and the merge can be undone.

We don’t copy data from the record
Documents and addresses are moved, not field contents. If the merged record had a tax ID or a second phone number filled in that’s missing from the primary record, you need to copy them by hand — which is why it’s worth choosing the more complete one as primary.

Undoing a merge

Every merge is recorded in the history of the primary record. You’ll find it in its preview, on the Merges tab — it only appears if there has been one.

Undoing restores the state from before the operation: documents return to their original owners, addresses to their records together with the main-address flag, and the merged records reappear on the list.

Undo straight away when you spot a mistake
The longer the merged record is in use, the more new documents are created on it — and after undoing those stay where they were created, because they didn’t exist at the time of the merge.