Bulk importing data into Odoo: CSV import vs the API

Odoo's import tool handles many routine loads through External IDs, but large or relational datasets often need API scripts with batching and validation. This page explains which method fits, how to set each up, and how to check results before records go live.

On this page

Bulk importing data into Odoo: when the CSV tool is enough

For many bulk loads, Odoo's built-in import tool is enough. Teams loading a few thousand contacts, product records or historical lists can usually use it, provided the source files are clean and the load order is planned. The API becomes the better choice when the volume, the logic or the number of linked records goes beyond what a spreadsheet upload can reliably handle. The useful question is not how many rows there are but whether each row can be created correctly with the fields in the file alone.

The import tool relies on External IDs to keep records traceable. An External ID is a stable identifier that a file assigns to each record, usually in an id column, so that a later file can refer to the same record without knowing its database ID. This matters for relations. A product line that points to a product category, or a contact that points to a company, can only be linked reliably if the related record was loaded first and has a known External ID. Duplicates are the other risk: re-running a file without stable External IDs or matching keys can create second copies of the same contact or product. Before loading anything, confirm which fields Odoo uses to match existing records in each model and test the full load order on a duplicate database.

A planned scripted load becomes necessary when the import file cannot express the business logic. Typical triggers are records that need computed values from other systems, multi-step creation where one record depends on the result of a previous call, or loads that must be repeated safely after partial failures. In those cases, the team should write down the mapping from source fields to Odoo fields, the order of model creation, the rule for handling a failed row, and the reconciliation report that proves every source record arrived. Confirm with your Odoo edition and hosting type that the external API your script needs is available, because access differs across plans. Validation then becomes a separate step: compare record counts by model, spot-check relations and totals against the source system, and keep the rejected rows in a file for correction before any user sees the data.

Which import method fits each load

This table compares the Odoo import tool with External IDs, a scripted API load and a direct database load across volume, relational complexity, repeatability, error reporting and who can run each one. Read it by matching your load to the row that describes it, then confirm API availability for your plan and hosting before you choose the scripted route.

FactorOdoo import tool with External IDsScripted load through the APIDirect database load
Typical data volumeSuited to moderate batches entered by functional users, split into files when a load growsSuited to large or repeated volumes, with batching and retry logic written by the teamPossible for very large volumes, but bypasses the ORM and its business rules
Relational complexityHandles parent and child records when each related record has a stable External IDHandles multi-model loads in dependency order, with lookups and mapping codePuts all referential integrity and computed fields on the loader to get right
RepeatabilityRe-importing with the same External IDs updates records, but each run is a manual stepScripts can be rerun, versioned and tested against a duplicate databaseRepeatable only if the SQL is versioned and every side effect is documented
Error reportingRow-level messages in the import screen, which are easy to read but hard to aggregateFull control over logs, failed-row files and reconciliation countsErrors often surface later, in reports or on screens, rather than at load time
Who can run itUsers with import rights on the target model, typically functional or data teamsDevelopers or integration engineers with a dedicated API user and minimum rightsDatabase administrators with access to the production database, which is a strong control risk
API availabilityNo API needed, so it works regardless of plan or hostingConfirm external API access on your plan and hosting before designing the scriptRequires direct database access, which self-hosted and Odoo.sh setups must allow explicitly
Justification requiredUsually the default choice for the first load and for small reference dataUsually the right choice when the load is large, repeated or needs integration logicNeeds a written justification, a tested rollback and sign-off from the data owner

Setting up a bulk load in Odoo step by step

