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

# Odoo CRM

> Connect Odoo CRM to Octanist to update leads when opportunities move through your Odoo pipeline.

The Odoo CRM integration updates leads in Octanist when an opportunity changes in Odoo. Octanist can mark leads as qualified, won, or lost, and can use Odoo expected revenue as the lead value.

<Info>
  Odoo sends the pipeline stage as a numeric `stage_id`. You will need to copy
  the Odoo stage IDs for the stages you want to map.
</Info>

## Table of Contents

1. [Create the Integration in Octanist](#1-create-the-integration-in-octanist)
2. [Enable Developer Mode in Odoo](#2-enable-developer-mode-in-odoo)
3. [Find Your Odoo Stage IDs](#3-find-your-odoo-stage-ids)
4. [Create the Odoo Automation Rule](#4-create-the-odoo-automation-rule)
5. [Complete the Setup in Octanist](#5-complete-the-setup-in-octanist)
6. [Test the Integration](#6-test-the-integration)

***

## 1. Create the Integration in Octanist

1. Go to [Octanist](https://octanist.com/) and navigate to **Integrations > Updating > Add New**.
2. Choose **Odoo CRM**.
3. Copy the **Webhook URL** from the first setup step.

<Warning>
  Use the full webhook URL from Octanist. The URL includes a secret at the end
  and must be pasted exactly into Odoo.
</Warning>

***

## 2. Enable Developer Mode in Odoo

1. Log in to Odoo.
2. Open **CRM**.
3. Go to **Configuration > Settings**.
4. In the left sidebar, click **General Settings**.
5. Scroll to **Developer Tools** and click **Activate the developer mode**.

<Frame>
  <img src="https://mintcdn.com/octanist/epah3ScGsl0IS2JE/images/odoo/odoo-activate-developer-mode.jpg?fit=max&auto=format&n=epah3ScGsl0IS2JE&q=85&s=ebe7a05b7e9ad39a889753fe6bc59665" alt="Activate developer mode in Odoo" width="1616" height="2090" data-path="images/odoo/odoo-activate-developer-mode.jpg" />
</Frame>

After developer mode is active, return to CRM.

***

## 3. Find Your Odoo Stage IDs

Octanist maps Odoo `stage_id` values to lead statuses. You need the stage ID for:

* The stage that should mark a lead as **Qualified**
* The stage that should mark a lead as **Won**
* Optional: the stage that should mark a lead as **Lost**

<Note>
  A lost stage is optional. When an Odoo opportunity is marked as lost, Odoo
  sends `active: false`, and Octanist can use that to mark the lead as lost.
</Note>

1. In Odoo CRM, go to **Configuration > Stages**.

<Frame>
  <img src="https://mintcdn.com/octanist/epah3ScGsl0IS2JE/images/odoo/odoo-open-stages-menu.jpg?fit=max&auto=format&n=epah3ScGsl0IS2JE&q=85&s=8d17b418e3af28090d664f21aafd732f" alt="Open Odoo CRM stages" width="694" height="1040" data-path="images/odoo/odoo-open-stages-menu.jpg" />
</Frame>

2. Open the stage you want to map.
3. Look at the URL in your browser.
4. Copy the stage record ID from the URL.

For example, if the URL contains:

```text theme={null}
/odoo/action-209/1?debug=1
```

The stage ID is:

```text theme={null}
1
```

<Warning>
  Do not use the `action-209` number. Use the record ID after it, right before
  `?debug=1`.
</Warning>

<Frame>
  <img src="https://mintcdn.com/octanist/epah3ScGsl0IS2JE/images/odoo/odoo-stage-id-url.jpg?fit=max&auto=format&n=epah3ScGsl0IS2JE&q=85&s=547c5b6dc1aaed2c6dd570efa565c465" alt="Find the Odoo stage ID in the URL" width="1126" height="1136" data-path="images/odoo/odoo-stage-id-url.jpg" />
</Frame>

Repeat this for your qualified and won stages.

***

## 4. Create the Odoo Automation Rule

1. In Odoo CRM, click the **Studio** button in the top bar.

<Frame>
  <img src="https://mintcdn.com/octanist/epah3ScGsl0IS2JE/images/odoo/odoo-developer-tools-icon.jpg?fit=max&auto=format&n=epah3ScGsl0IS2JE&q=85&s=f8d07f3f054a46d72ac9bbe0832c5960" alt="Open Odoo Studio" width="766" height="264" data-path="images/odoo/odoo-developer-tools-icon.jpg" />
</Frame>

2. In Odoo Studio, open the **Automations** tab.

<Frame>
  <img src="https://mintcdn.com/octanist/epah3ScGsl0IS2JE/images/odoo/odoo-studio-automations-tab.jpg?fit=max&auto=format&n=epah3ScGsl0IS2JE&q=85&s=0407542bf898b248b14e3aff8ce2d6d1" alt="Open the Automations tab in Odoo" width="3628" height="246" data-path="images/odoo/odoo-studio-automations-tab.jpg" />
</Frame>

3. Click **New**.

<Frame>
  <img src="https://mintcdn.com/octanist/epah3ScGsl0IS2JE/images/odoo/odoo-automation-rules-new.jpg?fit=max&auto=format&n=epah3ScGsl0IS2JE&q=85&s=4dfef4eed0d6c64762347b8e8561e071" alt="Create a new Odoo automation rule" width="2550" height="1926" data-path="images/odoo/odoo-automation-rules-new.jpg" />
</Frame>

4. Configure the automation rule:

* **Name**: `Update Lead in Octanist`
* **Trigger**: `On create and edit`
* **Apply on**: `Match all records`
* **When updating**: add `Active (Lead)` and `Stage (Lead)`

<Frame>
  <img src="https://mintcdn.com/octanist/epah3ScGsl0IS2JE/images/odoo/odoo-automation-trigger-fields.jpg?fit=max&auto=format&n=epah3ScGsl0IS2JE&q=85&s=90ecffa40c5c7afc8d8b5716fa5d0f5c" alt="Configure Odoo automation trigger fields" width="1174" height="544" data-path="images/odoo/odoo-automation-trigger-fields.jpg" />
</Frame>

Do not save the automation rule yet. Add the webhook action first.

5. Add an action and choose **Send Webhook Notification**.

<Frame>
  <img src="https://mintcdn.com/octanist/epah3ScGsl0IS2JE/images/odoo/odoo-add-webhook-action.jpg?fit=max&auto=format&n=epah3ScGsl0IS2JE&q=85&s=c678930a3d28e517a28469bc30a22352" alt="Add an Odoo webhook action" width="766" height="230" data-path="images/odoo/odoo-add-webhook-action.jpg" />
</Frame>

6. Configure the webhook action:

* **Name**: `Send Lead to Octanist`
* **Type**: `Send Webhook Notification`
* **URL**: paste the full webhook URL from Octanist
* **Fields**:
  * `Active (Lead)`
  * `Email (Lead)`
  * `Expected Revenue (Lead)`
  * `Phone (Lead)`
  * `Stage (Lead)`

<Frame>
  <img src="https://mintcdn.com/octanist/epah3ScGsl0IS2JE/images/odoo/odoo-webhook-action-fields.jpg?fit=max&auto=format&n=epah3ScGsl0IS2JE&q=85&s=bbe9da0b0fe5d7805086d686ce12806e" alt="Configure the Odoo webhook action fields" width="2444" height="1658" data-path="images/odoo/odoo-webhook-action-fields.jpg" />
</Frame>

7. Click **Save**.

***

## 5. Complete the Setup in Octanist

Return to the Odoo setup flow in Octanist.

1. Paste the Odoo stage IDs:
   * **Qualified Stage ID**
   * **Won Stage ID**
   * Optional: **Lost Stage ID**
2. Set fallback values:
   * **Qualified Lead Value**
   * **Won Lead Value**
3. Give the integration a clear name.
4. Complete the setup.

<Note>
  If Odoo sends expected revenue as `0`, `null`, or does not send it at all,
  Octanist uses the fallback value you configured.
</Note>

***

## 6. Test the Integration

Create or update a test opportunity in Odoo.

1. Move the opportunity to the stage mapped as **Qualified**.
2. Move the opportunity to the stage mapped as **Won**.
3. Mark the opportunity as **Lost** in Odoo.

Then check **Octanist > Activity History**.

You should see:

* `Odoo webhook received`
* `Lead updated via odoo`
* Or a skipped activity explaining why the update was not applied

<Tip>
  If you do not see `Odoo webhook received`, the request did not reach Octanist.
  Check the webhook URL, Odoo automation rule, tunnel configuration, and allowed
  hosts.
</Tip>

If you have any questions about this setup, contact us at [support@octanist.com](mailto:support@octanist.com).
