Platform
Chatbot Builder Bulk Messaging Team Inbox Mini CRM API & Webhooks AI Integration WhatsApp Flows
Industries
E-commerce & D2C Real Estate Education Healthcare Finance & BFSI Logistics Hospitality Retail
Integrations
Learn
Learning Hub Help & Docs Connect Guides Automation Codex Blog Message Templates
Pricing Get Started →
HomeConnect › Connect Odoo to WhatsApp
Odoo ERP Integration Guide · CRM / ERP

Connect Odoo ERP to WhatsApp

Pull live customer data from your Odoo database into a WhatsApp chatbot. Search the res.partner model by phone number, fetch customer details and account history, and reply with ERP context in real time.

Published 22 June 2026  ·  8 min read  ·  CRM / ERP

Before following this guide, read the External API Request step foundation guide. It covers every field in the step interface so this guide can focus on Odoo-specific values.

Which Odoo API to use

Odoo has three API protocols (XML-RPC, JSON-RPC, REST). This guide uses the REST API with Bearer token, available from Odoo 16+. It is the cleanest method for WA.Expert integration. If you are on Odoo 14 or 15, see the JSON-RPC alternative in the troubleshooting section below.

Step 1: Generate an Odoo API key

Odoo API keys are tied to a specific user and inherit that user's access permissions. Generate one for a dedicated integration user to keep the connection auditable and revocable.

1
In Odoo, go to Settings > Users & Companies > Users. Open the user you want to use for the integration (or create a dedicated one).
2
Click the API Keys tab (or look under Account Security). Click New API Key.
3
Enter a description like "WA.Expert WhatsApp Bot". Copy the key immediately. It is shown only once.
4
Note your Odoo URL (e.g. yourcompany.odoo.com) and database name if your instance hosts multiple databases.
API Keys tab not visible

If you do not see the API Keys tab, your Odoo version may be older than 16, or the feature may be disabled. In Odoo 14/15, enable it via Settings > Technical > Allow API Keys. On very old versions, use JSON-RPC with username and password instead.

Official docs

Odoo external API: odoo.com/documentation/19.0/developer/reference/external_api.html

Step 2: Fill in the External API Request step

In your WA.Expert chatbot flow, store the customer's phone as {{customer_phone}}. Add an External API Request step to search the Odoo partner model:

External API Request Step — WA.Expert
Select Method
GET
Request URL
https://yourcompany.odoo.com/api/res.partner?domain=[["phone","=","{{{{customer_phone}}}}"]]&fields=["name","email","phone","mobile","street","city","customer_rank"]
Select Auth Type
No Auth (Bearer token in header below)
Header Parameters
AuthorizationBearer YOUR_ODOO_API_KEY
Content-Typeapplication/json
X-Odoo-Databaseyour_database_name
Select Body Type
None (GET requests carry no body)
Choose Response Type
JSON

Field-by-field breakdown

FieldValueNotes
Select MethodGETSearching for partner records.
Request URLhttps://yourcompany.odoo.com/api/res.partner?domain=[...]&fields=[...]Replace yourcompany.odoo.com with your Odoo URL. The domain parameter is a JSON array filter condition. The fields parameter lists what to return.
AuthorizationBearer YOUR_ODOO_API_KEYStandard Bearer token. Paste the key from Step 1 after 'Bearer '.
Content-Typeapplication/jsonRequired for Odoo REST API requests.
X-Odoo-Databaseyour_database_nameRequired ONLY if your Odoo server hosts multiple databases. Single-database instances do not need this header. Find the name in Settings > General Settings.
Select Body TypeNoneGET requests carry no body.
Choose Response TypeJSONOdoo returns an array of partner objects.

Domain filter patterns

Odoo domain filters are JSON arrays of conditions. Each condition is a three-element array: ["field", "operator", "value"].

What you wantDomain filter
Contact by phone[["phone","=","9820000001"]]
Contact by mobile[["mobile","=","9820000001"]]
Phone or mobile (OR)["|", ["phone","=","9820000001"], ["mobile","=","9820000001"]]
Customers only (not all contacts)[["customer_rank",">",0]]
Customer by phone[["phone","=","9820000001"],["customer_rank",">",0]]

The | operator in Odoo domain is a prefix OR. Put it before the two conditions it joins. Without customer_rank filter, the search returns all contacts including suppliers and employees.

Step 3: Map the response to WhatsApp variables

A successful Odoo partner search response looks like this:

Odoo REST API — GET /api/res.partner response
[
  {
    "id": 142,
    "name": "Priya Sharma",
    "email": "priya@example.com",
    "phone": "9820000001",
    "mobile": "+919820000001",
    "street": "12 MG Road",
    "city": "Mumbai",
    "customer_rank": 3,
    "supplier_rank": 0
  }
]
Response is a direct array

Odoo's REST API returns partner records as a plain array, not wrapped in a 'data', 'value', or 'response' object. Map your variables using [0].name, [0].email, [0].city directly. If the array is empty, no partner was found with that phone number.

Map these response paths to variables in the External API Request step:

