> ## Documentation Index
> Fetch the complete documentation index at: https://docs.linkiasoft.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Odoo: mirror your leads into Odoo CRM

> Every lead captured in Linkiasoft becomes a crm.lead in your Odoo, and stays in step.

If your sales team works in Odoo, connect it and every lead captured here — typed in by
hand, created through the API, or auto-created from a WhatsApp conversation — appears in
Odoo as well, and updates as it moves through your pipeline.

The sync is **one-way**. Linkiasoft is the source of truth; Odoo receives a copy. Changes
made inside Odoo are not read back.

## What you need from Odoo

<Steps>
  <Step title="A user for the integration">
    Create a dedicated Odoo user rather than reusing a person's login. When someone leaves
    and their account is deactivated, an integration on a personal login goes down with it.

    The user needs create and write access to **CRM**.
  </Step>

  <Step title="An API key for that user">
    In Odoo: **Preferences → Account Security → New API Key**. Odoo shows it once.

    On Odoo Online, API keys require two-factor authentication to be enabled on the account
    first — Odoo will tell you if it isn't.
  </Step>

  <Step title="Your database name">
    Visible at **Settings → General Settings → Developer Tools → Activate developer mode**,
    or in the URL on Odoo Online. An Odoo server can host several databases, so this cannot
    be guessed from the address.
  </Step>
</Steps>

## Connect it

**Integrations → Odoo CRM** in Linkiasoft, then fill in:

| Field        | Example                     |
| ------------ | --------------------------- |
| Instance URL | `https://acme.odoo.com`     |
| Database     | `acme-production`           |
| Odoo login   | `integrations@acme.com`     |
| API key      | the key from the step above |

Press **Test connection** before saving. We authenticate against the instance and report
what Odoo actually said, which is far more useful than discovering the problem later
through leads that never arrive.

<Note>
  Saving always re-tests. A connection cannot be stored unverified — that's the failure mode
  where an integration looks connected on screen and has never worked.
</Note>

Two optional settings:

* **Create leads as** — Opportunities or Leads. Most Odoo setups hide the separate Leads
  stage, so Opportunities is the default and usually correct.
* **Sales team ID** — file everything under one Odoo sales team. Leave it empty to let Odoo
  route.

## What gets sent

| Linkiasoft                             | Odoo                                          |
| -------------------------------------- | --------------------------------------------- |
| Lead name                              | `contact_name`, and the opportunity title     |
| Company                                | `partner_name`                                |
| Email                                  | `email_from`                                  |
| Phone                                  | `phone`                                       |
| Value, currency                        | `expected_revenue`, `currency_id`             |
| Probability                            | `probability`                                 |
| Priority                               | `priority`                                    |
| Expected close date                    | `date_deadline`                               |
| Tags                                   | `tag_ids`, created in Odoo if missing         |
| Source, industry, customer type, stage | appended to the description, with a link back |

<Note>
  **Leads arrive unassigned.** We deliberately don't set a salesperson, so Odoo's own
  assignment rules and sales-team routing decide who picks the lead up — which is what they
  exist for. Assigning every lead to the integration's own account instead would make that
  user the owner of record for your entire pipeline.
</Note>

### Leads from WhatsApp and Instagram

A customer who messages you may have no email address. Because our lead records require
one, those leads get a placeholder like
`social.whatsapp.a1b2c3@noreply.crm`.

We strip it before sending. The Odoo record gets no `email_from` at all, and a note in the
description saying the lead came from a social conversation. A placeholder address would
poison Odoo's own duplicate detection and hand your team something that hard-bounces.

## Duplicates

Before creating anything, we look for an existing Odoo lead with the same email or phone —
comparing phone numbers by their last nine digits, so `+20 100 123 4567` and `01001234567`
match rather than becoming two records.

On a match we **update that lead** instead of creating a second one. Archived and lost leads
are included in the check: re-creating one a salesperson deliberately closed is exactly the
duplicate worth avoiding.

## Keeping up to date

Editing a lead or moving it to another stage updates the same Odoo record. We store the
Odoo id against the lead, so there is no guessing and no drift.

The health panel on the integration page shows how many leads have synced, how many failed,
and when the last successful push was. **Retry failed** re-queues everything that didn't
make it — useful after fixing credentials or a permissions problem in Odoo.

<Note>
  Pushing happens in the background. Saving a lead never waits on Odoo, so a slow or
  unreachable instance can't slow down your own CRM. It also means a lead can exist here for a
  few seconds before it appears there.
</Note>

## When leads don't arrive

The health panel's **Failed** count and the error against each lead are the place to start.

| What you see                        | Usually means                                                                                  |
| ----------------------------------- | ---------------------------------------------------------------------------------------------- |
| Connection marked *Needs attention* | Odoo rejected the credentials — the API key was revoked, or 2FA was turned off. Re-enter them. |
| Failures mentioning access rights   | The integration user lacks create or write access to CRM.                                      |
| Everything skipped                  | The connection is disabled. Re-save it.                                                        |
| Nothing at all, no rows             | No active connection at the time those leads were created. Connect, then **Retry failed**.     |

<Warning>
  Disconnecting keeps the links between your leads and their Odoo records. That's deliberate —
  reconnecting the same instance picks up where it left off rather than duplicating every
  lead you have. If you connect a *different* Odoo, expect the existing links to be stale.
</Warning>
