Deduplication audit for chauffeur, client and vehicle records
Use this audit before any merge. It checks chauffeur, client and vehicle records on the same normalized keys, holds a group when those keys conflict, and recounts booking and payment history after the move. No pair is merged from a name, a phone, or an email alone.
Scope and order
Work in one workspace at a time. A record in another workspace is never a candidate. Run the audit in the order chauffeur, client, vehicle, then booking, because a booking link can create a false match for all three record types.
What the audit covers
Chauffeur records by certificate number, name with phone or email, and linked sign-in account. Client records by name with phone or email. Vehicle records by plate and permit number. Booking references and public tokens are checked only to find a duplicate booking that would make two records look different.
What the audit never does
It never merges across workspaces, never deletes a record, never changes a rate, a pickup time, a call time or a saved quote amount, and never copies a prior total, prior call time, prior chauffeur, prior vehicle or prior receipt into a new record.
Step 1: build the normalized keys
Build each key in the same order every time. Trim, remove or collapse the stated characters, change case as stated, then compare the whole key. The display value on the record kept stays as entered on that record.
Names
Trim, collapse each run of spaces to one space, compare in lower case with first and last names in the same order. A middle initial or a company name stays in the key. A blank name never matches on name.
Phone numbers
Remove spaces, dashes, brackets and dots, keep an extension as a separate part, compare digits only. Ten digits compare as one plus those ten digits. Eleven digits starting with one compare as those digits. A main line and an extension never match. A blank phone never matches on phone.
Email addresses
Trim, remove internal spaces, compare the full address in lower case. A shared company inbox alone never groups records. A similar address with a different domain never matches on a full term.
Certificate, plate and permit numbers
Trim, use upper case, remove spaces and hyphens. Colour and type are not part of a vehicle key, since several vehicles can share a colour and type with different plates.
Step 2: group only on the fixed key for the type
A partial match on one field never replaces the key. A group that does not meet the key stays as separate records.
Chauffeur
Group only when the normalized certificate number matches, or the normalized name matches and the normalized phone or email matches. A matching certificate is stronger than a matching name. Do not merge a relief chauffeur into a full time chauffeur record.
Client
Group only when the normalized name matches and the normalized phone matches or the normalized email matches. A shared phone alone and a shared inbox alone never group records. Booker contact and passenger contact stay separate fields.
Vehicle
Group only when the normalized plate matches or the normalized permit number matches. Two vehicles with different plate and permit keys stay separate, even when colour and type match.
Booking
Two bookings with the same reference code or the same public token in one workspace are duplicates of one booking. Keep the second in Quote and out of the day board until staff confirm with the booker or passenger which booking is the real run.
Step 3: read the evidence for each pair
Show this evidence side by side before a decision. A pair with no evidence in this list is not ready to merge.
Matched keys and differing fields
- Each normalized key that matched, stated by field name
- Each field that differs, including certificate expiry, permit and inspection dates, odometer, days off, status and pickup date
- For a chauffeur, whether one record is linked to a sign-in account and the other is not
Counts attached to each record
- Bookings by status, files and photos, daily checks, service entries, issues and invoices linked through each booking
- Role assignments and days off for a chauffeur, permit and inspection history for a vehicle
- For a client, Complete trips by pickup date and month, since an invoice is issued by customer and month from Complete bookings only
Step 4: conflict resolution and the record kept
Keep one record in this order. When a key conflicts, hold the group, correct the named record first from the document or the person, then regroup. Do not auto merge on similar spelling alone.
Survivor order
- Active record over retired or inactive record
- Chauffeur record linked to the matching sign-in account over an unlinked record
- Record whose attached certificate, permit or inspection document matches its expiry field and is valid for the pickup date
- Record with the most attached history, then the record the owner or manager chooses with the reason recorded in the activity log
Hold, do not merge, when
- Certificate numbers conflict, or plate or permit keys conflict, for the same name or colour
- Two chauffeurs share a name but hold different certificate numbers, or two vehicles share colour and type but hold different plates
- A phone, email or name is the only match, with no fixed key met
- A document on the named record does not support the expiry field on that record
Step 5: move history and keep payment history intact
Move history from the duplicate to the record kept, inside one workspace only. Retire the duplicate after the recount. Never delete a record in a way that breaks past bookings.
Booking history
Repoint bookings to the record kept for customer, chauffeur and vehicle links. Open one booking from each old record after the move and confirm it now opens from the record kept. A Quote that was never confirmed stays in Quote until staff confirm it.
Invoice and payment history for a client merge
An invoice is issued by customer and month from Complete bookings only, with fare, gratuity and all in total on separate lines. Repoint the invoice customer only after every Complete booking behind that invoice is on the record kept. Recount trip count and fare, gratuity and total sums by customer and month after the move. Never change an amount, a payment status or a method label, and never issue an invoice for a Quote or a booking in progress.
Trip earnings for a chauffeur merge
Only Complete trips create an earnings row, grouped by chauffeur and pickup date with trip count beside fare, gratuity and total subtotals. Recount the group for the record kept after the move. An earnings row stays with the chauffeur assigned at Complete, and a missing chauffeur at Complete creates no row.
Vehicle history and odometer
Move daily checks, odometer readings, service entries and out of service history to the record kept. The odometer on the record kept is the highest recorded reading, never a lower reading from the duplicate. Permit, inspection and certificate dates come from the document attached to the record each document proves.
- Count bookings, files, checks, service entries, role assignments and invoice links on both records before the move, and count again on the record kept after the move
- The keeper count after the move must equal keeper before plus duplicate before for each category, and no category may be lower than it was before
- Re-read quote, call time, status, flags and vehicle readiness for the pickup date after any correction, and approve a draft only after it matches the current record kept
Acceptance checks before a merge is closed
Run each check in one workspace. Each check names the screen, the field and the result.
- Two chauffeur records with the same normalized certificate number group as duplicates, and two with the same name but different certificate numbers stay separate
- Two client records with the same name and phone group, and two with a shared phone alone stay separate
- Two vehicle records with the same normalized plate group, and two with the same colour and type but different plates stay separate
- After a client merge, the invoice list by customer and month shows the same Complete trips and the same fare, gratuity and total sums as before the move, with payment status and method label unchanged
- After a chauffeur merge, the earnings list by chauffeur and pickup date recounts to keeper before plus duplicate before, with no trip counted under two chauffeurs
- After a vehicle merge, the odometer on the record kept never moves backward and daily checks and service entries still open on that vehicle
- The duplicate is retired, not deleted, past bookings and history still open, and no new assignment uses the retired record
Normalize first, merge second, recount last
Search the list before you add a record, compare on the fixed keys in this audit, and confirm the real record with the booker, passenger, chauffeur or shop before you merge.