Variable nameResponse pathExample value
partner_id[0].id142
customer_name[0].namePriya Sharma
customer_email[0].emailpriya@example.com
customer_city[0].cityMumbai
customer_rank[0].customer_rank3 (higher = more orders placed)

customer_rank is a count of how many sales orders the partner has placed. Higher values mean longer-standing customers. Use it to personalise replies: 'Welcome back, valued customer' vs 'Welcome, new customer'.

Keep the WhatsApp reply in the free service window

If the customer messaged you first within the last 24 hours, your reply is a free service conversation. For proactive outbound messages from Odoo data, use an approved Utility or Marketing template.

Worked example: customer context bot

Chatbot flow — Odoo partner lookup by WhatsApp number
Customer messages your WhatsApp number.
WA.Expert captures their phone as {{customer_phone}} = "9820000001".

External API Request step:
GET https://yourcompany.odoo.com/api/res.partner
  ?domain=[["phone","=","9820000001"]]
  &fields=["name","city","customer_rank","email"]
Authorization: Bearer YOUR_ODOO_API_KEY

Response (array):
[{
  "id": 142,
  "name": "Priya Sharma",
  "city": "Mumbai",
  "customer_rank": 3,
  "email": "priya@example.com"
}]

Mapped:
customer_name = "Priya Sharma"
customer_city = "Mumbai"
customer_rank = "3"

Conditions: if array is empty → "We could not find your record."

Bot replies (if found):
"Hi Priya Sharma, welcome back!
Account city: Mumbai
You have placed 3 orders with us.

Reply ORDERS to check your latest order status,
or reply SUPPORT for assistance."

Alternative: JSON-RPC for Odoo 14 and 15

If you are on Odoo 14 or 15 and cannot use the REST API, the JSON-RPC method works on all Odoo versions. It is a two-step POST process:

JSON-RPC method — Odoo 14/15 (two steps)
Step 1: Authenticate to get user ID
POST https://yourcompany.odoo.com/web/session/authenticate
Content-Type: application/json

Body:
{
  "jsonrpc": "2.0",
  "method": "call",
  "params": {
    "db": "your_database_name",
    "login": "your@email.com",
    "password": "your_password_or_api_key"
  }
}

Response: { "result": { "uid": 7, ... } }  ← store uid

Step 2: Search res.partner
POST https://yourcompany.odoo.com/web/dataset/call_kw
Content-Type: application/json

Body:
{
  "jsonrpc": "2.0",
  "method": "call",
  "params": {
    "model": "res.partner",
    "method": "search_read",
    "args": [[ ["phone", "=", "9820000001"] ]],
    "kwargs": {
      "fields": ["name", "email", "city", "customer_rank"],
      "limit": 1
    }
  }
}

Response: { "result": [{ "id": 142, "name": "Priya Sharma", ... }] }
Map: result[0].name, result[0].city

Troubleshooting

SymptomLikely causeFix
401 UnauthorizedWrong API key or missing Bearer prefixCheck the Authorization header reads exactly 'Bearer YOUR_API_KEY'. Regenerate the key in Settings > Users > API Keys if needed.
Database not found / 404Multi-database instance without X-Odoo-Database headerAdd the X-Odoo-Database header with your exact database name. Find it in Settings > General Settings.
Empty array []Phone number format mismatchCheck if numbers are stored with country code (+91...) or without. Try ?domain=[["mobile","=","9820000001"]] to search the mobile field instead.
API Keys tab missingOlder Odoo version or feature disabledOn Odoo 14/15: Settings > Technical > Allow API Keys. On older: use JSON-RPC with username/password as shown above.
Access Denied on modelAPI user lacks read permission for res.partnerIn Odoo Settings > Users, ensure the integration user has at least a 'User' role in the Sales or CRM module which grants contact read access.
429 Too Many RequestsRate limit hit (Odoo SaaS: ~60 req/min)Add a delay before retrying. For a WhatsApp bot doing single lookups, this limit is very generous.

Common questions

What is res.partner in Odoo?
+
res.partner is Odoo's universal contact model, storing all customers, suppliers, employees, and companies. To filter customers only, add ["customer_rank",">",0] to your domain.
Which Odoo version does the REST API work with?
+
Odoo 16 and above. For Odoo 14 or 15, use the JSON-RPC method shown in the alternative section above.
Where do I find the Odoo API key?
+
Settings > Users > open your user > API Keys tab > New API Key. Copy it immediately, it is shown only once.
My Odoo has multiple databases. Do I need an extra header?
+
Yes. Add the X-Odoo-Database header with your exact database name. Without it, Odoo cannot identify which database to authenticate against.
How do I search by phone number?
+
domain=[["phone","=","9820000001"]]. For both phone and mobile: domain=["|", ["phone","=","9820000001"], ["mobile","=","9820000001"]].
Does this incur extra WA.Expert charges?
+
The External API Request step counts as one automation action per call. On the Complete plan this is included. On Starter, extra action packs apply from Rs. 49 per 1,000 actions.

Connect Odoo to WhatsApp today

Free trial, no credit card required. And if you ever get stuck, we are the only platform in India that answers you live on WhatsApp.

Start Free Trial → Book a Demo
1