How Customer Matching Works Across Branches
Source: autosoft-workshop/app/controllers/branch_matching_controller.rb
- Matches by email, mobile, phone, and display_name (ILIKE — case-insensitive substring)
- "John Smith" could match multiple customers across branches
- If critical contact fields (phone/mobile/email) are blank, multi-branch sync is skipped
- Accounting ID linking uses dynamic field mapping per integration
Support scenarios
- "Wrong customer linked across branches" → name/phone substring matched the wrong record
- "Customer not syncing between branches" → missing phone/email on the record