Guide - Data quality

Data integrity audit for ChauffeurDesk

Use this ranked list when a booking, vehicle, chauffeur, workspace or contact reference does not match its source record. Each entry names the source, the mismatch, and the exact fix. Work from rank 1 in order.

How to read this audit

Find the entity, read the source record, then apply the exact fix on the named file. A blank or a variant is not a second record. Do not copy a prior value into a new record to close a gap.

  1. Trace the reference

    Open the booking, vehicle, chauffeur, customer or workspace record named in the entry. Confirm the field on that record in the same workspace.

  2. Apply the exact fix

    Change only the named file and field to the replacement text in the entry. Keep the label, the required mark and the validation in place.

  3. Re-read the record

    After the fix, re-read quote, call time, status, flags and readiness for the pickup date. A mismatch that remains is still ranked and still held from dispatch, approval or invoice.

Ranked list of orphaned, mismatched or inconsistently named entities

Rank follows harm to a real run. Rank 1 can create an incomplete booking. Lower ranks create duplicate records, wrong counts or wrong contact details.

Rank 1 - Duplicate public booking form with divergent checks

Source record: public/passenger-book.html at /passenger-book, canonical per the navigation map guide. Mismatch: the copy at public/app/passenger-book.html at /app/passenger-book lacks the drop off required check for non hourly and non event service, lacks length checks for meet point, sign text and requests, lacks the flight format check, uses a looser phone check, and cleans email without removing spaces, while the public copy requires those checks and removes spaces from email. A booking saved from the app copy can fail the completeness gate in the booking integrity guide for drop off, phone and flight.

Exact fix: in public/app/passenger-book.html, replace validateRequest, validateUpdate, validateReschedule, validateCancel and cleanEmail with the matching functions from public/passenger-book.html, keep the app shell styling, and keep /passenger-book as the one linked destination. Do not link the app copy from header, footer or sidebar.

Rank 2 - Complete looking fictional phone in booking and demo forms

Source record: the correction table guide and the placeholder inventory guide, which state that +1 816 555 0142 is a fictional example in the 555 range and not a company contact. Mismatch: the same complete number appears as the placeholder in public/passenger-book.html, public/app/passenger-book.html and public/request-demo.html for passenger phone, booker phone and update phone. It can be copied into a booking as a real passenger phone, and chauffeur details go to the passenger phone after Driver confirmed.

Exact fix: in each of those three files, replace every placeholder +1 816 555 0142 with +1 ___ ___ ____. Keep the field label, the required mark and the phone validation unchanged.

Rank 3 - Expired no cancelled status sentences

Source record: public/guides/normalized-values.html, which states Cancelled with double l is the canonical status set only by the public cancel flow on a Quote or Confirmed booking, excluded from dispatch, flags, readiness, earnings, invoices and the five numbers, with no fee computed from Cancelled. Mismatch: sentences in public/guides/corporate-accounts.html, public/guides/issue-invoice.html and the capability gaps entry state that the booking fields do not include a cancelled status. A reader applying that sentence would hold a real Cancelled booking as if the status could not exist.

Exact fix: in each named file, replace that sentence with the canonical rule in the source record above. Keep the exclusion rule and keep the no fee rule unchanged.

Rank 4 - Onboarding role count mismatch

Source record: public/onboarding-checklist.html, which lists six role values, manager, admin, dispatcher, chauffeur, relief and passenger, with admin and dispatcher using the owner or manager sign in role. Mismatch: the onboarding card in public/guides/config-inventory.html lists four roles and omits admin and dispatcher, while public/guides/operations-inventory.html already states the six role correction.

Exact fix: in public/guides/config-inventory.html, replace the four role list with the six role values from the source record, and add the same owner or manager sign in note for admin and dispatcher.

Rank 5 - Site form retry described as dead in one guide

Source record: public/site.js, which defines FORM_TIMEOUT_MS 15000 and MAX_ATTEMPTS 3, retries only on 429, 408, 502, 503 and 504 with backoff 500, 1000 and 2000 milliseconds, reuses the same Idempotency-Key, and clears the outbox on a permanent 4xx rejection. Mismatch: the dead retry card in public/guides/config-inventory.html states that the form submit path does not use the count, while public/guides/operations-inventory.html states that retry is live and corrects the earlier inventory.

