Odoo, automatic contact export

Swopi leads are written into Odoo as a contact (res.partner) or an opportunity (crm.lead). Connect with an API key, deduplication by email, mapping into your own fields.

The integration with Odoo sends every new contact from Swopi straight into your database. A lead from a business card or a contact added manually in the dashboard is created as a contact (res.partner), or as an opportunity (crm.lead), whichever you choose.

One-way push via the Odoo External API. Swopi never deletes anything in Odoo. Deduplication by email: an existing record is updated instead of creating a duplicate.

#Overview

Target CRM Odoo 17, 18 and 19 (Odoo Online and self hosted)
Connection API key of a user (Odoo has no OAuth for outside apps)
What gets created Contact (res.partner), optionally an opportunity (crm.lead)
Trigger Automatically on a new contact, or manual sending of selected contacts
Deduplication By email, an existing record is updated
Availability Swopi Teams plan, configured by the administrator

#Why an API key and not a one-click sign in

Odoo can act as a sign-in provider for itself, but it has no consent screen for outside applications (there is no authorize endpoint). The supported path for a server-to-server integration is therefore a user API key, which Odoo accepts in place of a password. The key stays on the Swopi server and is never sent back to the browser.

#Prerequisites

  • the Swopi Teams plan and the administrator role,
  • an Odoo user allowed to create contacts (we recommend a service user),
  • the CRM module installed if you want opportunities.

#How to get an API key

In Odoo click your name in the top right, Preferences, the Account Security tab, New API Key. The key is shown once, so copy it right away.

#How to connect

Dashboard → Integrations → Odoo:

  1. Odoo address, for example https://company.odoo.com.
  2. Database, on Odoo Online it is usually the first part of the address. Leave it empty and Swopi fills it in.
  3. Sign-in email of the user the records are created under.
  4. API key from the previous step.
  5. Test connection → Save.

#Sync settings

Option Description
Automatic sync The contact is written as soon as it is captured. Turn it off to send manually.
Primary object Write as a contact, or as an opportunity.

#Field mapping

Field in Swopi Odoo (contact) Odoo (opportunity)
Name name contact_name
Email email email_from
Phone phone phone
Job title function function
Company linked partner (parent_id) partner_name
Website website website
City city city
Country country_id country_id
Note comment description

The company is its own record. When a lead carries a company name, Swopi finds it in Odoo, or creates it as a partner with is_company = true, and links the contact to it through parent_id. Contacts then sit under the company, the way Odoo works natively. We add the website, phone and VAT number to the company when Swopi AI finds them, but we never overwrite what is already there.

Country is not text. In Odoo it is a relation to res.country, so Swopi resolves the country by name or two letter code first and writes the id.

#Custom fields

Custom fields in Odoo start with x_, fields built in Studio with x_studio_. In the Field mapping tab pick Custom field (enter key) and type the technical field name, for example x_studio_source. The field has to exist in Odoo first, Swopi does not create it. See Field mapping.

#How it works

  • A new lead from a card or a manually added contact → Swopi finds or creates the record (dedup by email).
  • The write runs as the user whose API key you entered, so Odoo shows who created the record.
  • Use Create test lead to verify the connection.
  • The result of every export is in Lead export status and in the sync log.

Need help? Email support@swopi.co.