Customer & Contact Matching in Odoo
Learn how to resolve customers by mobile (+966) and email, prevent duplicate res.partner contacts, and handle guest checkouts.
Customer Identification Strategy
To prevent duplicate res.partner records and fragmented sales histories in Odoo, ERP Link uses a robust contact matching sequence:
- Normalized Mobile Search: Scans Odoo
mobileandphonefields using standardized phone strings. - Email Match: If no mobile match exists, searches by customer email address.
- Provision or Generic Fallback: Creates a new
res.partnercard, or links the order to a generic cash customer based on your configuration.
Customer Settings Reference Table
Fields available in the Customers Mapping tab (src/app/(app)/app/mapping-center/standard-components/customer-settings-tab.tsx):
| UI Setting Name | Operational Role | Options | Practical Impact |
|---|---|---|---|
Primary Match Field (customer_match_field) | Search priority | Mobile Phone / Email | Determines the first attribute queried |
Auto Create Customers (auto_create_customer) | Provisions new res.partner | Enabled / Disabled | Stores each shopper as a distinct Odoo contact |
Default Generic Customer (default_customer_id) | Fallback contact | List of Odoo contacts | Used for anonymous guest orders |
Update Existing Contacts (update_existing_customer) | Refreshes address/phone | Enabled / Disabled | Keeps customer contact profiles up to date |
Saudi Mobile Number Normalization (+966)
Shoppers enter phone numbers in varied formats (0501234567, 966501234567, or +966 50 123 4567).
ERP Link automatically strips non-numeric characters and normalizes Saudi mobile numbers into the canonical international format (+9665XXXXXXXX), guaranteeing matching regardless of input style.
Guest Checkouts & Generic Contact
When visitors complete checkouts without registering a permanent store account:
- You can configure a Default Generic Customer (e.g., "Cash Customer / عميل نقدي").
- The sales order is assigned to this generic partner while preserving the delivery address in the order remarks.
Encountered an issue applying this guide?
Open a support ticket to have our engineering desk inspect logs directly.