# Connect Odoo

> Sync products, variants, stock and Arabic translations from Odoo 16 to 20 into Message24, and create quotations or sales orders in Odoo from the orders the AI captures.

Source: https://docs.message24.net/owners/integrations/odoo/

The Odoo integration copies your sellable products into Message24, with their variants, prices, stock, photos and Arabic names, and can create a quotation or a confirmed sales order in Odoo for each order the AI captures in chat. It works with Odoo 16, 17, 18, 19 and 20, Community or Enterprise, on Odoo Online, Odoo.sh or your own server.

## Before you start

Message24 reads and writes Odoo as one of your Odoo users, through an API key that user creates. It sees exactly what that user sees, so pick a user who can read products and, if you want orders sent, create sales orders.

1. Sign in to Odoo as that user.
2. Click your avatar in the top right, then **My Preferences** (**Preferences** on some versions).
3. Open the **Account Security** tab and click **New API Key**. Confirm your password when asked.
4. Give the key a name such as `Message24`. On Odoo 17 and later, choose a duration long enough that you won't have to replace it soon; when the key expires, syncing stops until you paste a new one.
5. Copy the key. Odoo shows it only once.

:::caution
The API key acts as that user. Treat it like a password and don't share it over public chat or email.
:::

## Connect

The form has two steps.

1. Go to **Settings > Integrations** and click **Connect** on the Odoo card.
2. Fill in:
   - **Odoo address**: the address you open Odoo at, for example `https://yourcompany.odoo.com`. You can paste it straight from the browser.
   - **Database**: leave it empty if your server has only one database; Message24 finds it. On Odoo Online it is usually the first part of the address (`yourcompany`). If your server hosts several databases, the form tells you and lists them.
   - **Login**: the email the user signs in with.
   - **API key**: the key from the steps above.
3. Click **Verify**. Message24 signs in and shows the Odoo version, the database and how many products are for sale.
4. Choose whether to send orders to Odoo (see below), then click **Connect**.

If the address, login or key is wrong, you see the error and nothing is saved.

## What syncs

- Every product marked **Can be Sold**. Archived products, and products that are not for sale, are not imported.
- Products with variants come in with their attributes (for example Color and Size) and one option per variant, each with its own price (extra prices included), internal reference and stock. Archived variants are left out.
- **Sales Price**, **Internal Reference** and the **Sales Description**.
- Stock: a product tracked in inventory is in stock when its quantity on hand is above zero. Services and goods you don't track in inventory are always shown as available. Without the Inventory app everything is shown as available.
- The product category, for example `Clothes / T-Shirts`. Odoo's default **All** category is left out.
- Photos: the main photo, the extra photos from the eCommerce gallery, and variant photos (shown for the colour a customer asks about). Only photos that changed are downloaded again.
- Arabic names and sales descriptions, if Arabic is installed in Odoo and the product is translated. A Kurdish language you added to Odoo yourself is picked up too.
- The product brand, if you use a brand module that adds a **Brand** field to products.

Prices are the sales price on the product. Pricelists and discounts in Odoo are not applied.

Products sync automatically in the background. Between full syncs, Message24 fetches only the products that changed, including products whose stock moved. **Full Sync** re-reads every product and deactivates products that were deleted in Odoo. See [How syncing works](/owners/integrations/overview/#how-syncing-works).

## Sending orders to Odoo

Tick **Send orders to Odoo** to create each order in Odoo. It needs the Sales app; without it the option is disabled.

- **Send orders when they are**: **New** sends an order as soon as it is accepted in Message24. **Confirmed** waits until your team confirms it.
- **Create as**: **Quotation** leaves the order in Odoo for your team to confirm. **Sales order** confirms it on arrival, which reserves stock and starts delivery.

What is sent:

- The customer. Message24 looks for an existing customer by phone number, whatever the formatting (`0750 123 4567` finds `+964 750 123 4567`), then by email, and creates one if there is no match.
- The delivery address. If the customer has none yet it is saved on the customer; if it differs from theirs, it is added as a delivery address under them.
- A line for each product from your Odoo catalog, at the price agreed in the chat.
- Lines Odoo cannot match to a product (a product typed by hand, or a product with variants where no variant was chosen), the delivery fee and any discount, as notes on the order with their quantity and price. Your team adds them as products in Odoo if they need to be invoiced.
- The order number, as the **Customer Reference** (`Message24 #1042`), and the order notes.

Each order is sent once. If sending is interrupted and retried, Message24 finds the order by its Customer Reference instead of creating it twice.

### Status updates from Odoo

After an order has been sent, Message24 checks Odoo every few minutes and updates the order's stage on your [Orders](/owners/catalog/orders/) page:

| In Odoo | Stage in Message24 |
| --- | --- |
| Quotation or quotation sent | No change |
| Sales order | Confirmed |
| Fully delivered | Delivered |
| Cancelled | Cancelled |

A stage never moves backwards: an order your team marked delivered in Message24 stays delivered while the delivery is still open in Odoo.

## Change settings or credentials

Click the settings icon on the Odoo card. You can change the order options there. To use a new API key or a different user, click **Change**, fill in the new details and click **Save changes**. Leave the API key empty to keep the current one.

## Disconnect

Click **Disconnect** on the Odoo card and confirm. Product syncing and order sending stop. To revoke access completely, also delete the API key in Odoo under **Preferences > Account Security**.