This sequence turns a one-off data load into a repeatable process, where each stage proves its output before the next one starts and the final record counts match what the source system holds. It keeps errors small, makes reloads predictable, and gives the business a clear sign-off point before any data goes live.

  1. Export and profile the source data

    Export each source table or report from the legacy system in a stable format, then profile it for duplicates, empty required fields, inconsistent codes, date formats and character encoding. The data owner in each business area signs off on the record counts and the rules used to clean them. Do not move on until every source file has a known row count, a documented set of exclusions and an owner who has accepted the profile. Engineers who write the mapping later will rely on this profile, so gaps found here are far cheaper to fix now.

  2. Define External IDs for every model

    Assign a stable External ID to every record you load, using a naming pattern that includes the source system and the source primary key, such as a prefix per legacy system. Record the External ID scheme for each Odoo model in the mapping document so that reloads update existing records instead of creating duplicates. The check that closes this step is a test import of a small sample where a second run reports updates, not new creations. If that second run creates new records, the External IDs are not stable and the scheme must be fixed before continuing.

  3. Load reference data in dependency order

    Load records in the order that later records depend on: currencies and companies first, then partners, then products and product categories, then open balances and transactions. Each file should only reference External IDs that already exist in the target database. The closing check is a lookup report that confirms every reference in the transaction files resolves to a loaded record. Unresolved references at this point usually mean a load was skipped or an External ID differs from the mapping, and they must be cleared before the next layer loads.

  4. Run a small test batch on a duplicate database

    Create a duplicate of the target database, neutralized if it contains live data copies, and load a representative slice that includes edge cases such as multi-company records, archived items, unusual tax settings and long text fields. The database owner and a functional lead review the loaded records on screen and in reports. This test must pass with no unexpected errors and with reconciled totals for the sample before a full run is planned. Record the exact import settings used, because the tuning in the next step depends on them.

  5. Tune batch size and timeouts from observed behavior

    Run the same sample at a few batch sizes and watch the import logs, response times and any timeouts or lock waits on the database server. Choose the batch size and timeout settings that complete the sample reliably with no failed batches, and note what changed between runs. Odoo deployments differ in worker count, PostgreSQL resources and network path, so the values from one environment should be treated as a starting point only. The check is a repeatable run at the chosen settings with a log showing no failed batches, which becomes the baseline for the full load.

  6. Execute the full load with a logged run

    Run the full load in the dependency order from the earlier step, using the settings confirmed on the test database and keeping a log for each file with start time, end time, rows processed, rows created, rows updated and rows rejected. Stop the run if the rejection rate or error types differ from the test batch and investigate before continuing. The check that closes this step is a complete log for every file with no unexplained rejections. Keep the logs with the mapping document so the load can be audited later.

  7. Confirm record counts and totals before go-live

    Compare record counts per model with the source profile from the first step, then reconcile financial totals such as open balances, stock quantities and document totals with the data owners. Each mismatch must be explained by a documented exclusion or fixed and reloaded using the same External IDs. Go-live is approved only when the data owner and the functional lead have both signed the reconciliation report. Keep a copy of this report, since auditors and internal reviewers will ask how the data in production was verified.

  8. Freeze and archive the load package

    Store the final source extracts, mapping files, External ID scheme, import settings, logs and reconciliation report together in a versioned location with access controls. Note which Odoo version and database the load was run against, because a later upgrade may require the same files to be replayed on a newer version. The check that closes this step is a documented handover that lets another engineer repeat the load on a fresh duplicate database and reach the same counts. Without this package, any future reload or audit depends on memory rather than evidence.

How a staged load moves data from source to live records

The path starts with an extract from the source system, which is transformed and mapped to Odoo fields and External IDs before loading into a staging or test database. Validation reports and a reconciliation against source totals decide the next step. If validation fails, the team returns to mapping instead of loading. Only after the test load reconciles does the team run the go-live load into production, with a rollback decision point before records are considered live.

Staged load path with validation and reconciliation gates before production.

How the import tool and the API differ in practice