Exact fix: in public/guides/config-inventory.html, replace the dead retry card with the live retry statement from the operations inventory guide, with the same statuses, backoff values and Idempotency-Key rule.

Rank 6 - Leading zero vehicle labels in illustrations

Source record: the correction table guide, which states the fleet record name uses no leading zero in copy and the class at first mention is 2026 Lincoln Navigator L Reserve 4x4. Mismatch: illustrations in public/features.html, public/schedule.html and public/guides/live-dispatch.html use Navigator 03 and Navigator 07.

Exact fix: in those three files, replace Navigator 03 with Navigator 3 and Navigator 07 with Navigator 7 in illustration text only. Keep the illustration only caption and keep all other illustration text unchanged.

Rank 7 - Service name variants in lists and groupings

Source record: public/guides/data-fields.html and public/guides/correction-table.html, which state the canonical list as MCI airport arrivals and departures, Hourly as directed, Point to point and Weddings and events, with slugs airport_arrival, airport_departure, hourly, point_to_point and event. Mismatch: variants such as MCI arrival, Wedding or event, Events alone, Point-to-point with hyphens and Hourly alone before the full name appear in the Features grouping list and in the passenger book select.

Exact fix: in list and grouping text, replace each variant with the canonical name from the source record. Keep a short form only after the full canonical name is given in the same list. Keep Point to point with no hyphens.

Rank 8 - Pickup point spelling variant

Source record: the data fields guide pickup point list, which states Lee's Summit with an apostrophe and Center with American spelling among ten pickup points. Mismatch: the integrations page uses Lees Summit without an apostrophe, which groups as a different place key in the merge duplicates guide.

Exact fix: in public/integrations.html, replace Lees Summit with the canonical Lee's Summit spelling. Keep the ten pickup point list otherwise unchanged.

Rank 9 - Client used for the customer record in public copy

Source record: the data fields guide people entries, which state customer is the canonical public name for the record and client in data quality pages is read as customer. Mismatch: public copy that uses client for the same record can create a second customer record in search, because search in the navigation map guide is by customer name, phone and email.

Exact fix: in public copy, replace client used for the customer record with customer. Keep booker and passenger as separate fields, and keep Driver confirmed as a status value only.

Rank 10 - Referenced icon files not listed in the pack and guides with no index card

Source record: the pack file list for app-chauffeur.site.1, which lists site pages, site style, site script, the app shell and guides, and the navigation map guide, which lists 22 implemented guides with no card in the guides index. Mismatch: Open Graph and apple touch icon tags reference /icons/icon-512.png and /icons/icon-192.png, which are not in that file list, and the 22 guides are reachable only through the navigation map until the index lists its own cards.

Exact fix: before deploy, confirm both icon files are present at the referenced paths in the deployed site, and if a file is absent, remove its meta reference rather than shipping a broken preview. Add one card per guide in public/guides/index.html under the section that matches the guides index filter, using the same label as the navigation map.

Referential integrity map, cleanup runbook, and save-time constraint proposal

Use this map for every operational record. Each child record names a parent record in the same workspace. A child whose parent is missing, blank where required, or in another workspace is an orphan. It stays out of dispatch, reports, invoices and approval until a real parent is linked.

Booking to workspace, customer, chauffeur and vehicle

Parent records: the workspace for the signed in company, one customer record, one chauffeur record when assigned, and one vehicle record when assigned. Required at confirm and at dispatch: customer link present and opened in the same workspace, pickup time present, and status in booking order. Required at dispatch only: chauffeur link and vehicle link present, chauffeur not marked off for that date, certificate expiry on or after the pickup date, vehicle Ready for that date with check date equal to pickup date, not out of service, permit and inspection expiry on or after the pickup date, and no overdue service item. A blank chauffeur or vehicle link at Quote stage is not an orphan at that stage. The same blank at Confirmed or later is a flag in words on the row and the run is not dispatched.

