Passa al contenuto
Menu
È necessario essere registrati per interagire con la community.
La domanda è stata contrassegnata
267 Visualizzazioni

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
Abbandona
Post correlati Risposte Visualizzazioni Attività
2
gen 24
19
1
set 25
585
11
set 25
5027
1
ago 25
939
1
ago 25
1146