The import tool suits master data where each row maps to one model and relations are few, such as contacts, products, units of measure or warehouse locations. The team prepares one CSV per model, with column headers that match the field technical names and a stable External ID on every row. Relations, such as a product's category, are referenced by the External ID of the related record, so the load can run in dependency order without looking up database IDs.

  • What the team writes: a CSV per model, a load order that puts parent records first, and a mapping sheet from source fields to Odoo fields.
  • How errors surface: the import preview lists problems row by row before anything is committed, so most issues show up before go-live. Confirm in your version whether rows loaded before a failure stay saved.
  • What to re-run: because External IDs are stable, a corrected file can be imported again and existing records update instead of duplicating. Confirm this behavior for each model you load.
  • Size limits: very large files can hit time limits in the browser. Split files by model and by row range, and test the chunk size on a duplicate database.
  • Verification: compare record counts per model against the source and sample rows in the interface, including the relations.

Before the first production run, ask the implementation partner to confirm which models in your version accept the import with External IDs and which need a script.

Validating loaded records before they go live

A bulk load is only finished when the data in Odoo matches the source and the business can rely on it. The checks below run after every test load and again before cutover, and each one catches a different kind of failure that a successful import message does not reveal.

Record counts against source

Compare the number of records created, updated and skipped in Odoo with the row counts in each source file or extract, per model and per company. Import tools often report success for a batch while silently skipping rows that failed validation, so a count gap is the first sign of a problem. Keep the reconciliation as a saved report so every test run can be compared with the last one. Confirm which models your import touches, since partners, products and journal entries each need their own count.

External ID uniqueness and re-run idempotency

Check that every External ID maps to exactly one record and that no two source rows share an identifier. Then run the same load a second time on a copy of the database and confirm it updates existing records instead of creating duplicates. A load that is not idempotent makes every failed batch a cleanup project, so this check decides whether you can safely retry. Record the External ID scheme in the project documentation so later integrations use the same keys.

Relational integrity and orphaned lines

Look for records whose required links point to nothing or to the wrong parent, such as invoice lines without an invoice, order lines with a product that was never loaded, or contacts assigned to a company that failed to import. Load parent models before child models, and query for missing many-to-one references after each run. Orphaned lines often pass the import and only show up when a report or a posting fails, so test them directly rather than assuming the load order was correct.

Totals and balances for accounting data

For opening balances, open invoices and stock valuation, compare totals in Odoo with the totals in the source ledger, by account, journal, currency and period. Confirm that debits equal credits and that receivable and payable balances match the aged lists from the old system. Accounting errors are expensive to find after posting, so this check belongs before anyone uses the data for a close. Ask your finance lead to sign off the figures in writing, not only the import log.

Access rights for imported users

Imported user records and their group assignments need the same review as any new account. Confirm that each user has the intended company access, that no imported user received administrator rights by default, and that integration users created for the load hold only the rights they need. Test a sample of users by signing in and checking which menus and records they can see. Access problems discovered after go-live are harder to explain to auditors than a delayed cutover.

Sample review by process owners

Automated counts cannot tell whether a customer's payment terms or a product's unit of measure makes business sense. Give process owners a random and a targeted sample of records from each model, with the source values side by side, and ask them to sign off or flag exceptions. Record every exception with its root cause, then decide whether it needs a fix in the mapping, the source data or the procedure. The sign-off should be a named step in the cutover plan, not an informal review.

Why batch sizes and timeouts decide whether a load finishes

A single large import can fail partway through, and the failure is often silent in the sense that some rows are committed and others are not. Every request that loads records competes with the worker's time limits and the proxy's request timeout, so a file that works in a small test can stop short of completion at production volume. The **practical answer is to split the load into batches, retry only the batches that failed, and log every rejected row with its External ID so the run can resume without duplicating records.

Do not pick a batch size from a fixed number found in a forum or guide. Run the same file on a test copy of the database, which Odoo documents a way to create with neutralization for safe test use (see the Odoo on-premise documentation), and record for each batch the row count, elapsed time, memory use and any timeout or error. Start with a small batch, double it while times stay flat, and back off when a batch slows down or the server starts returning errors. The batch size that holds on the test copy is a starting point for production, not a guarantee, because production has more concurrent users, more data already in the models, and different server capacity.