Daily check and service log to vehicle

Parent record: one vehicle record in the same workspace, with a check date or a service date that is not blank. A daily check whose vehicle finds no record, or whose check date does not equal the pickup date it is used for, is treated as not checked for that date and never clears a run for readiness. A service log whose vehicle finds no record, or whose item is not one of the 14 livery items for that workspace, resets no due date and keeps the vehicle flagged until a valid log for that vehicle and item is saved. Odometer on either record never moves backward for that vehicle.

Draft, issue and invoice to booking, and invoice to customer

Parent records: one booking record in the same workspace for a draft and for an issue, and one booking plus one customer record in the same workspace for an invoice. One draft per booking per kind at a time. An invoice is issued only from Complete bookings for one customer and one month by pickup date in the company timezone. A draft, issue or invoice whose parent finds no record is held out of approval, out of the queue and out of invoice totals. It is never approved, sent or issued from the orphan link.

File to the record it proves, and cross links

Parent record: the one chauffeur or vehicle record named by the file reference, in the same workspace. A certificate file proves only the chauffeur record it is listed on. A permit, inspection or insurance file proves only the vehicle record it is listed on. A file with no parent record, or a parent in another workspace, proves nothing and blocks assignment for that run. A chauffeur home vehicle link and a vehicle home chauffeur link each open to a real record in the same workspace. A link to a retired or deactivated record is read as missing for a new assignment and past history is kept for reporting only.

Cleanup runbook in order

Work in one workspace at a time. Confirm table and column names against the shipped schema for the build before running a query. The queries change no record and keep the tenant filter and the 200 row cap on every query.

  1. Run the orphan audit per child type

    List bookings whose customer link finds no customer in the same workspace, confirmed runs whose chauffeur or vehicle link finds no record in the same workspace, daily checks and service logs whose vehicle link finds no record, and drafts, issues and invoices whose booking link finds no record. Example pattern: SELECT b.id, b.reference_code FROM bookings b LEFT JOIN customers c ON c.id = b.customer_id AND c.tenant_id = b.tenant_id WHERE b.tenant_id = :workspace AND c.id IS NULL LIMIT 200. Repeat the same left join pattern for each child type, and use a NOT EXISTS form per parent where two parents are tested, so one parent index is used per test.

  2. Run the duplicate identity audit

    Group bookings by reference code and by public token, vehicles by normalized plate and by normalized permit number, and chauffeurs by normalized certificate number, in one workspace, with blank values excluded. Normalization is trim, upper case, and remove spaces and hyphens for plate, permit and certificate, and trim, collapse spaces and lower case for names, with phone digits only and email lower case for contacts. Any group with more than one active record is a duplicate group to merge under the merge guide, never to delete.

  3. Run the mismatch audit

    List runs where call time does not equal pickup time minus the saved lead hours setting, where a daily check date for an assigned vehicle does not equal pickup date, where pickup time is in the past and status is not Complete, where status skips a step in booking order, and where a vehicle is assigned while out of service, failed, permit or inspection expired, or overdue. Each row names the field to correct on the booking, the chauffeur record or the vehicle record.

  4. Repair only from a real record, then recount

    Contact the booker or passenger for passenger data, the chauffeur for certificate data, and the shop for vehicle data. Correct the named parent record first, then link the child. Count bookings, files, checks, service entries, issues, invoices and role links on the keeper before the move and again after. The keeper count after must equal keeper before plus duplicate before for each category. Never create a placeholder customer, chauffeur or vehicle to close a gap, and never copy a link from another booking, another date or another workspace.

  5. Quarantine what cannot be repaired

    Keep the record, flag the reason in words on the row, and keep it out of the day board, reports and invoices. A booking that is not yet confirmed stays in Quote status with drafts held. A run with no chauffeur or no Ready vehicle stays flagged and is never dispatched. A daily check with a missing vehicle is treated as not checked. A service log with a missing vehicle resets no due date. A draft, issue or invoice with a missing parent is held and is not approved, sent or issued. List each quarantined record for the owner or manager to recover.

  6. Re-run every audit to zero

    Zero rows for the orphan, duplicate and mismatch audits is the pass mark for one workspace. A result of 200 rows means the cap was reached. Quarantine those rows and re-run the same query with the same workspace filter until fewer than 200 rows return. Do not remove the workspace filter or the cap to list the whole set at once.

