Odoo CRM data import: leads, accounts, and opportunities
Importing CRM records into Odoo 19 requires loading data in dependency order—users and pipeline stages first, then companies, contacts, and finally leads or opportunities—while assigning unique External IDs to every row. Using External IDs links child contacts and opportunities to the right parent companies via Field/ID columns and lets you re-run update imports without creating duplicates. Always back up source CSVs and run Odoo's Test button before importing.
Key facts
- Odoo 19 imports CSV (.csv) and Excel (.xlsx) files across contacts, leads, and opportunities, and warns that imports are permanent and cannot be undone. Source: odoo.com
- Mapping a unique External ID (id) on imported records allows repeat imports to update existing rows instead of creating duplicates and links relational fields via XXX/ID syntax. Source: odoo.com
- Odoo heuristically determines column field types from the first ten rows of an import file and warns that oversized import or export files can trigger a time-out error. Source: odoo.com
- Odoo Online restricts custom modules and direct PostgreSQL access, whereas self-hosted and managed instances allow database-level imports for tens of thousands of emails and attachments. Source: odoo.com
On this page
Why Odoo CRM import order decides whether your database stays clean
A successful Odoo CRM import loads lookup values first, companies second, contacts third, and opportunities last, with every row carrying a unique External ID so relationships never break or duplicate. As outlined in our complete guide to Odoo CRM for sales teams, teams that export a flat opportunity spreadsheet from a legacy CRM and upload it straight into Odoo’s pipeline usually end up with dozens of misspelled company duplicates and unassigned deals.
Because the Odoo 19.0 Export and Import Data documentation (checked Nov 2026) explicitly warns that imports are permanent and cannot be undone, staging your load sequence before touching production saves days of manual cleanup.
| Import step | Odoo model | Prerequisite records | Key linking column |
|---|---|---|---|
| 1. Foundation | Users, Stages, Tags, Lost Reasons | Sales Teams configured | id (External ID) |
| 2. Companies | Contacts (res.partner, Company = True) |
Countries, States, Industries | id (e.g., sf_acct_001...) |
| 3. Individuals | Contacts (res.partner, Company = False) |
Step 2 Companies loaded | parent_id/id pointing to Company External ID |
| 4. Opportunities | CRM Lead/Opportunity (crm.lead) |
Steps 1-3 loaded | partner_id/id, user_id/id, stage_id/id |
| 5. Activities & Emails | Activities, mail.message, ir.attachment |
Step 4 Opportunities loaded | Scripted API or database sync (beyond basic CSV) |
How External IDs prevent duplicates and link relational fields
The single most important column in any Odoo spreadsheet import is External ID (id). An External ID is a unique string identifier you assign (such as your legacy Salesforce 18-character record ID or a clean prefix like crm_acct_1042) that tells Odoo whether an incoming row should create a brand-new record or update an existing one.
Per Odoo 19’s import documentation, External IDs solve two problems at once:
- Idempotent updates: If you realize after importing 5,000 accounts that phone numbers or state codes need adjusting, re-importing the corrected sheet with the exact same
idvalues updates the existing records in place instead of creating 5,000 duplicates. - Relational linking (
Field/ID): When importing individual contacts, map their employer column to Related Company / External ID (parent_id/id). When importing opportunities, map the account column to Customer / External ID (partner_id/id) and the rep column to Salesperson / External ID (user_id/id). Linking by External ID avoids silent matching errors when two companies share similar names.
Remember: never leave duplicate External IDs inside the same file or across files for the same model—Odoo throws an immediate conflict error—and never delete the ID column when adapting an Odoo export template.
Worked example: formatting Companies, Contacts, and Opportunities CSVs
Here is a hypothetical three-file CSV structure showing how External IDs link an account, its buyer contact, and an active opportunity cleanly across separate Odoo models (res.partner and crm.lead):
File 1 — Companies (res.partner)
id |
name |
is_company |
phone |
state_id |
|---|---|---|---|---|
sf_acct_001 |
Midwest Hardware Supply | True |
555-0140 |
OH |
sf_acct_002 |
Prairie Co-op Distributors | True |
555-0188 |
IA |
File 2 — Individual Contacts (res.partner)
id |
name |
is_company |
parent_id/id |
email |
|---|---|---|---|---|
sf_cont_101 |
Jordan Lee | False |
sf_acct_001 |
j.lee@example-hardware.test |
sf_cont_102 |
Morgan Patel | False |
sf_acct_002 |
m.patel@example-coop.test |
File 3 — Opportunities (crm.lead)
id |
name |
type |
partner_id/id |
stage_id |
expected_revenue |
|---|---|---|---|---|---|
sf_opp_501 |
Q3 Line Expansion | opportunity |
sf_acct_001 |
Quote / Proposal Sent |
42000 |
sf_opp_502 |
Annual Spring Stocking | opportunity |
sf_acct_002 |
Discovery / Line Review |
18500 |
Notice two practical details from this layout. First, type must be explicitly set to opportunity (or lead) so records land in the Kanban pipeline rather than the hidden Leads screening list. Second, if you later need to bulk-update imported rows inside Odoo, run an export with I want to update data (import-compatible export) ticked so Odoo outputs the exact ID column and importable fields ready for round-trip edits.
Field mapping rules and hidden import traps in Odoo 19
Odoo 19 accepts both .csv and .xlsx files via the Import records action on any list view (Contacts, CRM > Pipeline, or CRM > Leads). Five documented behaviors catch first-time importers off guard:
- 10-line type heuristics: Odoo guesses each column’s field type from the first ten lines of your file. If rows 1 through 10 contain only digits in a ZIP code or reference column, Odoo may only suggest integer fields instead of text fields. Put representative mixed values near the top or tick Show fields of relation fields to inspect the full mapping dropdown.
- CSV formatting options vs. Excel: Excel (
.xlsx) uploads skip the CSV separator, encoding, and date-format controls. For legacy exports containing commas, multi-line notes, or non-ASCII characters, UTF-8 CSV with explicit quoting and ISO dates (YYYY-MM-DD) avoids silent truncation—and avoid tab-delimited exports, because Odoo’s documentation notes that tabulation separators break automatic column detection. - Currency and negative number formatting: Odoo supports negative numbers wrapped in parentheses with a currency symbol inside, such as
($32,000.00), whereas placing the symbol outside like$(32,000.00)or including unrecognized currency codes causes the import validation to fail. - Developer mode Advanced import options: Turning on Developer Mode reveals an Advanced panel during import with Track history during import (which subscribes followers and sends notifications, slowing large loads substantially—leave it off for bulk historical imports) and Allow matching with subfields.
- Click Test before Import: Always run Test on a 25-row sample inside a staging database first, then verify stage mapping, expected revenue totals, and won/lost statuses before loading full production volume. Also check our Salesforce-to-Odoo day-one cheat sheet if your team is mapping legacy Salesforce field names for the first time.
How to update existing records and avoid blank-cell overwrites
You can safely update thousands of existing contacts or opportunities in Odoo by exporting with I want to update data (import-compatible export) enabled, editing the file, and re-importing with every External ID untouched (Odoo 19.0 Export and Import Data documentation, checked Nov 2026).
Keep three documented rules in mind when running repeat imports or cross-table updates:
- Prefix External IDs across every object: Odoo requires External IDs to be unique across all records of all objects, not only inside one spreadsheet. Prefixing IDs by source table (such as
sf_acct_for companies andsf_cont_for individuals) prevents collisions when two legacy tables both start at row1. - Delete unused columns rather than leaving blank cells: If a field is omitted completely from your CSV file, Odoo applies the model’s default value on creation. If you include the column header with blank cells, Odoo writes an empty value into those fields instead of applying defaults.
- Use
/IDwhenever display names can collide: If two tags, product categories, or parent companies share the same name, matching by name triggers validation warnings or links every row to the first record found. Always map ambiguous relations usingField/External ID.
Cleaning picklists, stale deals, and duplicates before you import
Importing uncleaned CRM history turns a clean Odoo rollout into an unusable Kanban board on Monday morning. Follow our backup-first cleanup sequence before running final production imports:
- Export untouched backup CSVs first: Save timestamped raw snapshots of every source table before transforming a single column. If you are exporting from Salesforce, compare Weekly Export vs. API extraction in How to export all your Salesforce data, including emails and attachments.
- Normalize picklists without erasing legacy values: Map fragmented legacy stages, lead sources, and lost reasons to your clean Odoo CRM pipeline setup using a lookup table, while storing the original legacy value in a preserved text reference field on each migrated record.
- Deduplicate before loading: Because Odoo’s contact merge documentation (checked Nov 2026) warns that merging records inside Odoo is irreversible—and merging similar opportunities with Lost deals pulls dead records back into your active pipeline—deduplicate companies by domain/name and close stale open opportunities prior to cutover.
- Run a post-import spot-check before go-live: Because Odoo cannot undo an import, confirm record counts per object, open vs. closed revenue sums, and 10 sample parent-child contact and opportunity links inside a trial database before your cutover weekend run sheet begins.
If your current CRM already suffers from bloated lists and fragmented picklists, our standalone CRM data cleanup service ($1,800 flat up to 30,000 records, estimate) executes this backup-first cleanup workflow in one to two weeks. If you are still scoping what needs to move vs. rebuild, start with a fixed $1,500 Salesforce Exit Audit (credited in full toward a migration signed within 60 days).
Batch sizes, timeouts, and when CSV import is not enough
Web-interface CSV imports work well for 500 to 5,000 clean accounts and open opportunities, yet two real limits appear as soon as a 15-to-100-seat sales team tries to bring five or ten years of CRM memory into Odoo:
- HTTP request timeouts: Odoo documentation explicitly warns that large import or export files can hit a time-out error when a single browser request runs too long, advising users to split large files into smaller batches (see also Odoo large exports: the timeout problem and the background wizard).
- Emails, attachments, and delta cutover: Loading 20,000+ closed opportunities alongside tens of thousands of historical Chatter emails and file attachments cannot be done reliably through browser CSV uploads—especially on Odoo Online, which blocks direct PostgreSQL database access and restricts External API use to the Custom plan (Odoo 19.0 Odoo Online documentation, checked Nov 2026).
That is why Offramp CRM runs migrations onto self-hosted or Managed Odoo Hosting using mapping-driven syncs, two full trial loads, and a cutover-weekend delta sync while Salesforce stays live. Explore our fixed-scope Salesforce to Odoo migration packages (starting at $8,500 for Launch, $15,000 for Standard, and $24,000 for Scale) or review Salesforce data migration mistakes we fixed before starting your own import.
Frequently asked questions
What order should we import companies, contacts, and opportunities into Odoo?
Import records from parent objects down to child objects: first confirm Salespersons (Users), Pipeline Stages, Tags, and Lost Reasons exist; second import Companies (is_company set to True); third import individual Contacts linked via parent_id/id; and fourth import Leads or Opportunities linked via partner_id/id and user_id/id. Loading opportunities before companies creates orphaned or duplicate partner records.
Why are External IDs critical during an Odoo CRM import?
An External ID (id) is a stable unique string—such as your legacy Salesforce 18-character Account or Opportunity ID—that identifies each row independently of Odoo's internal integer ID. When you re-import a corrected spreadsheet with the same External IDs, Odoo updates existing records instead of creating duplicates and resolves relational links cleanly.
Can you undo a bad CSV or Excel import in Odoo?
No. Odoo's official export and import documentation explicitly states that imports are permanent and cannot be undone. While you can filter recently created rows by Created on or Last Modified on, deleting thousands of wrongly linked opportunities and contacts manually is slow and error-prone—which is why staging test loads and pre-import database backups matter.
Why do large CRM CSV imports time out in Odoo?
Odoo's web import screen processes uploaded spreadsheets inside a standard HTTP worker request. When a file contains tens of thousands of opportunities or heavy chatter logs, the request can exceed worker time limits and return a time-out error. Odoo recommends splitting large web-UI files into smaller batches or loading high-volume datasets via API or direct PostgreSQL syncs.
Can we import historical emails and file attachments into Odoo CRM via CSV?
Standard spreadsheet imports handle structured CRM fields on contacts and opportunities well, but reconstructing threaded email timelines (mail.message) and binary file attachments (ir.attachment) across thousands of deals is impractical in CSV files. Teams migrating historical Salesforce emails and attachments typically use scripted API loads or Postgres-direct migration on self-hosted Odoo.
How should we map messy legacy picklists before importing into Odoo?
Never import 40 inconsistent Salesforce stage names or lead sources straight into live Odoo dropdowns. Build a picklist consolidation mapping table first, load clean normalized values into Odoo's standard fields, and preserve the legacy string inside a read-only reference field on each record so historical context is never lost.
Sources
- Odoo 19.0 Export and Import Data Documentation (checked )
- Odoo 19.0 Merge Contacts Documentation (checked )
- Odoo 19.0 Merge Similar Leads and Opportunities (checked )
- Odoo 19.0 Odoo Online Administration Documentation (checked )