The worker count, worker time and memory limits, and the request timeouts all sit in the hosting environment, not in the import screen or the script. On Odoo.sh, on a self-hosted server, or in a Docker deployment, these values are set by whoever runs the platform. Ask the operations team to confirm the current limits, the reverse proxy timeout, and whether a scheduled job will run during the load window, and agree a maintenance window before the production run starts.

Security and access during a bulk load

A bulk load touches more records, and more personal data, than most day-to-day work in Odoo. The controls below decide who can write data, where the source files sit, and how you prove later which account created what.

Use an integration user with minimum rights

Run the load under a dedicated integration user that holds only the access groups needed for the models being imported, such as contacts or products. Avoid the administrator account, because a leaked script or a mistaken mapping then has write access across every app. Ask the implementation team to document the exact group list, and confirm how access groups and record rules work in your Odoo version, since the rights model is set per version and per edition.

Odoo upgrade docs

Keep administrators out of the load

Administrator accounts bypass the restrictions you set for normal users, so a script running as one can change settings, users and access rules along with data. Treat any load that needs admin rights as a finding to review before it runs. Confirm with your Odoo partner or your own Odoo administrators which operations truly require elevated rights, and limit those steps to a short, supervised window.

Control source files with personal data

CSV files with customer names, addresses, bank details or employee records are copies of production data that often sit on laptops, shared drives or email. Store them in a restricted location, limit who can open them, and encrypt them at rest where your policy requires it. Set a rule that files are removed from working folders once the load is validated, and record who received each file.

Delete or restrict staging copies

Test and staging databases used to rehearse the import hold the same personal data as production. Duplicate-and-neutralize workflows are documented by Odoo for test copies, but a neutralized copy still needs an owner, an access list and a deletion date. Confirm with your team who can reach the staging database and when it will be dropped after go-live.

Odoo on-premise docs

Audit which account created each record

Imported records should be traceable to the integration user and the batch that created them, so an error can be reversed without guessing. Keep the batch identifier in a field or External ID pattern, and keep the load log with timestamps and user names. Ask how Odoo's chatter and audit features record creation for your models, and confirm that your audit retention matches your policy.

Plan credential rotation after the load

The API key or password used for the load should be revoked or rotated as soon as the final batch completes, and never embedded in a script that is kept in a repository. Store the key in your secrets manager, set an expiry where the version supports it, and record who approved each change. Confirm the key duration options and revocation steps for your Odoo version before the rehearsal.

Common questions about importing data into Odoo

Can our team load large volumes into Odoo without a partner?

Yes, many teams can, provided someone on the team knows the Odoo data model well enough to map source fields to the right models and to read error messages from failed batches. The built-in import tool handles smaller, well-structured files for a single model at a time, and it works best when the team has a clean extract, a test database and time to repeat loads. The risk is less the tool itself and more the sequence: master data such as partners, products and accounts must exist before transactions that reference them, and a mistake discovered after go-live is expensive to unwind. Ask whether the team has done a full dress rehearsal load in a duplicate database before committing to this path.

What drives the effort and cost of a scripted Odoo data load?

The main drivers are the number of source systems, how much the source data needs cleaning and deduplication, the number of Odoo models involved, and how many relationships must be resolved between records. Scripted loads also depend on how many rules the mapping needs, such as tax or unit-of-measure conversions, and on how many rehearsal runs the project plans before go-live. One-time costs cover analysis, mapping, script development, rehearsals and validation. Recurring costs appear only if the load is repeated, for example for incremental syncs. When requesting a quote, ask for the list of models in scope, the expected number of rehearsal loads, who supplies source extracts, and how validation evidence is delivered.

How far ahead should we plan a staged data load?