Save-time constraint proposal

Apply these checks at save time in the app code for the record being saved, inside the signed in workspace only. A failed check saves nothing and names the field to correct. No new sign in path, no new tenancy path and no parallel auth scheme is added by this proposal.

Composite parent check

Every child save reads the parent by id and by workspace number together, as one composite key of workspace number plus parent id. A parent that is found only under another workspace number is treated as not found. Never change the workspace number on a child record to make a link match, and never delete a parent to clear a link. Deleting a parent never cascades to a booking, check, log, draft, issue, invoice or file.

Unique keys per workspace

One booking per reference code per workspace and one booking per public token per workspace, with a public token never blank and never reused. One active vehicle per normalized plate per workspace and one per normalized permit number per workspace. One active chauffeur per normalized certificate number per workspace. Blank values are excluded from grouping and stay separate until a real value is entered on each record. A second save that would share one key is held for staff to confirm the real record.

Required links and status checks

Customer link required to confirm a booking. Chauffeur and vehicle links required to dispatch a run. One daily check per vehicle per check date per workspace, with a second check for the same vehicle and date held for review. Status saves only the one next step in booking order, with no skip and no step after Complete or Cancelled. Cancelled is set only through the public cancel flow on a Quote or Confirmed booking, with a reason on that booking.

Value checks already stated in the pack

Passengers is a whole number from 1 to 7. Estimated hours is from 0.25 to 24 in quarter hour steps. Pickup and drop off are present where the service requires them, at most 200 characters each. Airline and flight number are present for an MCI airport arrival. Call time is derived on the server as pickup time minus the saved lead hours setting and is never supplied by the client. Quote amounts are derived from saved rates at booking time and are never supplied by the client. A changed rate applies to new quotes only.

  • After any repair, re-read the booking, the assigned chauffeur record, the assigned vehicle record, the daily check for the pickup date and the flag on the row before assignment, approval or invoice
  • Approve a draft only after it matches the current parent records, and issue an invoice only from Complete bookings whose customer and booking links both open in the same workspace
  • Record each repair, merge, retire and quarantine with actor, action, target and time, with no secret or personal note in the log detail
  • Search the list before a record is added, so the same customer, chauffeur or vehicle is not added twice in the same workspace

Acceptance checks before you ship a fix

Run each check after a fix from this audit. Each check names the screen, the field and the result.

  • App copy booking form now rejects a point to point request with no drop off, an MCI arrival with no airline or flight number, and a phone under 10 digits, with the field named and no booking saved
  • No form placeholder shows a complete phone number, and the masked placeholder in both booking copies matches word for word
  • Every guide that mentions Cancelled uses the canonical rule and the no fee rule, with no sentence stating that no cancelled status exists
  • Every role list states six onboarding roles, and every retry statement states live retry with the same statuses and backoff values
  • No illustration label uses a leading zero, no list uses a service variant, and no pickup point uses Lees Summit without an apostrophe
  • Both referenced icon files load at the paths in the meta tags, and every guide in the navigation map also appears once in the guides index
  • A booking whose customer link finds no customer in the same workspace stays in Quote, is flagged in words, and receives no confirmation draft and no invoice
  • A confirmed run whose chauffeur or vehicle link finds no record in the same workspace is never dispatched, and a daily check whose vehicle link finds no record is treated as not checked for that date
  • Two bookings with the same reference code or public token, two vehicles with the same normalized plate, and two chauffeurs with the same normalized certificate each group as duplicates, are merged or retired, and never deleted in a way that breaks past bookings
  • Every orphan, duplicate and mismatch audit query returns zero rows for one workspace after cleanup, and a 200 row result is treated as more work to quarantine, not as a clean result

Trace the reference, fix the named file, re-read the record

Work the ranked list in order, then re-check quote, call time, status and flags before dispatch, approval or invoice.