Перейти к содержимому
Меню
Чтобы взаимодействовать с сообществом, необходимо зарегистрироваться.
Этот вопрос был отмечен
254 Представления

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!

Аватар
Отменить
Related Posts Ответы Просмотры Активность
2
янв. 24
19
1
сент. 25
579
11
сент. 25
5000
1
авг. 25
931
1
авг. 25
1130