Plan from the factors rather than from a fixed number: the volume and complexity of each model, how many dependencies sit between them, how long a full load takes on your hosting, and how many rehearsal runs your data owners need to sign off. Each stage should be loaded, checked and approved before the next one starts, so the schedule should leave room for rework after each rehearsal. Timeouts and batch sizes also affect how long a run takes, so confirm them on a copy of your own environment rather than on assumptions. Ask your implementation partner or internal team to show the rehearsal plan and the go-live cutover window in writing.

What do we need to provide for a data import project?

The work depends on named people and clean inputs from your side. You need data owners for each area, such as customers, products, chart of accounts or open invoices, who can decide which records are correct and which should be archived. You also need source extracts in agreed formats, a working test database, access to the people who explain legacy codes, and written sign-off on validation results before each stage goes live. Without these, the load stalls at the mapping stage. Confirm before starting who approves mapping decisions, who signs off counts and totals, and how changes to source data after the extract are handled.

Is the built-in Odoo import tool enough for our data?

It is enough for simpler cases: one model at a time, a moderate number of rows, and data that already uses External IDs or can be given them. It becomes limiting when records depend on several models loaded in sequence, when you need to transform values or call business logic, or when batches must be retried after partial failures. Large volumes also raise timeout and batch size questions that the tool does not manage for you. Test the tool on a representative sample in a duplicate database, measure the run time and check the results against source totals. If any of those steps fail, a scripted load through the API is usually the next option to evaluate.

How do we confirm API availability before we commit to a scripted load?

Start by checking your plan and hosting type, because external API access is documented as part of the Custom plan in Odoo's pricing information, and the hosting options for that plan differ from the Standard and One App Free plans. Then confirm the Odoo version you run, since API methods and the end of older protocols are tied to specific releases. Ask your Odoo contact or partner to confirm in writing that your subscription and hosting include external API access, and test authentication with a dedicated integration user on a duplicate database before the project plan depends on it. Also confirm that your version's support window covers the project's go-live period.

What checks confirm imported records are correct before go-live?

Validation should compare counts, totals and sample records between the source and Odoo for every model in scope, and it should check that relationships resolve correctly, such as each invoice pointing to the right partner and each product carrying the right unit of measure. Failed rows must be logged with their reason and reloaded or corrected, never silently dropped. Keep the validation evidence, including the rehearsal logs and sign-off records, because auditors and internal control reviewers will ask for it. Agree on the acceptance criteria with the data owners before the first rehearsal so that the go-live decision rests on evidence rather than on a visual check.

How DeployOpen scopes and delivers bulk data loads for Odoo

DeployOpen starts every bulk load with a written scope, because the choice between the import tool and the API depends on record volumes, the models involved, relational dependencies and how much cleansing the source data needs. The scope names the target models, the source files or systems, the External ID scheme, the batch sizes to test, the acceptance checks and who signs off each load. Scopes, deliverables and timelines are agreed in writing before work begins, and the quote follows from that written scope rather than from a fixed price list. The client's own team typically supplies the source extracts, business owners for the data rules, and access to a duplicate of the target database.

DeployOpen then builds the mapping and, where the import tool cannot carry the load, the scripts. Mapping covers field-by-field transformations, stable External IDs for every record so reruns update rather than duplicate, and load order so parent records exist before their children. Scripts are written against the API that the target version supports, with batching, timeouts, retries and logging designed in. Every run is first tested on a duplicate database, and DeployOpen prepares validation evidence: record counts per model, reconciliation totals for balances and stock, sampled record checks and a list of rejected rows with reasons. Ongoing support for later loads, reruns and upgrades is available as a retainer. Confirm the Odoo version and hosting type first, since they determine which API and access options apply.

Sources and further reading

Talk to our team.

Tell us what you're working on, whether it's a deployment, an audit, a security test or a cyber range. You'll speak with an engineer who can help you scope it.

  • 30-minute call: free, with no obligation.
  • NDA on request: we can sign before you share details.
  • Clear next steps: a scope and plan after the call.