Overslaan naar inhoud
Menu
Je moet geregistreerd zijn om te kunnen communiceren met de community.
Deze vraag is gerapporteerd
293 Weergaven

Hello everyone,

I’m working with Odoo EE 18.4 Online and the WhatsApp model. My goal is to send messages directly in the conversation window, as if the user typed them, not via templates.

I’ve tried using the JSON-RPC API with whatsapp.message and the body field:

{
  "jsonrpc": "2.0",
  "method": "call",
  "params": {
    "service": "object",
    "method": "execute_kw",
    "args": [
      "my_db",
      2,
      "APIKEY",
      "whatsapp.message",
      "create",
      [
        {
          "body": "<p>Hello, how can I help you?</p>",
          "message_type": "outbound",
          "mobile_number": "+5213333333333",
          "wa_account_id": 2
        }
      ]
    ]
  },
  "id": 1
}

The record is created in Odoo, but the body field is empty (it’s readonly). When Odoo tries to send it to Meta, the request fails with:

(#100) The parameter text['body'] is required


I also tried using free_text_json with

{"body":"Hello, how can I help you?"}, but Odoo still doesn’t map it into the final payload correctly.

My questions:

  • Which field(s) should be populated in the payload when creating a whatsapp.message record so that Odoo actually fills text.body before sending to Meta?
  • Has anyone managed to send non-template free-text messages via the Odoo API in v18?
  • Is there a supported way to simulate “manual” chat messages without calling the Meta API directly?

Any guidance (or working payload examples) would be much appreciated.

Thanks in advance!

Avatar
Annuleer
Gerelateerde posts Antwoorden Weergaven Activiteit
2
jan. 24
19
1
sep. 25
597
11
sep. 25
5107
1
aug. 25
952
1
aug. 25
1181